-
Notifications
You must be signed in to change notification settings - Fork 683
Closed
Labels
Effort: 3-LargeEstimated to be a multi-day effort for a community developer. Experience recommended.Estimated to be a multi-day effort for a community developer. Experience recommended.Progress: doneenhancementNew feature or requestNew feature or requestpkg:venia-concept
Description
Is your feature request related to a problem? Please describe.
This is related to #1595. As part of that PR, we have created a global variable called STORE_NAME that can be added to the bundle at compile time using the Webpack Define plugin. Instead of hardcoding it in Define plugin, can we request that from the GraphQL server and then insert that into the global object just like the Define plugin?
Describe the solution you'd like
- Modify the getStoreConfigData.graphql file to include
store_name, as per theStoreConfigschema. - Modify the getAvailableStoresConfigData.graphql to also include the
store_name. - Using the data from these queries, if
STORE*VIEW_CODEenvironment variable is used, use the store*name value from the correspondingavailableStore. If not, use the default value returned by the getStoreConfigData query. - Update jest config with whatever the sample data store name is from venia.
Describe alternatives you've considered
We can expect the partner developers to simply change the hardcoded string in webpack's Define plugin.
Please let us know what packages this feature is in regards to:
- <x]
venia-concept -
venia-ui -
pwa-buildpack -
peregrine -
pwa-devdocs -
upward-js - [ >
upward-spec
Test Plan:
- On first load (clear cache) of home page route, url will be displayed initially as title in browser.
- After a short time, title will update to contain view name.
- Refresh page. Title should contain correct view name (from cache). You should not see url in title.
- Repeat above steps for:
- CMS page
- Category page
- Product page
- Account Information page
- Address Book page
- Communications page
- Reset Password page
- Order History page
- Cart page
- Checkout page
- Order confirmation page (refresh will go back to cart page)
- Run MFTF
Metadata
Metadata
Assignees
Labels
Effort: 3-LargeEstimated to be a multi-day effort for a community developer. Experience recommended.Estimated to be a multi-day effort for a community developer. Experience recommended.Progress: doneenhancementNew feature or requestNew feature or requestpkg:venia-concept