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

@W-14016114: Merged storefront preview into develop (v3) #1413

Merged
merged 11 commits into from
Sep 11, 2023

Conversation

alexvuong
Copy link
Collaborator

@alexvuong alexvuong commented Aug 15, 2023

Description

Merging storefront preview for V3

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

  • (change1)

How to Test-Drive This PR

  • (step1)

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)

@alexvuong alexvuong changed the title Merged storefront preview into develop @W-14016114: Merged storefront preview into develop Aug 29, 2023
@alexvuong alexvuong marked this pull request as ready for review August 29, 2023 19:27
@alexvuong alexvuong requested a review from a team as a code owner August 29, 2023 19:27
@alexvuong alexvuong self-assigned this Aug 29, 2023
@alexvuong alexvuong changed the title @W-14016114: Merged storefront preview into develop @W-14016114: Merged storefront preview into develop (v3) Aug 29, 2023
vmarta
vmarta previously approved these changes Aug 30, 2023
Copy link
Contributor

@vmarta vmarta left a comment

Choose a reason for hiding this comment

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

I see now. This PR is simply merging the feature branch, which has PRs that have been approved already.

Copy link
Collaborator

@kevinxh kevinxh left a comment

Choose a reason for hiding this comment

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

Have we considered adding the changes to pwa-kit-react-sdk?

The template files are overridable since V3, and _app is THE mostly likely overridden component in projects.

The ideal solution should prevent customer from shooting their own foot, and the SDK is a great place to ensure storefront preview always work, regardless if you override _app or not.

* Move storefront preview set up into the SDK
Comment on lines +39 to +45
const getRuntimeEnv = () => {
if (process.env.NODE_ENV !== 'production') return process.env.NODE_ENV ?? 'development'
const origin = getAppOrigin()
// mobify-storefront-staging sites have NODE_ENV set to production, but for the purposes
// of CSP we consider the sites to be staging.
return origin.endsWith('.mobify-storefront-staging.com') ? 'staging' : 'production'
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

(no action needed) we are going to move this code into the SDK in a future ticket

kevinxh
kevinxh previously approved these changes Sep 8, 2023
vmarta
vmarta previously approved these changes Sep 8, 2023
@alexvuong alexvuong dismissed stale reviews from vmarta and kevinxh via 70f959f September 9, 2023 00:06
@alexvuong alexvuong merged commit bdce0cf into develop Sep 11, 2023
20 checks passed
shethj pushed a commit that referenced this pull request Sep 12, 2023
* Create StorefrontPreview in the SDK, and set it up in the Retail app

---------

Co-authored-by: Will Harney <wharney@salesforce.com>
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.

None yet

4 participants