Skip to content

feat(@dpc-sdp/ripple-ui-forms): adds ability to control form step progression [SD-1587]#1358

Open
dylankelly wants to merge 3 commits intomainfrom
feature/steps-control
Open

feat(@dpc-sdp/ripple-ui-forms): adds ability to control form step progression [SD-1587]#1358
dylankelly wants to merge 3 commits intomainfrom
feature/steps-control

Conversation

@dylankelly
Copy link
Contributor

Issue: https://digital-vic.atlassian.net/browse/SD-1587

What I did

  • Adds ability to pass down beforeStepChange function. This allows step progression to be controlled based upon form values, etc.
  • Adds multi step form story, including example beforeStepChange function to demonstrate branching logic flow
  • Adds parentStep property to RplFormStep. This will make the step not appear in the progress bar, and hte parent step will appear as the active step. This can be used to have child steps that do not appear in the navigation, which is needed for branching logic.
  • Fixes some imports for missing components (RplProgress, RplSummaryList, RplFormAlert)
  • Adds a basic multi step component test

How to test

  • See multi step form navigation in storybook. Use the value "test" in the organisation field to proceed to the eligible step, all other values will say not eligible

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed
  • I've updated the documentation site as needed
  • I have added tests to cover my changes (if not applicable, please state why in a comment)

For new UI components only

  • I have added a storybook story covering all variants
  • I have checked a11y tab in storybook passes
  • I have added cypress component tests (if the component is interactive)
  • Any events are emitted on the event bus using emitRplEvent

@dylankelly dylankelly self-assigned this Mar 1, 2026
@dylankelly dylankelly requested review from a team, jeffdowdle and lambry March 1, 2026 23:30
@jeffdowdle
Copy link
Contributor

jeffdowdle commented Mar 1, 2026

Do you think this same function can be used to determine if the 'next' button should be disabled/hidden etc?

@dylankelly
Copy link
Contributor Author

Do you think this same function can be used to determine if the 'next' button should be disabled/hidden etc?

hmmm, I dont think so because it runs on step change and the button is already rendered. We can easily add a props at the step level to disable the next / prev button, might add it in a seperate PR. I dont think we need to make it conditional at this point.

@dylankelly dylankelly changed the title feat(ripple-ui-forms): adds ability to control form step progression [SD-1587] feat(@dpc-sdp/ripple-ui-forms): adds ability to control form step progression [SD-1587] Mar 2, 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.

3 participants