Skip to content

IS-11346: render page symbols for HAAPI steps#210

Merged
aleixsuau merged 28 commits into
integration/IS-5161/login-web-appfrom
feature/IS-5161/IS-11346-display-page-symbols
Jun 2, 2026
Merged

IS-11346: render page symbols for HAAPI steps#210
aleixsuau merged 28 commits into
integration/IS-5161/login-web-appfrom
feature/IS-5161/IS-11346-display-page-symbols

Conversation

@aleixsuau
Copy link
Copy Markdown
Contributor

@aleixsuau aleixsuau commented May 28, 2026

IS-11346-dev-mock.patch
Jira: https://curity.atlassian.net/browse/IS-11346

Summary

LWA-side rendering of theme.pageSymbols (which IS-11318 wires up server-side). A new <PageSymbol> component resolves a symbol URL for the current step's HAAPI viewName and renders it above the step's messages/actions/links.

Resolution order in resolvePageSymbol:

  1. exact match in pageSymbols.views[viewName]
  2. plugin-type match in pageSymbols.plugins[<pluginType>]<pluginType> is the middle segment of viewNames shaped authenticator | authentication-action | consentor / <pluginType> / …
  3. fallback to pageSymbols.default
  4. otherwise renders nothing

The BankID built-in places the symbol above the lifted QR link via a new pageSymbolElement slot in ViewNameBuiltInUIProps.

To test, apply the following patch file and change DEV_PAGE_SYMBOLS.views and DEV_PAGE_SYMBOLS.plugins to emulate the use cases.

IS-11346-dev-mock.patch

Adds the LWA-side rendering of `theme.pageSymbols`. The `PageSymbol`
component resolves the symbol URL for the current step's HAAPI
`viewName` against the bootstrap configuration's `pageSymbols` map:

  1. exact match in `views[viewName]`
  2. plugin-type match in `plugins[<pluginType>]` (extracted from the
     `authenticator | authentication-action | consentor` viewName format)
  3. fallback to `default`
  4. otherwise renders nothing

Wired into `HaapiStepperStepUI` so the symbol renders above the step's
messages/actions/links, with a slot in `ViewNameBuiltInUIProps` so the
BankID built-in places it above the lifted QR link.
Copy link
Copy Markdown
Contributor

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 client-side support for rendering per-step icons ("page symbols") in the HAAPI stepper, resolving an image from the new theme.pageSymbols bootstrap config based on the current step's viewName. The symbol is rendered above the step's messages/actions/links in both the generic shell and the BankID built-in UI.

Changes:

  • Adds PageSymbols to the bootstrap config plus a resolvePageSymbol util implementing exact-view → plugin-type → default precedence.
  • Introduces a <PageSymbol> component and renders it at the top of HaapiStepperStepUI, threading it as a new pageSymbolElement slot into ViewNameBuiltInUIProps / BankIdViewNameBuiltInUI.
  • Adds CSS for .haapi-stepper-page-symbol and unit tests for the resolver, the component, and the step-level placement (including BankID).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/login-web-app/src/haapi-stepper/data-access/bootstrap-configuration.ts Adds PageSymbols type and optional theme.pageSymbols field.
src/login-web-app/src/shared/util/resolve-page-symbol.ts Implements view/plugin/default resolution.
src/login-web-app/src/shared/ui/PageSymbol.tsx New component that reads theme config and renders the symbol image.
src/login-web-app/src/shared/ui/PageSymbol.spec.tsx Unit tests covering precedence and no-render cases.
src/login-web-app/src/shared/util/css/styles.css Adds .haapi-stepper-page-symbol styling.
src/login-web-app/src/haapi-stepper/feature/viewnames/typings.ts Adds pageSymbolElement to ViewNameBuiltInUIProps.
src/login-web-app/src/haapi-stepper/feature/viewnames/BankIdViewNameBuiltInUI.tsx Renders the page symbol above the lifted QR link.
src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx Creates pageSymbolElement and renders it before other slots.
src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.spec.tsx Wraps tests in AppConfigContext and adds page-symbol placement tests.

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

Comment thread src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx Outdated
@aleixsuau aleixsuau requested review from urre and vahag-curity May 29, 2026 12:15
@aleixsuau aleixsuau marked this pull request as ready for review May 29, 2026 13:14
aleixsuau and others added 6 commits May 29, 2026 16:19
Adds the LWA-side rendering of `theme.pageSymbols`. The `PageSymbol`
component resolves the symbol URL for the current step's HAAPI
`viewName` against the bootstrap configuration's `pageSymbols` map:

  1. exact match in `views[viewName]`
  2. plugin-type match in `plugins[<pluginType>]` (extracted from the
     `authenticator | authentication-action | consentor` viewName format)
  3. fallback to `default`
  4. otherwise renders nothing

Wired into `HaapiStepperStepUI` so the symbol renders above the step's
messages/actions/links, with a slot in `ViewNameBuiltInUIProps` so the
BankID built-in places it above the lifted QR link.
…b.com:curityio/ui-kit into feature/IS-5161/IS-11346-display-page-symbols
@aleixsuau aleixsuau changed the base branch from fix/integration/IS-5161/login-web-app/IS-11345-display-logos to integration/IS-5161/login-web-app June 1, 2026 09:34
aleixsuau and others added 7 commits June 1, 2026 11:52
Adds the LWA-side rendering of `theme.pageSymbols`. The `PageSymbol`
component resolves the symbol URL for the current step's HAAPI
`viewName` against the bootstrap configuration's `pageSymbols` map:

  1. exact match in `views[viewName]`
  2. plugin-type match in `plugins[<pluginType>]` (extracted from the
     `authenticator | authentication-action | consentor` viewName format)
  3. fallback to `default`
  4. otherwise renders nothing

Wired into `HaapiStepperStepUI` so the symbol renders above the step's
messages/actions/links, with a slot in `ViewNameBuiltInUIProps` so the
BankID built-in places it above the lifted QR link.
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.

👍

Comment thread src/login-web-app/src/haapi-stepper/data-access/bootstrap-configuration.ts Outdated
Comment thread src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx Outdated
@luisgoncalves
Copy link
Copy Markdown
Contributor

Commit list looks a bit funky. Could be good to improve, but maybe it's harmless.

Copy link
Copy Markdown
Contributor

@luisgoncalves luisgoncalves left a comment

Choose a reason for hiding this comment

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

Latest version LGTM

Comment thread src/login-web-app/previewer/Previewer.tsx Outdated
aleixsuau added 2 commits June 2, 2026 11:16
…b.com:curityio/ui-kit into feature/IS-5161/IS-11346-display-page-symbols
@aleixsuau aleixsuau merged commit f20dc4e into integration/IS-5161/login-web-app Jun 2, 2026
4 checks passed
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.

5 participants