IS-10847 Extract HaapiStepperMessageUI component#145
Draft
aleixsuau wants to merge 1 commit intofeature/IS-11241/rename-haapistepper-ui-componentsfrom
Draft
Conversation
… factory. Split the single-message rendering logic out of defaultHaapiStepperMessageElementFactory into its own HaapiStepperMessageUI component, mirroring the Link/LinkUI pattern. This fills the singular-component gap in the public API (previously only the plural HaapiStepperMessagesUI was exported for messages) and lets consumers render a single message directly without reaching through the factory. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extracts the single-message rendering logic into a dedicated HaapiStepperMessageUI component and updates the default message element factory to use it, aligning the messages API with the existing link component/factory pattern and enabling consumers to render a single message directly.
Changes:
- Added
HaapiStepperMessageUIcomponent for rendering a singleHaapiStepperUserMessage. - Refactored
defaultHaapiStepperMessageElementFactoryto delegate toHaapiStepperMessageUI. - Exported
HaapiStepperMessageUIfrom the UI barrel (ui/index.ts) to make it part of the public API.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/login-web-app/src/haapi-stepper/ui/messages/defaultHaapiStepperMessageElementFactory.tsx | Simplifies the default factory to render via the extracted single-message UI component. |
| src/login-web-app/src/haapi-stepper/ui/messages/HaapiStepperMessageUI.tsx | Introduces the new public component encapsulating message classList-based rendering. |
| src/login-web-app/src/haapi-stepper/ui/index.ts | Exports HaapiStepperMessageUI to close the single-message public API gap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luisgoncalves
approved these changes
Apr 22, 2026
urre
approved these changes
Apr 22, 2026
aleixsuau
added a commit
that referenced
this pull request
Apr 22, 2026
- HaapiStepper.tsx JSDoc example: import HaapiStepperFormUI (not the non-existent `Form` from `../actions/form/Form`), use it in place of <Form>, and destructure `selectorActions` from `currentStep.dataHelpers` so the snippet is copy/pasteable and type-checks. - README: drop the dangling link to HaapiStepperMessageUI (that component is extracted in IS-10847 / PR #145, not in this one). - README: fix the stale `#haapi-ui-components` anchors — the section was renamed to "HAAPI Stepper UI Components", so update the two in-page links to `#haapi-stepper-ui-components`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
defaultHaapiStepperMessageElementFactoryinto a dedicatedHaapiStepperMessageUIcomponent, mirroring the existingHaapiStepperLinkUI/defaultHaapiStepperLinkElementFactorypattern.HaapiStepperMessagesUIwas exported for messages, so consumers had no direct way to render a single message.integration/IS-5161/login-web-app.Jira: IS-10847 (umbrella: Haapi Stepper UI optimizations)
Test plan
HaapiStepperMessageUIrenders correctly for each message classList variant (heading,userCode,userName, default)