Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions packages/extension-chakra-storefront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion packages/pwa-kit-extension-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match how other headings are capitalized:

Suggested change
#### Forced overrides
#### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional nit: rephrasing a bit

Suggested change
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.
Sometimes, you may need to override 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 and list the files you intend to override. Any files specified in this list will be treated as overridable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional nit: expand on how to specify the files

Suggested change
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, 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.
Copy link
Contributor

@adamraya adamraya Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also note that this should used as a temporary workaround while seeking a proper extensibility solution. Like we mention in the file docs.

// USE ONLY AS A TEMPORARY SOLUTION TO URGENTLY PATCH/UPDATE AN EXTENSION.


#### 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.
Expand Down Expand Up @@ -280,4 +286,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).
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).
Loading