Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions src/login-web-app/src/haapi-stepper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ Because the `HaapiStepperStepUI` handles all possible HAAPI authentication flows

Check out [the HaapiStepperStepUI documentation and usage examples](./feature/steps/HaapiStepperStepUI.tsx).

### ViewName built-in UIs

Some HAAPI viewNames (`step.metadata.viewName`) need a UI that the generic step rendering can't deliver well. For example, the **BankID** screen needs to render a spinner while the polling status is `pending`, and lifts the QR code above the actions.

To handle this kind of view, the library ships **viewName built-in UIs** that automatically take over when the matching `step.metadata.viewName` arrives from the server.

#### The `enableViewNameBuiltInUIs` prop

`<HaapiStepperStepUI>` accepts a
`enableViewNameBuiltInUIs?: HaapiStepperViewNameBuiltInUI[] | boolean` prop that opts in to which viewName built-in UIs are active. It is **opt-in**: when the prop is omitted (or `false`), no viewName built-in UIs are applied and every step renders through the generic render pipeline. Pass `true` to enable all known built-ins, or an array of built-in view names (`HaapiStepperViewNameBuiltInUI[]`) to pin a specific subset.

Check out documentation and usage examples in [`HaapiStepperStepUI`](./feature/steps/HaapiStepperStepUI.tsx), and the test use cases in [`HaapiStepperStepUI.spec.tsx`](./feature/steps/HaapiStepperStepUI.spec.tsx) (`describe('ViewName built-in UIs Rendering')`) for more details.

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.

This seems unrelated to this PR and duplicated from #150.



## HAAPI Stepper UI Components
Expand All @@ -128,12 +141,20 @@ The HAAPI Stepper UI components are the UI representation of the main HAAPI enti

Check out documentation and usage examples in the links below:

* [HaapiStepperFormUI](./feature/actions/form/HaapiStepperFormUI.tsx)
* [HaapiStepperSelectorUI](./feature/actions/selector/HaapiStepperSelectorUI.tsx)
* [HaapiStepperClientOperationUI](./feature/actions/client-operation/HaapiStepperClientOperationUI.tsx)
* [HaapiStepperMessagesUI](./ui/messages/HaapiStepperMessagesUI.tsx)
* [HaapiStepperLinksUI](./ui/links/HaapiStepperLinksUI.tsx)
* [HaapiStepperLinkUI](./ui/links/HaapiStepperLinkUI.tsx)
* [HaapiStepperStepUI](./feature/steps/HaapiStepperStepUI.tsx)
* [HaapiStepperActionsUI](./ui/actions/HaapiStepperActionsUI.tsx)
* [HaapiStepperFormUI](./feature/actions/form/HaapiStepperFormUI.tsx)
* [HaapiStepperFormFieldUI](./feature/actions/form/fields/HaapiStepperFormFieldUI.tsx)
* [HaapiStepperTextFormFieldUI](./feature/actions/form/fields/HaapiStepperTextFormFieldUI.tsx)
* [HaapiStepperPasswordFormFieldUI](./feature/actions/form/fields/HaapiStepperPasswordFormFieldUI.tsx)
* [HaapiStepperCheckboxFormFieldUI](./feature/actions/form/fields/HaapiStepperCheckboxFormFieldUI.tsx)
* [HaapiStepperSelectFormFieldUI](./feature/actions/form/fields/HaapiStepperSelectFormFieldUI.tsx)
* [HaapiStepperSelectorUI](./feature/actions/selector/HaapiStepperSelectorUI.tsx)
* [HaapiStepperClientOperationUI](./feature/actions/client-operation/HaapiStepperClientOperationUI.tsx)
* [HaapiStepperMessagesUI](./ui/messages/HaapiStepperMessagesUI.tsx)
* [HaapiStepperMessageUI](./ui/messages/HaapiStepperMessageUI.tsx)
* [HaapiStepperLinksUI](./ui/links/HaapiStepperLinksUI.tsx)
* [HaapiStepperLinkUI](./ui/links/HaapiStepperLinkUI.tsx)
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.

👍


### CSS Customization

Expand Down
Loading