-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Dashboard] Add maxWidth 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard #189009
Conversation
6b4b58a
to
2827d33
Compare
Pinging @elastic/kibana-presentation (Team:Presentation) |
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 looks like maxWidth
doesn't accept 's' | 'm' | 'l'
style sizes - only the size
prop accepts these. Personally, I think we should do the following:
- The control settings flyout should have a hard coded size of
s
- this is more inline with the panel settings flyout, which I think makes sense - The flyout drilldowns should probably still use the
maxSize
prop rather thansize
- and for that, we would have to give it a specific width in pixels or percentage. Perhaps500
or600
?
cc @cqliu1, just in case you have input here on what you think an appropriate size would be :)
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 works much better - thanks!! 🎉 Code review + quick local test. Left one small nit but everything else looks good!
@@ -126,6 +126,7 @@ export class FlyoutCreateDrilldownAction implements Action<EmbeddableApiContext> | |||
core | |||
), | |||
{ | |||
maxWidth: 500, |
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.
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.
Makes sense to me! Changes in 0200bf9
@@ -75,3 +75,5 @@ export const createDrilldownTemplatesFromSiblings = ( | |||
|
|||
return templates; | |||
}; | |||
|
|||
export const drilldownMaxWidth = 500; |
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.
Sorry!! Can you rename this const
to align with our constant naming convention? And perhaps change its value as shown in #189009 (comment)? (I edited the comment after the original post - sorry if you didn't see that 🙈 )
export const drilldownMaxWidth = 500; | |
export const DRILLDOWN_MAX_WIDTH = 500; |
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 sorry yes I missed that - fixed in b1c4e50
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @rshen91 |
Summary
Closes #163981
The Dashboard and Panel Settings Flyouts already seem to be fixed but the Controls Settings Flyout did not specify the maxWidth.
The drilldown (manage and create) flyouts did not have a maxWidth specified but based on main, it seems to match medium. To avoid any unclearness, I have added the maxWidth property to the flyout.
The edit and create drilldowns that didn't have specified maxWidths can be toggled to each other so they should be the same. I think there can be a little bit of a debate on which makes the most sense. Although there is some white space to the right of the buttons in the create drilldown I think it makes the most sense for the manage drilldowns to not be cramped and have the maxWidths be medium if possible.
Edit drilldown
Size s makes it look more cramped and breaks the word Discover onto two lines:
Size m
Create drilldown:
I'm leaning towards size 's' for the create drilldown flyout based on the following screenshots:
Size s
Size m