-
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
Style dashboard buttons the same way #63403
Style dashboard buttons the same way #63403
Conversation
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.
Tested locally on Chrome, all buttons work as they should, and match much better.
Should we be thinking about re-wording it from 'Create new' to something more specific like 'Create panel' or something else while we're here?
Kibana app code LGTM
@@ -49,7 +49,7 @@ export function TopNavMenuItem(props: TopNavMenuData) { | |||
}; | |||
|
|||
const btn = props.emphasize ? ( | |||
<EuiButton {...commonButtonProps} size="s" fill style={{ fontSize: 'smaller' }}> | |||
<EuiButton {...commonButtonProps} size="s" fill> |
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.
Changing this to size "S" increases the height of the nav row and also creates a weird visual effect when switching edit mode on and off. Is that OK?
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.
With Devon's original PR (adding this button) we accepted the height change between view and edit modes. This particular change here only affects the font-size and has no impact on the overall button height.
This situation will be addressed when we move to the new header design where the menus are anticipated to move up into the header area - the plan as of now is for a double header, like GitHub, and will better accommodate buttons in the menu layout.
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.
@lizozom given that explanation, can you approve this PR? Thanks!
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.
SASS and EUI stuffs LGTM! 💯
@@ -49,7 +49,7 @@ export function TopNavMenuItem(props: TopNavMenuData) { | |||
}; | |||
|
|||
const btn = props.emphasize ? ( | |||
<EuiButton {...commonButtonProps} size="s" fill style={{ fontSize: 'smaller' }}> |
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.
Thank you!
We do try to use a verb + noun combination and this does feel like an outlier. The tricky part here is that we're trying to emphasize that you are creating new content as opposed to the existing 'Add panel' functionality which serves a different purpose. In that way, having both Create panel and Add panel presents another problem. That said... There is one more iteration coming for this button that will allow us to clean this up and that is defaulting the button to open Lens. The plan is to make this a split button with the main piece (Create new Lens; Open Lens; etc) opening directly to Lens and the second piece (likely an icon button with arrow down) will open the viz type picker. Once Lens is a bit more mature, we'll make that switch. |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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
* Stylize dashboard buttons the same way * update snapshots Co-authored-by: Elastic Machine <[email protected]>
* Stylize dashboard buttons the same way * update snapshots Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Fixes #62070
Summary
Several recent changes were made to Dashboard placing more emphasis on the 'Create new' action. In the end, we ended up with some discrepancies and competing visual aspects.
To tighten up the design and visual cues, this PR:
plusInCircle
EUI icon on the left side of each buttonhollow
alternativesmaller
value was actually calculating out to 13.333px.Before
After
Checklist
Delete any items that are not applicable to this PR.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityThis renders correctly on smaller devices using a responsive layout. (You can test this in your browserThis was checked for cross-browser compatibility, including a check against IE11For maintainers
This was checked for breaking API changes and was labeled appropriately