Skip to content

feat(strapi): Add mobile promo w/new 'default' content type, add SetPassword RP customizations#20405

Merged
LZoog merged 1 commit intomainfrom
FXA-13476.v2
Apr 21, 2026
Merged

feat(strapi): Add mobile promo w/new 'default' content type, add SetPassword RP customizations#20405
LZoog merged 1 commit intomainfrom
FXA-13476.v2

Conversation

@LZoog
Copy link
Copy Markdown
Contributor

@LZoog LZoog commented Apr 20, 2026

Because:

  • We want to swap out the Kit QR code image and put it in our CMS, where Strapi is our tried and tested path
  • We want to customize text on the "Set password for Sync" screen when users are coming in through a sync service but Send Tab entrypoint

This commit:

  • Adds a new 'default' type in Strapi that doesn't rely on any query params, adds the qr code url as a field option and references this instead
  • Adds PostVerifySetPassword page to the RelyingParty content-type with necessary fields, for customization via entrypoint

closes FXA-13476
closes FXA-12939


Strapi side @ mozilla/fxa-strapi#210

image image

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Strapi-backed CMS content for (1) the desktop “Promo QR” image on web-integration routes and (2) text/button overrides for the post-verify “Set Password” page via the RelyingParty CMS config.

Changes:

  • Introduces a new /v1/cms/web-content endpoint + shared CMS manager/query to fetch web-scoped CMS content (promo QR image URL).
  • Threads the new web-content payload into PromoQrMobile so the QR image can be overridden by CMS.
  • Adds PostVerifySetPasswordPage fields to relying-party CMS and applies CMS overrides (headline/description/button/title) on the Set Password page, with tests.

Reviewed changes

Copilot reviewed 19 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/fxa-settings/src/pages/PostVerify/SetPassword/mocks.tsx Updates mocks to support the narrowed integration type and CMS info injection.
packages/fxa-settings/src/pages/PostVerify/SetPassword/interfaces.ts Narrows the integration surface needed by SetPassword and updates prop typing.
packages/fxa-settings/src/pages/PostVerify/SetPassword/index.tsx Applies CMS overrides for headline/description/button/title on SetPassword.
packages/fxa-settings/src/pages/PostVerify/SetPassword/index.test.tsx Adds coverage for PostVerifySetPasswordPage CMS overrides.
packages/fxa-settings/src/models/integrations/relier-interfaces.ts Adds PostVerifySetPasswordPage to RelierCmsInfo and defines WebIntegrationCmsContent.
packages/fxa-settings/src/models/hooks.ts Adds useWebContentState to fetch /v1/cms/web-content.
packages/fxa-settings/src/components/PromoQrMobile/index.tsx Allows overriding the promo QR image URL via prop.
packages/fxa-settings/src/components/PromoQrMobile/index.test.tsx Tests CMS-provided QR URL override behavior.
packages/fxa-settings/src/components/App/index.tsx Fetches web-content and passes promoQrImageUrl into PromoQrMobile.
packages/fxa-auth-server/lib/routes/cms.ts Adds GET /cms/web-content route + cache invalidation for web-content model.
packages/fxa-auth-server/lib/routes/cms.spec.ts Adds route tests/mocks for /cms/web-content.
packages/fxa-auth-server/bin/key_server.js Registers WebContentConfigurationManager in DI container.
libs/shared/cms/src/lib/web-content-configuration.manager.ts Adds shared CMS manager for querying/invalidation of web-content.
libs/shared/cms/src/lib/queries/web-content/types.ts Defines result typing for the new web-content query.
libs/shared/cms/src/lib/queries/web-content/query.ts Adds GraphQL query for webContent { promoQrImageUrl }.
libs/shared/cms/src/lib/queries/web-content/index.ts Exports the new web-content query/types.
libs/shared/cms/src/lib/queries/relying-party/types.ts Extends relying-party result type with PostVerifySetPasswordPage.
libs/shared/cms/src/lib/queries/relying-party/query.ts Adds PostVerifySetPasswordPage selection to relying-party query.
libs/shared/cms/src/lib/queries/relying-party/factories.ts Updates factory to generate PostVerifySetPasswordPage test data.
libs/shared/cms/src/index.ts Exposes web-content manager and query exports from shared cms package.
libs/shared/cms/src/generated/graphql.ts Updates generated schema/types for WebContent + new relying-party page field.
libs/shared/cms/src/generated/gql.ts Updates generated document mapping to include WebContent + new relying-party query shape.
Files not reviewed (2)
  • libs/shared/cms/src/generated/gql.ts: Language not supported
  • libs/shared/cms/src/generated/graphql.ts: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/shared/cms/src/lib/default-configuration.manager.ts
Comment thread packages/fxa-auth-server/lib/routes/cms.ts Outdated
Comment thread packages/fxa-settings/src/components/App/index.tsx Outdated
@LZoog LZoog marked this pull request as ready for review April 20, 2026 19:54
@LZoog LZoog requested a review from a team as a code owner April 20, 2026 19:54
@LZoog LZoog force-pushed the FXA-13476.v2 branch 2 times, most recently from 55053ae to 770ef7a Compare April 20, 2026 20:02
@LZoog LZoog changed the title feat(strapi): Add mobile promo w/new content-type, add SetPassword RP customizations feat(strapi): Add mobile promo w/new 'default' content type, add SetPassword RP customizations Apr 20, 2026
… customizations

Because:
* We want to swap out the Kit QR code image and put it in our CMS, where Strapi is our tried and tested path
* We want to customize text on the "Set password for Sync" screen when users are coming in through a sync service but Send Tab entrypoint

This commit:
* Adds a new 'default' type in Strapi that doesn't rely on any query params, adds the qr code url as a field option and references this instead
* Adds PostVerifySetPassword page to the RelyingParty content-type with necessary fields, for customization via entrypoint

closes FXA-13476
closes FXA-12939
</Router>
{/* This must be placed after the routes so it's rendered at the bottom of the DOM. */}
<PromoQrMobile {...{ integration }} />
<PromoQrMobile
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should promo render be conditional on whether or not there is a url?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, maybe not, I see there is a fallback image imported in the component. No chance that QR code may become invalid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's possible, but I also wanted to provide the image as a fallback in case we push to stage / prod and Product does not immediately update the image. Since this promo has header text / a description also, we'd want to not render the entire thing if something's not provided, since that text is always rendered.

expect(isValidCmsUrl(value)).toBe(true);
});

it.each([
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👌

@LZoog LZoog merged commit 8aea17f into main Apr 21, 2026
21 checks passed
@LZoog LZoog deleted the FXA-13476.v2 branch April 21, 2026 14:51
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.

3 participants