-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Grafana UI: Add description to Menu component #77808
Conversation
@@ -266,5 +305,13 @@ const getStyles = (theme: GrafanaTheme2) => { | |||
color: theme.colors.text.secondary, | |||
opacity: 0.7, | |||
}), | |||
description: css({ | |||
fontStyle: 'italic', |
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 know it was in the other PR this came from, but we don't think the description should be italic. Otherwise, this looks good! 👍
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, thanks for the heads up 🙌🏾 . I did the changes :)
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.
@axelavargas wanted to see if we could avoid adding the wrapping div
, but didn't want to lump you with that so did some refactoring here: https://github.com/grafana/grafana/compare/axelav/add-description-to-menu...ash/menu-refactor?expand=1
i think this is the exact same behaviour you want just with a smaller amount of changes (and also fixes some weird things like negative margin on the icons 😬). if you're happy you can cherry-pick the commit 4afca39 onto your branch and it should cut down the diff a fair bit 👍
Thank you Mr Harrison 😎, the only thing with that approach is related to a11y, sometimes |
oh, does that fail a11y? 🤔 i thought you could nest a if not, could we use a css({
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
}) |
Let me confirm again about a11y, now I am hesitating 😅 |
@ashharrison90 alright, automation a11y tooling says it should be ok 😄 , I was mistaken. I will use the refactor, thanks a lot for helping with 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.
lgtm 👏
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. nice team work 🙏
What is this feature?
Adds to the
Menu
component a new description option (majority of this code was taken from this PR by @geliciaItemMenuDescription.mp4
Why do we need this feature?
Users can benefit from more clarity in some complex menus.
Who is this feature for?
everyone
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: