Reform and improve error handling on trial creation
requested to merge 411514-add-help-text-to-the-new-group-name-field-when-signing-up-for-a-trial into master
What does this MR do and why?
- Moves the namespace errors from the top part of the form to be around the input with help text as per reasons in #411514 (closed)
-
📓 this is not a frontend validation and will still be only appearing from backend result after clicking submit
-
- Moves the top of the form alerting for trial and lead failure to ViewComponent setup as there is no need for JS and setup for it.
- Adopts a declarative model for figuring out the error display logic that is needed. We figure it out once in the controller layer on failure and then render the correct view with conditions based upon that.
ee/spec/features/trials/saas
cover the full flow of these items
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Setup to simulate SaaS and restart GDK
- Visit
/-/trials/new
- Fill out anything
- Submit form and notice the error display(no change)
- Visit
/-/trials/new?step=trial
- Select or create a namespace and submit form.
- Notice the global form error(no change)
- Visit
/-/trials/new?step=trial
- Select create group and input
@blah
- Submit and notice the new error display around the input.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #411514 (closed)
Edited by Doug Stull