-
Notifications
You must be signed in to change notification settings - Fork 65
Wizard: Add beforeNext conditions to Details step footer #2392
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
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% 84.19% +8.48%
==========================================
Files 33 157 +124
Lines 597 17734 +17137
Branches 144 1764 +1620
==========================================
+ Hits 452 14931 +14479
- Misses 139 2782 +2643
- Partials 6 21 +15
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
f2cdc86 to
6c8801b
Compare
6c8801b to
c5b7ec0
Compare
dd717e9 to
a4fdde9
Compare
31abc03 to
817f5db
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
817f5db to
a635277
Compare
mgold1234
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
d5dcbd9 to
1f32f34
Compare
8beb19e to
41a00a6
Compare
41a00a6 to
7a253e7
Compare
7a253e7 to
b308ae7
Compare
ezr-ondrej
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here, I think this is a sane aproach 👍
Slight disadvantage is that we are still incorrect in some cases (you can't go next, but the button is blue). But it's better then the alternative today - keeping the button disabled even if you could continue and there is just lag.
b308ae7 to
4550bc7
Compare
|
Aah right, this will break the IQE tests I guess. 🤔 The original behaviour of Details step when entering an invalid blueprint name was that the Next button got disabled, but no error was rendered. The new behaviour should be that the Next button is enabled, but when clicking on it the validation kicks in, disables the button and the error gets immediately rendered (when the form is pristine only). @jrusz @tkoscieln would you have time to take a look at this please? It's not urgent, we'll also probably need to support both scenarios while the changes are soaking in the stage. |
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.
4550bc7 to
dbb946a
Compare
|
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
|
This is a bit stale. Might revisit how we're doing validation and informing users about errors later, but closing for now. |

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.