| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The css require at least "@patternfly/patternfly": "2.28.0" dependency but only has "@patternfly/patternfly": "2.27.3". Should it be resolved in this PR? |
Sorry, something went wrong.
| height?: number | string; | ||
| /** The wizard title */ | ||
| title: string; | ||
| title?: string; |
There was a problem hiding this comment.
title is now optional, because the header is not rendered in in-page wizard
Sorry, something went wrong.
There was a problem hiding this comment.
The default wizard requires a title currently, and per conversations with @mcarrano here (patternfly/patternfly#2191) I believe we want to keep it that way. Making it optional creates these 2 scenarios:
Title/description is undefined renders an empty header, and the header is required at a minimum to position the close button.
Title is undefined but a description exists, which seems to work OK, but we haven't really accounted for that in core and I'm not sure we want to allow that per the design:
Can we make this optional if isInPage is true? And technically it isn't optional - the entire header shouldn't render if using an in-page wizard, so title and description shouldn't be allowed.
Sorry, something went wrong.
There was a problem hiding this comment.
We can change the title to optional here since it technically is not always required. However, can you generate a warning if the title is not provided AND isModal is true.
Sorry, something went wrong.
| const newId = Wizard.currentId++; | ||
| this.titleId = `pf-wizard-title-${newId}`; | ||
| this.descriptionId = `pf-wizard-description-${newId}`; | ||
| this.isModal = !props.isInPage; |
There was a problem hiding this comment.
user should not have an ability to change the inpage wizard to modal one after it is constructed
Sorry, something went wrong.
| if (this.isModal) { | ||
| this.titleId = `pf-wizard-title-${newId}`; | ||
| this.descriptionId = `pf-wizard-description-${newId}`; | ||
| } |
There was a problem hiding this comment.
not sure if this is needed, but the titleId/descriptionId are not used when in-page
Sorry, something went wrong.
|
I guess we need to update @patternfly/patternfly" dependency for the tests to pass (fails on missing inPage modifier ). should I do it in this PR? |
Sorry, something went wrong.
|
There's a PR up to bump the version to 2.28 so when that merges in it should resolve your issues. |
Sorry, something went wrong.
|
@suomiy Version bump PR has been merged, try updating and that should solve the build error! |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2830.surge.sh |
Sorry, something went wrong.
|
updated & tests passed |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good
Sorry, something went wrong.
|
@suomiy this looks awesome, thanks for doing this so quickly! |
Sorry, something went wrong.
| height?: number | string; | ||
| /** The wizard title */ | ||
| title: string; | ||
| title?: string; |
There was a problem hiding this comment.
The default wizard requires a title currently, and per conversations with @mcarrano here (patternfly/patternfly#2191) I believe we want to keep it that way. Making it optional creates these 2 scenarios:
Title/description is undefined renders an empty header, and the header is required at a minimum to position the close button.
Title is undefined but a description exists, which seems to work OK, but we haven't really accounted for that in core and I'm not sure we want to allow that per the design:
Can we make this optional if isInPage is true? And technically it isn't optional - the entire header shouldn't render if using an in-page wizard, so title and description shouldn't be allowed.
Sorry, something went wrong.
These two are mutually exclusive from the type perspective. I.e. having title optional in page and required in modal. Our options are: Quick Patch
Fix Patch
|
Sorry, something went wrong.
I'm not sure between the two, what do you think @tlabaj? |
Sorry, something went wrong.
| height?: number | string; | ||
| /** The wizard title */ | ||
| title: string; | ||
| title?: string; |
There was a problem hiding this comment.
We can change the title to optional here since it technically is not always required. However, can you generate a warning if the title is not provided AND isModal is true.
Sorry, something went wrong.
|
Alternative workaround to optional title, in WizardHeader render empty non-breaking space if not provided {title ? (
<Title
size="3xl"
className={css(styles.wizardTitle)}
aria-label={title}
id={titleId}
>
{title}
</Title>
) : (
<Title
size="3xl"
className={css(styles.wizardTitle)}
aria-label={title}
id={titleId}
>
</Title>
)}
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. We can take this in and update the docs to let the user know that they should pass in a title for the modal
Sorry, something went wrong.
|
I decided to go the route. Should I still add the warning? |
Sorry, something went wrong.
|
Also, should I create an issue for that (to fix it properly and remove the non breaking space)? |
Sorry, something went wrong.
|
@suomiy that would be great thanks. can you just also update the prop documentation for the title prop to say that it is required unless isInPage is set to true? |
Sorry, something went wrong.
|
added the warning and the documentation |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Sorry, something went wrong.
|
nice! 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fixes #2751