Skip to content

AUT-4297: Add mobile channel#2791

Closed
alhcomer wants to merge 11 commits into
mainfrom
AUT-4297/add-mobile-channel
Closed

AUT-4297: Add mobile channel#2791
alhcomer wants to merge 11 commits into
mainfrom
AUT-4297/add-mobile-channel

Conversation

@alhcomer

@alhcomer alhcomer commented May 19, 2025

Copy link
Copy Markdown
Contributor

What

Accept 'generic_app' as a valid channel on the FE and render the same pages and content as the strategic app when res.locals.genericApp is true. This is done by referencing the new res.locals.isApp parameter in templates, which is true when either of the aforementioned res.locals params are true.

How to review

  1. Code Review

Checklist

  • Performance analyst has been notified of the change.
  • A UCD review has been performed.
  • Documentation has been updated to reflect these changes.

Related PRs

@alhcomer alhcomer requested review from a team as code owners May 19, 2025 08:48
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch from 5aa8000 to dd3418e Compare May 19, 2025 08:49
Comment thread src/components/account-not-found/tests/account-not-found-controller.test.ts Outdated
Comment thread src/components/sign-in-or-create/tests/sign-in-or-create-controller.test.ts Outdated
Comment thread src/middleware/tests/channel-middleware.test.ts
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch 4 times, most recently from 227ef63 to ed01176 Compare May 22, 2025 06:40
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch from f05b4ea to 1a7c947 Compare May 22, 2025 06:57
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch from 1a7c947 to 0c1e1e1 Compare May 22, 2025 09:21

@GHSwallow GHSwallow left a comment

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.

looking good! Just some musings

Comment thread src/components/common/layout/base.njk
Comment thread src/components/mfa-reset-with-ipv/mfa-reset-with-ipv-controller.ts
Comment thread src/components/account-created/account-created-controller.ts
Comment thread test/unit/error-handler.test.ts
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch from 0c1e1e1 to e53f85b Compare May 27, 2025 09:50
Comment thread src/components/common/layout/tests/base-integration.test.ts Outdated
Comment thread src/components/mfa-reset-with-ipv/tests/mfa-reset-with-ipv-integration.test.ts Outdated
Comment thread src/components/mfa-reset-with-ipv/tests/mfa-reset-with-ipv-integration.test.ts Outdated
Comment thread src/components/security-code-error/index-too-many-requests.njk Outdated
alhcomer added 10 commits May 28, 2025 08:17
Accept 'generic_app' as a valid channel on the FE and render the same mobile
pages as the strategic app when res.locals.genericApp is true.
Have added an isApp res.locals param that is true if genericApp or strategicApp
is true. This value is then used in templates.
- When genericApp is true content is now the same in base.njk
  as when strategicAppChannel is true. If either is true
  res.locals.isApp is set to true, passed to template and
  used as a conditional.
- res.locals.isApp is true if channel is generic_app or strategic_app
- Also deleted explicitly passed params to res.render.
- - These are not needed as res.locals are inherently passed to the
    template by res.render
- If res.locals.strategicApp or res.locals.genericApp res.locals.isApp
  is set to true
- This is then passed to mfa-reset-with-ipv templates as a conditional
  for content. This ensures the same app content is shown for both
  strategic app and generic app channels.
- If res.locals.strategicApp or res.locals.genericApp are true,
  res.locals.isApp is set to true
- This is then passed to account created templates as a conditional
  for content. This ensures the same app content is shown for both
  strategic app and generic app channels.
- The channel is set in the channel middleware when orch handover
  to auth.
- If res.locals.strategicApp or res.locals.genericApp are true,
  res.locals.isApp is set to true
- This is then passed to error handler templates as a conditional
  for content. This ensures the same app content is shown for both
  strategic app and generic app channels.
- The channel is set in the channel middleware when orch handover
  to auth.
- Also deleted unnecessary explicit params passed to res.render.
  res.render inherently uses res.locals values when rendering
  templates.
- If res.locals.strategicApp or res.locals.genericApp are true,
  res.locals.isApp is set to true
- This is then passed to sec code error templates as a conditional
  for content. This ensures the same app content is shown for both
  strategic app and generic app channels.
- The channel is set in the channel middleware when orch handover
  to auth.
- Also deleted unnecessary explicit params passed to res.render.
  res.render inherently uses res.locals values when rendering
  templates.
- res.locals.isApp is set to true if the channel is generic_app
  or strategic_app
- The tests weren't able to run locally without the imports despite
running successfully in GHA
- Also deleted unnecessary res.locals.strategicAppChannel assignment
@alhcomer alhcomer force-pushed the AUT-4297/add-mobile-channel branch from e53f85b to 5c0c5b7 Compare May 28, 2025 07:17
@sonarqubecloud

Copy link
Copy Markdown

@GHSwallow GHSwallow closed this May 28, 2025
@GHSwallow GHSwallow deleted the AUT-4297/add-mobile-channel branch May 28, 2025 14:29
@alhcomer alhcomer restored the AUT-4297/add-mobile-channel branch May 28, 2025 14:42
@alhcomer alhcomer deleted the AUT-4297/add-mobile-channel branch May 28, 2025 14:56
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