Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: submitting a form after an error #443

Open
pbastia opened this issue Dec 11, 2024 · 1 comment
Open

Bug: submitting a form after an error #443

pbastia opened this issue Dec 11, 2024 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@pbastia
Copy link
Contributor

pbastia commented Dec 11, 2024

Describe the Bug:

The form submit logic is broken when the form has had errors.
This was fixed (the dirty way) for anything using the MultiStepFormWithTasklist component in #438

  • Fix (fast and dirty): add an onError={() => setCanContinue(false)} on each of the impacted forms
  • Fix (better but a bit more work): refactor the ReportingStepButtons component to include the logic for "canContinue" and the useEffect. To submit the form, we'll just need to grab a ref for the button with the submit tag and call click() on it if we can continue.
    This way we can remove all the external logic on all the form components

Probability:

(How likely the bug is to happen, scored from 1-5. For example, probability of 5 is something like "it happens to all users every time they log in." whereas probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")

Impact:

(How bad the bug is when it does happen, scored from 1-5. For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected." whereas effect of 1 is "It makes some styling look a little bit weird.")

Bug Matrix

Steps to reproduce the behaviour:

  1. Step Lets use common phrasing #1
  2. Step Add missing topics #2
  3. Step Add project lifecycle badge #3

Screenshots:

Additional information:

OS: [e.g. iOS]
Browser: [e.g. chrome, safari]
Version: [e.g. 22]

Additional Context

@pbastia
Copy link
Contributor Author

pbastia commented Jan 7, 2025

This card might address #476 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant