Skip to content

Conversation

@harshrajeevsingh
Copy link
Contributor

@harshrajeevsingh harshrajeevsingh commented Oct 3, 2025

Description

Closes: #5386

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.85%. Comparing base (6bec3e2) to head (d6561ee).
⚠️ Report is 814 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6101   +/-   ##
=======================================
  Coverage   76.85%   76.85%           
=======================================
  Files         381      381           
  Lines       19272    19272           
  Branches     4641     4641           
=======================================
  Hits        14812    14812           
  Misses       4460     4460           
Flag Coverage Δ
backend 76.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@harshrajeevsingh
Copy link
Contributor Author

@cstns review

@cstns cstns self-requested a review October 13, 2025 07:25
Copy link
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

The fix is halfway there, currently I'm able to skip steps with mandatory/required information:

multi-step-form.mp4

You'll need to take some things into consideration:

  • some steps have mandatory/required information that should block step advancement
  • until those steps are mounted, we have no way of knowing if the information they contain is mandatory or not
  • the fix would need to be added in the common MultiStepForm and it should be picked up automatically by any form that implements it in an identical format/manner
  • in order to allow navigation to forward steps (even when skipping steps) you'd need to know the state of all previous steps up to the one you'd want to navigate to

Looking at the code, I now realize that I haven't followed a common pattern to pass errors or the hasError state properly so it could complicate things a bit. One fix would be to normalize that between steps, but it's not required.

Another way to approach this would be to add a new key to each step that would represent if the step was mounted (and defer from it if it had mandatory/required steps) and not allow users to move to a step if:

  • any previous steps have not been rendered yet
  • any previous steps has required information / errors that have not been filled in or resolved

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.

UX: multi-stage form shows mouse pointer on the stages when they cannot be clicked

2 participants