Skip to content

IS-10847 Finish the HaapiStepper renames in the props interface and README - #306

Open
aleixsuau wants to merge 1 commit into
devfrom
fix/dev/IS-10847-stepper-renames-and-submit-spinner
Open

IS-10847 Finish the HaapiStepper renames in the props interface and README#306
aleixsuau wants to merge 1 commit into
devfrom
fix/dev/IS-10847-stepper-renames-and-submit-spinner

Conversation

@aleixsuau

@aleixsuau aleixsuau commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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

Purpose and context

Two components were renamed a while ago, but the rename stopped at the component names. The props interface and the README kept the old ones, so anyone reading the docs still saw <HaapiErrorNotifier>, which no longer exists.

This PR finishes that rename. It is documentation and a type name only. No behaviour changes.

…EADME.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

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

Completes the HAAPI stepper rename cleanups and improves UX/accessibility by introducing a form-scoped “submitting” state so only the submitted form’s button shows a spinner and becomes disabled while its request is in flight.

Changes:

  • Rename remaining stale “HaapiErrorNotifier” / “HaapiValidationErrorInputWrapper” references in docs and props typing.
  • Add isSubmitting to the form context and set it based on whether this form initiated the current stepper loading transition.
  • Show a submit-button spinner (with aria-busy + disabled) during submission, and update Spinner SVG to scale correctly at smaller sizes.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/haapi-react-sdk/haapi-stepper/ui/spinner/Spinner.tsx Adds viewBox to allow SVG scaling for smaller spinner usage (e.g., in buttons).
src/haapi-react-sdk/haapi-stepper/README.md Updates README examples/headings to renamed stepper utility component names.
src/haapi-react-sdk/haapi-stepper/feature/stepper/HaapiStepperErrorNotifier.tsx Renames the props interface to match the component name.
src/haapi-react-sdk/haapi-stepper/feature/actions/form/HaapiStepperFormUI.tsx Introduces form-scoped submit tracking and exposes isSubmitting via form context.
src/haapi-react-sdk/haapi-stepper/feature/actions/form/HaapiStepperFormSubmitButton.tsx Renders spinner + sets aria-busy and disables the button while submitting.
src/haapi-react-sdk/haapi-stepper/feature/actions/form/HaapiStepperFormSubmitButton.spec.tsx Adds tests for the form-scoped pending/spinner behavior.
src/haapi-react-sdk/haapi-stepper/feature/actions/form/HaapiStepperFormContext.ts Extends the form context value with isSubmitting.

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

Comment on lines 22 to 26
role="img"
aria-labelledby="svgTitle"
focusable="false"
viewBox={`0 0 ${SIZE} ${SIZE}`}
width={SIZE}
Comment on lines +196 to +199
// A step can render several forms, and `loading` is shared by the whole stepper. Gating on a ref
// set by this form's own submit keeps the pending state on the form the user actually submitted.
// Reading the ref during render is safe here because only a `loading` change re-renders us, and
// the ref is always set before the request that flips it starts.
Comment on lines +264 to +268
const { ui, action } = renderFormInStepper(false);
const { rerender } = render(ui);

await userEvent.click(screen.getByTestId(submitButtonTestId));
rerender(
Comment on lines 51 to 54
{isSubmitting ? (
<span className="icon" data-testid="form-submit-button-spinner">
<Spinner width={16} height={16} />
</span>
@aleixsuau
aleixsuau force-pushed the fix/dev/IS-10847-stepper-renames-and-submit-spinner branch from c39849a to 00299fa Compare August 26, 2026 13:04
@aleixsuau aleixsuau changed the title IS-10847 Finish the HaapiStepper renames and show a spinner while a form submits IS-10847 Finish the HaapiStepper renames in the props interface and README Aug 26, 2026
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.

2 participants