-
Notifications
You must be signed in to change notification settings - Fork 52
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
Wizard: Add beforeNext conditions to Details step footer #2392
base: main
Are you sure you want to change the base?
Conversation
@ezr-ondrej This is what I had in mind in #2305 (comment), what do you think? Would this make sense? edit: to also add some arguments - this would be consistent with the FSC step, so it's a pattern we already use. The error wouldn't jump at the user prematurely, but at the time when they're happy with how they filled up the step and would like to continue. And this should also be compatible with the "always blue" strategy of Next button being always enabled unless there's a problem that need to be resolved. |
7f3de68
to
98503f9
Compare
98503f9
to
59ea942
Compare
looks good, just small suggestion |
59ea942
to
2fc5501
Compare
To continue the discussion we had with @ezr-ondrej #2305 (comment) - does this make sense or not for our use case? @lucasgarfield @mgold1234 With the way things are set up in PatternFly validation we have two options of showing the user validation errors. This will be specifically for the Details step's Blueprint name input, but there are several places where similar problem occurs (snapshot validation comes to mind):
A fair point is that the always enabled Next even with incorrect values might feel like a bait. On the other hand I feel it's a bit more transparent, but to be honest I'm very much undecided on this. What do you think? |
2fc5501
to
f2cdc86
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #2392 +/- ##
==========================================
+ Coverage 75.71% 83.68% +7.97%
==========================================
Files 33 153 +120
Lines 597 17243 +16646
Branches 144 1678 +1534
==========================================
+ Hits 452 14430 +13978
- Misses 139 2794 +2655
- Partials 6 19 +13
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
f2cdc86
to
6c8801b
Compare
6c8801b
to
c5b7ec0
Compare
da04578
to
dd717e9
Compare
This adds beforeNext condition to the custom Details step footer, allowing to validate after clicking Next. That way the button is enabled, but gets disabled in the case validation errors and the helper text with the error renders immediately.
dd717e9
to
a4fdde9
Compare
This adds beforeNext condition to the custom Details step footer, allowing to validate after clicking Next. That way the button is enabled, but gets disabled in the case validation errors and the helper text with the error renders immediately.