Skip to content

IS-11768 HAAPI React App: move step symbols to the SDK/library layer - #305

Merged
luisgoncalves merged 2 commits into
devfrom
feature/dev/IS-11768-step-symbols-in-library-layer
Aug 26, 2026
Merged

IS-11768 HAAPI React App: move step symbols to the SDK/library layer#305
luisgoncalves merged 2 commits into
devfrom
feature/dev/IS-11768-step-symbols-in-library-layer

Conversation

@luisgoncalves

@luisgoncalves luisgoncalves commented Aug 25, 2026

Copy link
Copy Markdown
Contributor
  • Move PageSymbol from the app layer to haapi-react-sdk/haapi-stepper/ui/symbols/ as StepSymbol, with resolveStepSymbol alongside it.
  • Render it as a symbolElement step slot in HaapiStepperStepUI; BankID's built-in UI renders it, user consent omits it.
  • Delete the showPageSymbol user-consent special case — the built-in simply doesn't compose the slot.
  • Rename the bootstrap config field theme.pageSymbols -> theme.stepSymbols and the CSS classes to .haapi-stepper-step-symbol{,-image}.

I didnt add an interceptor for symbols to keep it simpler and because it's possible to control the bootstrap data from the server templates. We can consider that later, if needed.

Copilot AI 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.

Pull request overview

This PR centralizes HAAPI “step symbol” resolution and rendering in the haapi-react-sdk stepper package (instead of the HAAPI React App), and updates the server/bootstrap theme contract accordingly (theme.stepSymbols).

Changes:

  • Rename bootstrap theme config from theme.pageSymbols to theme.stepSymbols and update server template + previewer mock config.
  • Add SDK-level StepSymbol component and resolveStepSymbol utility (with tests), and render it from HaapiStepperStepUI / viewName built-in UIs.
  • Remove HAAPI React App’s page-symbol utilities/components/tests and update CSS selectors to the new SDK class names.

Reviewed changes

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

Show a summary per file
File Description
src/identity-server/templates/core/fragments/api-driven-ui/theme.vm Renames server-emitted theme config key to stepSymbols.
src/haapi-react-sdk/haapi-stepper/util/tests/mocks.ts Adds default theme.stepSymbols in stepper API test mocks.
src/haapi-react-sdk/haapi-stepper/ui/symbols/StepSymbol.tsx New SDK component to render a resolved step symbol.
src/haapi-react-sdk/haapi-stepper/ui/symbols/StepSymbol.spec.tsx Unit tests for StepSymbol behavior and resolution precedence.
src/haapi-react-sdk/haapi-stepper/ui/symbols/step-symbol-utils.ts New SDK utility for resolving symbol path from viewName + config.
src/haapi-react-sdk/haapi-stepper/ui/index.ts Exposes StepSymbol via the UI public barrel.
src/haapi-react-sdk/haapi-stepper/README.md Documents new CSS hooks for step symbol styling.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/UserConsentViewNameBuiltInUI.tsx Clarifies behavior to omit the step symbol for user consent built-in UI.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/typings.ts Adds symbolElement to built-in UI props contract.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/BankIdViewNameBuiltInUI.tsx Renders the injected symbolElement for BankID built-in UI.
src/haapi-react-sdk/haapi-stepper/feature/steps/step-element-factories.tsx Introduces getSymbolElement() factory for step symbol rendering.
src/haapi-react-sdk/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx Wires symbol element into default rendering and built-in UI prop injection.
src/haapi-react-sdk/haapi-stepper/feature/steps/HaapiStepperStepUI.spec.tsx Adds coverage for default symbol rendering and consent omission behavior.
src/haapi-react-sdk/haapi-stepper/feature/stepper/haapi-stepper.types.ts Renames pageSymbols to stepSymbols in the bootstrap theme types.
src/haapi-react-app/src/shared/util/page-symbol-utils.ts Removes app-local symbol resolution utilities (moved to SDK).
src/haapi-react-app/src/shared/util/css/styles.css Renames CSS selectors from page-symbol to step-symbol.
src/haapi-react-app/src/shared/ui/PageSymbol/PageSymbol.tsx Removes app-local PageSymbol component (replaced by SDK rendering).
src/haapi-react-app/src/shared/ui/PageSymbol/PageSymbol.spec.tsx Removes tests for the deleted PageSymbol component.
src/haapi-react-app/src/shared/ui/Layout/Layout.tsx Stops rendering a page symbol in the app layout.
src/haapi-react-app/src/shared/ui/Layout/Layout.spec.tsx Updates layout tests after removing page-symbol concerns and stepper context.
src/haapi-react-app/previewer/shared/ui/preview/Preview.tsx Removes page-symbol rendering from preview; relies on stepper UI.
src/haapi-react-app/previewer/Previewer.tsx Updates previewer mock bootstrap config to use theme.stepSymbols.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@luisgoncalves
luisgoncalves marked this pull request as ready for review August 25, 2026 15:42
@urre

urre commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

I like this overall. Good to move from the app layer to the SDK layer. Rename from "page" to "step" also makes sense here. I guess if you would have a "real page" somewhere in the app you could still use a StepSymbol? But in that case you possible want to use some other graphic or symbol

Comment thread src/haapi-react-sdk/haapi-stepper/ui/symbols/StepSymbol.tsx Outdated
Comment thread src/haapi-react-sdk/haapi-stepper/ui/symbols/StepSymbol.spec.tsx
@luisgoncalves
luisgoncalves merged commit e2c68fc into dev Aug 26, 2026
2 checks passed
@luisgoncalves
luisgoncalves deleted the feature/dev/IS-11768-step-symbols-in-library-layer branch August 26, 2026 13:10
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.

4 participants