From 674df51534eeca19731625a1d74ff26be877bf1a Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 15:18:32 -0800 Subject: [PATCH 1/8] Edit readme to include forced overrides functionability --- .../extension-chakra-storefront/README.md | 56 +++++++++++++++---- packages/pwa-kit-extension-sdk/README.md | 7 ++- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/packages/extension-chakra-storefront/README.md b/packages/extension-chakra-storefront/README.md index 4b4f81e81a..622162793a 100644 --- a/packages/extension-chakra-storefront/README.md +++ b/packages/extension-chakra-storefront/README.md @@ -107,18 +107,50 @@ Please refer to the sample configuration below in order to properly configure yo "isProduction": false }, "enabled": true, // Toggle this extension on or off, this is useful for debugging and development, defaults to true. - "pages": { // Define the url path of each page. A page can be set to false if you want to disable it. - "Account": "/account", - "Cart": "/cart", - "Checkout": "/checkout", - "CheckoutConfirmation": "/checkout/confirmation/:orderNo", - "Home": "/", - "Login": "/login", - "Registration": "/registration", - "ResetPassword": "/reset-password", - "LoginRedirect": "/callback", - "ProductDetail": "/product/:productId", - "ProductList": ["/search", "/category/:categoryId"] + "pages": { // Define the url path of and the configuration on each page. A page can be set to false if you want to disable it. + "Account": { + "path": "/account", + "orderSearchParam": {"limit": 10, "offset": 0, "sort": "best-matches", "refine": []} + }, + "Cart": { + "path": "/cart" + }, + "Checkout": { + "path": "/checkout", + "shippingCountryCode": [ + {"value": "CA", "label": "Canada"}, + {"value": "US", "label": "United States"} + ] + }, + "CheckoutConfirmation": { + "path": "/checkout/confirmation/:orderNo" + }, + "Home": { + "path": "/", + "productLimit": 10, + "mainCategory": "newarrivals" + }, + "Login": { + "path": "/login" + }, + "Registration": { + "path": "/registration" + }, + "ResetPassword": { + "path": "/reset-password" + }, + "LoginRedirect": { + "path": "/callback" + }, + "ProductDetail": { + "path": "/product/:productId" + }, + "ProductList": { + "path": ["/search", "/category/:categoryId"], + "imageViewType": "large", + "selectableAttributeId": "color", + "filterAccordionSate": "filters-expanded-index" + } }, "siteAliases": {}, // Site alias's for multi-site support. "sites": [ // Site configs for multi-site support. diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index d03365f107..01710ffba0 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -107,6 +107,11 @@ Now when the base application is built the import for the `logo.ts` in `extensio This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file. +#### Forced overrides +In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to by pass the restrictions. +You can create a `.forced_overrides` dot file and list the files you intend to overrides. Any files listed in this files are considered overridable. +Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. + #### Setup App and Setup Server These two files represent the core of your extension implementation and how your extension is able to enhance and integrate into your PWA-Kit Application. In your generated extension you'll find that we have stubbed each file out for you with implementations for each Application Extensibility integration point. You can choose to change the implementation of these methods to suit the needs of your extensions, or you can leave them as is if your extension does not require them. @@ -280,4 +285,4 @@ export default useStoreLocatorState ``` ## Support Policy -Security patches are provided for 24 months after the general availability of each major version of the SDK (1.0, 2.0, and so on). \ No newline at end of file +Security patches are provided for 24 months after the general availability of each major version of the SDK (1.0, 2.0, and so on). From 6e2bc812ffadabf903ac721a167470c5b6f9d3a5 Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 16:00:01 -0800 Subject: [PATCH 2/8] minor edit --- packages/pwa-kit-extension-sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index 01710ffba0..9f6e2dc4aa 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -109,7 +109,7 @@ This mechanism is useful when you want to allow for fine grained customization o #### Forced overrides In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to by pass the restrictions. -You can create a `.forced_overrides` dot file and list the files you intend to overrides. Any files listed in this files are considered overridable. +You can create a `.forced_overrides` dot file at the root of your base project and list files you intend to overrides. Any files listed in this files are considered overridable. Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. #### Setup App and Setup Server From 889138f05258e9e8f674e443d60327cb2e398f6b Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 16:00:48 -0800 Subject: [PATCH 3/8] minor edit --- packages/pwa-kit-extension-sdk/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index 9f6e2dc4aa..3faa049f9b 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -109,7 +109,8 @@ This mechanism is useful when you want to allow for fine grained customization o #### Forced overrides In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to by pass the restrictions. -You can create a `.forced_overrides` dot file at the root of your base project and list files you intend to overrides. Any files listed in this files are considered overridable. +To do this, create a .forced_overrides dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable. + Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. #### Setup App and Setup Server From 7727c6284c23f49149ac71b2b9e4fcc6f9967600 Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 16:01:00 -0800 Subject: [PATCH 4/8] minor edit --- packages/pwa-kit-extension-sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index 3faa049f9b..e1be971a25 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -108,7 +108,7 @@ Now when the base application is built the import for the `logo.ts` in `extensio This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file. #### Forced overrides -In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to by pass the restrictions. +In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions. To do this, create a .forced_overrides dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable. Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. From 80b4a0013ccb35d6d1936924dab084b613e185d2 Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 16:01:15 -0800 Subject: [PATCH 5/8] minor edit --- packages/pwa-kit-extension-sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index e1be971a25..29d73c73fe 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -109,7 +109,7 @@ This mechanism is useful when you want to allow for fine grained customization o #### Forced overrides In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions. -To do this, create a .forced_overrides dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable. +To do this, create a `.forced_overrides` dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable. Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. From 555b01b56f4d978e31b318f5af8c286a8eb062a2 Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 16:31:39 -0800 Subject: [PATCH 6/8] PR feedback --- packages/pwa-kit-extension-sdk/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index 29d73c73fe..003506f9c2 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -108,10 +108,10 @@ Now when the base application is built the import for the `logo.ts` in `extensio This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file. #### Forced overrides -In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions. -To do this, create a `.forced_overrides` dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable. +Sometimes, you may need to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass these restrictions. +To do this, create a `.forced_overrides` dot file at the root of your base project, list the files you intend to override, starting with the extension package name. Any files specified in this list will be treated as overridable. -Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. +Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension. #### Setup App and Setup Server From 11c78d256cf8eb2dbaa789f0ddde132ded3dfc8d Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Fri, 31 Jan 2025 19:03:02 -0800 Subject: [PATCH 7/8] PR feedback --- packages/pwa-kit-extension-sdk/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index 003506f9c2..d623f0f0a9 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -107,11 +107,11 @@ Now when the base application is built the import for the `logo.ts` in `extensio This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file. -#### Forced overrides +#### Forced Overrides Sometimes, you may need to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass these restrictions. To do this, create a `.forced_overrides` dot file at the root of your base project, list the files you intend to override, starting with the extension package name. Any files specified in this list will be treated as overridable. -Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension. +Note: It is advisable to use this function with caution since it could potentially break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension. #### Setup App and Setup Server From d78b0ae68033fd171adacefd70d04995e5bac221 Mon Sep 17 00:00:00 2001 From: "alex.vuong" Date: Mon, 3 Feb 2025 10:48:52 -0800 Subject: [PATCH 8/8] PR feedback --- packages/pwa-kit-extension-sdk/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pwa-kit-extension-sdk/README.md b/packages/pwa-kit-extension-sdk/README.md index d623f0f0a9..70cf7934f0 100644 --- a/packages/pwa-kit-extension-sdk/README.md +++ b/packages/pwa-kit-extension-sdk/README.md @@ -108,8 +108,9 @@ Now when the base application is built the import for the `logo.ts` in `extensio This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file. #### Forced Overrides -Sometimes, you may need to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass these restrictions. -To do this, create a `.forced_overrides` dot file at the root of your base project, list the files you intend to override, starting with the extension package name. Any files specified in this list will be treated as overridable. +Users of your extension may sometimes need to override files that are not explicitly designed to be overridden. To accommodate this, they can use a special dotfile named `.forced_overrides`. + +This file, located at the root of their project, should contain a list of files they wish to override, prefixed with the extension package name. Any files listed in `.forced_overrides` will be treated as overridable, bypassing standard restrictions. Note: It is advisable to use this function with caution since it could potentially break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension.