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(Popper): add width props, remove popperMatchesTriggerWidth #8724
Conversation
Codemod: patternfly/pf-codemods#286 |
Preview: https://patternfly-react-pr-8724.surge.sh A11y report: https://patternfly-react-pr-8724-a11y.surge.sh |
4477ecc
to
e97ce0e
Compare
e71785d
to
7136883
Compare
Removed several instances of Added |
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.
Noticing some glitchy text on truncated table header text with tooltips.
Mar-03-2023.15-51-03.mp4
Also anywhere we're setting menu widths, we shouldn't need to do that now, unless that's part of the thing we're aiming to show in the example/demo -
patternfly-react/packages/react-core/src/demos/ComposableMenu/examples/ComposableActionsMenu.tsx
Line 74 in 60f2694
'--pf-c-menu--Width': '300px' |
@mcoker The table tooltip issue you were seeing was resolved in another PR, now that this is rebased it should be fixed here once the build finishes. |
@nicolethoen I'm unsure why this PR is failing a timestamp test as it shouldn't be impacted by these changes. Any thoughts? |
Another PR was merges that is now causing this issue. I put up a PR to revert it. |
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.
Katie. once you rebase this PR the timestamp test issue should be 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. just one small suggestion.
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.
Can you also remove the minWidth
on the DropdownNext kebab example. It should no longer be needed.
I am actually wondering if we need the minWidth
prop anymore. It was specifically added for the kebab use case. Menu
does not expose a minWidth
prop.
cc @mcoker
@@ -1,7 +1,7 @@ | |||
import React from 'react'; | |||
import { css } from '@patternfly/react-styles'; | |||
import { Menu, MenuContent, MenuProps } from '../../../components/Menu'; | |||
import { Popper } from '../../../helpers/Popper/Popper'; | |||
import { Popper, PopperProps } from '../../../helpers/Popper/Popper'; |
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.
Do you think the Select still needs a minwidth
prop?.
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.
Select (and Dropdown) still have access to the minWidth
prop via popperProps
that get spread directly to Popper
.
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.
I was just wondering if it would just be spread with popperProps
. For The next Dropdown it looks like minWidth
was removed on line 26. We should probably be consistent wit the two components.
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.
Oh yeah forgot about that. I'll remove it from Select as well
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 ok to me 👍
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
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #8682
Adds
width
,minWidth
,maxWidth
toPopper
.Sets the default of
minWidth
totrigger
(popper will grow to trigger width at minimum but will still grow to fit content).Removes
popperMatchesTriggerWidth
(minWidth
now covers this by default, and all width props can be set totrigger
to match the trigger width).