Skip to content

IS-11275 LWA: viewName built-in UIs (first: BankID wait UI)#150

Open
aleixsuau wants to merge 4 commits into
integration/IS-5161/login-web-appfrom
feature/IS-11275/viewname-default-render-interceptors
Open

IS-11275 LWA: viewName built-in UIs (first: BankID wait UI)#150
aleixsuau wants to merge 4 commits into
integration/IS-5161/login-web-appfrom
feature/IS-11275/viewname-default-render-interceptors

Conversation

@aleixsuau
Copy link
Copy Markdown

@aleixsuau aleixsuau commented Apr 29, 2026

Jira: https://curity.atlassian.net/browse/IS-11275

Summary

Adds the built-in viewName UIs feature. The first use case covered is the BankID view name (authenticator/bankid/wait/index) to display:

  • Persistent spinner while polling status is pending (independent of loading).
  • QR code link rendered above the actions.

Read added docs (ui-kit/src/login-web-app/src/haapi-stepper/README.md:117, and ui-kit/src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx:84) and tests (ui-kit/src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx:84) for more details.

Test plan

  • Manual smoke against a running BankID flow (spinner persists during `pending`, drops on `done`/`failed`; QR rendered above the action group)

Notes

  • This branch is on top of `feature/IS-11241/rename-haapistepper-ui-components` and depends on the renames there. Once IS-11241 lands on `integration/IS-5161/login-web-app`, this branch should rebase onto integration.
  • The opt-in default (`undefined`) means existing consumers don't visibly change after this lands; new built-ins are purely additive.

@aleixsuau aleixsuau marked this pull request as ready for review April 29, 2026 08:49
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

Introduces an opt-in “viewName built-in UIs” mechanism for HaapiStepperStepUI, with an initial built-in UI implementation for the BankID polling view (authenticator/bankid/wait/index) to improve UX (persistent polling spinner + QR link positioning).

Changes:

  • Adds a viewName-to-built-in-UI registry (getViewNameBuiltInUI, enum + map) and integrates it into HaapiStepperStepUI behind the enableViewNameBuiltInUIs prop.
  • Implements BankIdViewNameBuiltInUI to show a polling-status-based spinner and render the QR link above actions.
  • Extends test mocks and adds unit tests + README docs covering the new opt-in behavior.

Reviewed changes

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

Show a summary per file
File Description
src/login-web-app/src/haapi-stepper/util/tests/mocks.ts Adds BankID polling step and QR link helpers for new tests.
src/login-web-app/src/haapi-stepper/feature/viewnames/viewname.types.ts Introduces enum of viewNames with built-in UIs.
src/login-web-app/src/haapi-stepper/feature/viewnames/viewname-built-in-uis.ts Adds registry + selection logic for built-in UIs.
src/login-web-app/src/haapi-stepper/feature/viewnames/index.ts Barrel exports for the new viewnames feature.
src/login-web-app/src/haapi-stepper/feature/viewnames/BankIdViewNameBuiltInUI.tsx BankID-specific built-in UI rendering.
src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.tsx Integrates built-in UI selection via new enableViewNameBuiltInUIs prop.
src/login-web-app/src/haapi-stepper/feature/steps/HaapiStepperStepUI.spec.tsx Adds tests validating built-in UI opt-in + BankID behavior.
src/login-web-app/src/haapi-stepper/README.md Documents the new built-in UI feature and how to enable it.

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

Comment thread src/login-web-app/src/haapi-stepper/util/tests/mocks.ts
Comment thread src/login-web-app/src/haapi-stepper/feature/viewnames/BankIdViewNameBuiltInUI.tsx Outdated
@aleixsuau aleixsuau force-pushed the feature/IS-11241/rename-haapistepper-ui-components branch from 429ab4c to 66b0634 Compare April 30, 2026 13:24
@aleixsuau aleixsuau changed the base branch from feature/IS-11241/rename-haapistepper-ui-components to integration/IS-5161/login-web-app May 7, 2026 09:40
aleixsuau and others added 2 commits May 7, 2026 11:47
Rename the six UI components (Actions, Link, Links, Messages, ClientOperation,
HaapiSelector) plus HaapiStepperForm and the message element factory to the
existing HaapiStepper<Name>UI convention. This disambiguates the React
components from the HAAPI data interfaces they render (HaapiStepperLink vs
HaapiStepperLinkUI, etc.), preventing import collisions and making it obvious
at a glance which layer is being referenced. Also fixes stale HaapiUIStep and
Form.tsx references in README and JSDoc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aleixsuau aleixsuau force-pushed the feature/IS-11275/viewname-default-render-interceptors branch from 872d350 to e2ec03d Compare May 7, 2026 09:50
Comment thread src/login-web-app/src/haapi-stepper/README.md Outdated
Comment thread src/login-web-app/src/haapi-stepper/util/tests/mocks.ts
Comment thread src/login-web-app/src/haapi-stepper/util/tests/mocks.ts
Comment thread src/login-web-app/src/haapi-stepper/README.md Outdated
*
* The HaapiStepperStepUI component also provides built-in UIs for specific HAAPI `viewName`s that require a more
* tailored UI than the generic step shell can provide (e.g. the BankID QR code step, which requires lifting
* the QR code up and showing a spinner while polling).
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.

Again, I don't think this is needed as it makes it look like the default is flawed.

* - `false` or `undefined` to keep all built-ins disabled (every view renders through the
* generic shell).
*
* Composition: the matching viewName built-in UI is rendered after the `stepRenderInterceptor` has processed the
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.

👍

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