From cb6d70570deff8275a0f8e9254d7932f3d4ee92f Mon Sep 17 00:00:00 2001 From: B Date: Tue, 22 Jun 2021 17:19:07 -0300 Subject: [PATCH] New Feature Updates, more coverage. (#385) * Shouldn't be there. * Removing * Removing old libraries * Updating * Feature Changes and updates * Update README.md --- README.md | 10 +- commerce.config.json | 3 + components/common/Navbar/Navbar.module.css | 1 + components/common/Navbar/Navbar.tsx | 8 +- components/common/UserNav/UserNav.tsx | 12 +- .../product/ProductSidebar/ProductSidebar.tsx | 26 +- framework/bigcommerce/commerce.config.json | 3 +- framework/local/commerce.config.json | 5 +- package.json | 2 +- yarn.lock | 6262 ----------------- 10 files changed, 45 insertions(+), 6287 deletions(-) delete mode 100644 yarn.lock diff --git a/README.md b/README.md index b0cd2b2d3..8204b3445 100644 --- a/README.md +++ b/README.md @@ -66,14 +66,20 @@ Every provider defines the features that it supports under `framework/{provider} #### Features Available +The following features can be enabled or disabled. This means that the UI will remove all code related to the feature. +For example: Turning `cart` off will disable Cart capabilities. + +- cart +- search - wishlist +- customerAuth - customCheckout #### How to turn Features on and off > NOTE: The selected provider should support the feature that you are toggling. (This means that you can't turn wishlist on if the provider doesn't support this functionality out the box) -- Open `commerce.config.json` +- Open `commerce.config.json` - You'll see a config file like this: ```json { @@ -83,7 +89,7 @@ Every provider defines the features that it supports under `framework/{provider} } } ``` -- Turn wishlist on by setting wishlist to true. +- Turn `wishlist` on by setting `wishlist` to `true`. - Run the app and the wishlist functionality should be back on. ### How to create a new provider diff --git a/commerce.config.json b/commerce.config.json index 06b985504..ad72b58de 100644 --- a/commerce.config.json +++ b/commerce.config.json @@ -1,6 +1,9 @@ { "features": { + "cart": true, + "search": true, "wishlist": false, + "customerAuth": false, "customCheckout": false } } diff --git a/components/common/Navbar/Navbar.module.css b/components/common/Navbar/Navbar.module.css index 3d424ec2c..faa86d156 100644 --- a/components/common/Navbar/Navbar.module.css +++ b/components/common/Navbar/Navbar.module.css @@ -1,5 +1,6 @@ .root { @apply sticky top-0 bg-primary z-40 transition-all duration-150; + min-height: 74px; } .nav { diff --git a/components/common/Navbar/Navbar.tsx b/components/common/Navbar/Navbar.tsx index 45cda1bae..2ce5f33b8 100644 --- a/components/common/Navbar/Navbar.tsx +++ b/components/common/Navbar/Navbar.tsx @@ -34,9 +34,11 @@ const Navbar: FC = ({ links }) => ( ))} -
- -
+ {process.env.COMMERCE_SEARCH_ENABLED && ( +
+ +
+ )}
diff --git a/components/common/UserNav/UserNav.tsx b/components/common/UserNav/UserNav.tsx index 16e7279bb..5d7d28df3 100644 --- a/components/common/UserNav/UserNav.tsx +++ b/components/common/UserNav/UserNav.tsx @@ -25,10 +25,12 @@ const UserNav: FC = ({ className }) => { return (