Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] Fix StorefrontPreview component add siteId query parameter to shopper context calls (@W-16225140@) #1891

Merged

Conversation

adamraya
Copy link
Collaborator

Description

Hotfix PR, a redo of the original PR #1874.

Adds the siteId from CommerceSdkProvider to window.STOREFRONT_PREVIEW. This enables later use in the Storefront Preview Shopper Context Calls.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • Add siteId to StorefrontPreview in commerce-sdk-react

How to Test-Drive This PR

  • Start the dev server for the template-retail-react-app: npm start and navigate to localhost:3000.
  • Print the window.STOREFRONT_PREVIEW object in the browser console.
  • Verify the object now includes siteId.

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@adamraya adamraya requested a review from a team as a code owner July 11, 2024 18:54
@adamraya adamraya changed the title [v3] Add siteId to StorefrontPreview in commerce-sdk-react [v3] Fix StorefrontPreview component add siteId query parameter to shopper context calls (@W-16225140@) Jul 12, 2024
@adamraya adamraya merged commit e6ac124 into bendvc/v3/bug-fixes-july-11 Jul 12, 2024
28 checks passed
@adamraya adamraya deleted the v3-storefrontpreview-hotfix-site-id branch July 12, 2024 20:04
adamraya added a commit that referenced this pull request Jul 12, 2024
* [v3] Fix StorefrontPreview component add siteId query parameter to shopper context calls (@W-16225140@) (#1891)

* Add siteId from useConfig

* Bump versions

* Update CHANGELOG.md

---------

Co-authored-by: Ben Chypak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants