-
Notifications
You must be signed in to change notification settings - Fork 841
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
Allowing context menu panels to have different widths #1173
Conversation
Ugh, hold off on the review for a bit, I'm having a slight issue with overflow |
This reverts commit 4f73396.
Ok this can be reviewed, but I could use some help trying to get the width transition to work. |
I'm inclined to just leave off the width transition. The height one is so quick anyway, that it's hardly noticeable without it. The major issue being solved here is the ability to have context panels of differing widths. |
I'm concerned that fixed widths aren't going to scale well, or won't allow future functionality. As a tangible use case, as we introduce localized content it's very probably the proper width will differ. |
@chandlerprall I'm not sure I agree that localization will cause widths to change. Text line-length shouldn't be determining the sizing of panels. It should be the overall content. I.e., if there's a form, you probably want the panel to be as wide as the default form width. This is just like adding |
@chandlerprall @cchaos As long as it has one way to expand (height right now) it should be fine regardless of text length as long as the width transition is removed. The height will be calculated correctly as long as the width transition is off (which is how @cchaos has it now). It'll just keep growing as it needs, which is no different than how text would operate on mobile or something. |
👍 / 👎 ? |
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.
Works for what we need it to do.
I'm going to merge so I can unstuck #1137 , if we find a better way to handle this down the road, we can change. |
jenkins, test this |
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.
posthumously approving; I had pulled down and verified it works locally, code LGTM
Summary
Just add another key called
width
with a number (to be translated into px values as thestyle
prop does) and it will force that width on the panel item itself allowing the context menu to update itself.Note: The width transition doesn't work yet
Checklist
- [ ] This was checked against keyboard-only and screenreader scenarios(accessibility not altered but may not have been perfect before)