-
Notifications
You must be signed in to change notification settings - Fork 91
feat(pf4): introduce StepTemplate #648
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
- component allowing to define custom steps - also this commit allows to define more props in step definitions
I skipped the one async wizard tests. We have to deal with it later. |
Codecov Report
@@ Coverage Diff @@
## master #648 +/- ##
==========================================
+ Coverage 92.99% 93.00% +0.01%
==========================================
Files 189 189
Lines 3010 3015 +5
Branches 989 990 +1
==========================================
+ Hits 2799 2804 +5
Misses 211 211
Continue to review full report at Codecov.
|
title?: ReactNode; | ||
formFields: ReactNode; | ||
showTitles?: boolean; | ||
showTitle?: boolean; |
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.
What is the difference between showTitle
and showTitles
? Maybe we could use different names?
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.
ShowTitles is on wizard, ShowTitle is on step
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.
Maybe rename the showTitle
to something like show header? The difference is so tiny that I had to read it 3 times to notice the plural.
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.
It doesn't matter. showTitles is set in wizard definition. showTitle in wizard step.
Renaming it would be a breaking change.
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.
Ah. Well, that is a bummer. I was not aware it was used already. Nothing we can to at this point.
@@ -157,7 +159,8 @@ WizardInternal.propTypes = { | |||
closeButtonAriaLabel: PropTypes.string, | |||
hasNoBodyPadding: PropTypes.bool, | |||
navAriaLabel: PropTypes.string, | |||
container: PropTypes.instanceOf(Element) | |||
container: PropTypes.instanceOf(Element), | |||
StepTemplate: PropTypes.func |
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.
What if somebody provides a class component? I would use the componentType
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.
Don't you think elementType?
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.
yeah
🎉 This PR is included in version 2.7.0 🎉 The release is available on Demo can be found here! |
Example:
cc @PanSpagetka