-
Notifications
You must be signed in to change notification settings - Fork 349
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
Feat(DescriptionList): 6866 set width of term column #7061
Feat(DescriptionList): 6866 set width of term column #7061
Conversation
Preview: https://patternfly-react-pr-7061.surge.sh A11y report: https://patternfly-react-pr-7061-a11y.surge.sh |
e2adaab
to
9438c37
Compare
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.
Perhaps it'd be worth updating the other horizontal example to use a checkbox to apply a custom width when checked since it's only changing one prop.
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/DescriptionList/examples/DescriptionList.md
Outdated
Show resolved
Hide resolved
@nicolethoen - just noticed your top level comment about a checkbox, will address that soon |
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/DescriptionList/examples/DescriptionList.md
Outdated
Show resolved
Hide resolved
@nicolethoen Maybe more than a checkbox is warranted, it would be ideal if the consumer can set the width. Most of our examples with checkboxes are to apply modifiers. Tooltip has something that is more than modifying a boolean in an example cc @mcarrano |
fix tests fix tests address pr comments make checkbox optional custom term length in example remove typo add number input for width
653e95f
to
b1dbf3b
Compare
@tlabaj - converted to a NumberInput |
@gitdallas I don't think we have a good way to add anything other than a checkbox right now without having the control look like it is part of the component. I this case I think it is best to have a separate example to show the functionality. |
@tlabaj - reverted back to separate examples |
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.
This looks great, though does it support the breakpoint modifiers? https://codesandbox.io/s/stoic-mopsa-twtm0v?file=/style.css
not sure, basically just allowing the consumer to overwrite the --pf-c-description-list__term--width value. they pass the termWidth.
i'm not sure where they come from or what it means if they aren't there, but I only see a react-token for that main |
@gitdallas ah ok, I'm assuming they don't show up in react tokens since we don't define them with an initial value. We just use them in a fallback stack I imagine |
@nicolethoen @mcoker - see latest https://patternfly-react-pr-7061.surge.sh/components/description-list , i added modifiers for the width breakpoints.. it doesn't seem to have any affect. you can see they are applied |
I think you're updating the wrong breakpoint modifier.
|
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
does it matter that there is no react token for these? just hard code them in? edit: i do see that is being done in another place so i'll go ahead with that. |
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.
Looks great!!! Just one nit about the docs.
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
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.
Left a comment re: the docs.
Also unrelated I noticed the enableFlip
prop docs are missing a period between "necessary If" and at the end.
If true, tries to keep the popover in view by flipping it if necessary If the position is set to 'auto', this prop is ignored
packages/react-core/src/components/DescriptionList/DescriptionList.tsx
Outdated
Show resolved
Hide resolved
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.
looks good other than the little issue.
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.
Nice!!
packages/react-core/src/components/DescriptionList/examples/DescriptionList.md
Outdated
Show resolved
Hide resolved
Thanks so much everyone! This is perfect |
What: Closes #6866
Additional issues: