pwa-studio
pwa-studio copied to clipboard
[feature]: (Admin / magento-upward-connector) Admin preview links should launch a PWA with staging data
Â
Is your feature request related to a problem? Please describe. Current state Magento frontend has a "preview staged content mode", where a business user can preview a content or data change by launching a browser window with a storefront simulating the published change from within the Admin panel. Stores running PWA Studio PWAs don't have this functionality; the PWA has no way to display staged data in a preview mode, and the admin doesn't know to link to it.
Describe the solution you'd like
- The API layer must allow a flag (encoded into the auth token, in an HTTP header, a URL parameter, or otherwise) that makes all preview-enabled queries return staging data
- The PWA must be configurable at runtime to use this flag, by injecting the new admin auth token or behavior.
- The magento-upward-connector must modify admin preview link functionality to open PWA-enabled storefronts with this flag enabled.
Â
Acceptance Criteria
- magento-upward-connector or PWA Studio Magento extension must provide a store-view level flag to enable PWA Studio storefronts
- Admin preview-staging mode must check above flag to determine if storefront is a PWA based on active preview Scope
- PWA Studio enabled storefronts must display the preview version with the PWA Studio application
- Non-PWA Studio enabled storefronts should use the regularly configured Magento theme
- PWA Studio preview mode should prompt the admin user to re-enter their credentials in order to generate a REST API bearer token (or development of a GraphQL Mutation)
- Must support MFA for Admin logins
Need to submit feature request to GQL and link to this ticket. Required for support of admin preview of a PWA
@magento export issue to JIRA project PWA as Story
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-1752 is successfully created for this GitHub issue.
We've found a solution for the preview mode problem in Magento PWA. We hope it'll be helpful to you.