-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Vega vis needs to have visible fonts for dark theme dashboard #73675
Conversation
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
@elastic/datavis Would you mind giving this a look (and potentially review)? Since we're changing things around chart colors here, I'd like to get your feedback. |
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.
As described in my comment, the gridline is too pronounced and we should introduce/reuse the existing EUI chart theme for that.
Please also check that there are a few missing customizable configurations like the group-title
and group-subtitle
that can be used and that needs the same theme default as the others
@elasticmachine merge upstream |
We should not inline those color codes in Kibana. If we cannot access them right now in EUI, we need to talk to EUI (or open PR there) to access them. It seems though like at least the |
I got needed colors. I checked which colors used in chart themes and used it. |
Yeap that once was on me, sorry. I reviewed on my phone and confused the test files with the source files. |
@elasticmachine merge upstream |
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've added one suggestion and requested a slight modification to include subtitle and use the right color for axis title
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'guide-title', 'fill'); | ||
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'group-title', '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.
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'guide-title', 'fill'); | |
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'group-title', 'fill'); | |
this._setDefaultValue(euiThemeVars.euiColorDarkestShade, 'config', 'style', 'guide-title', 'fill'); | |
this._setDefaultValue(euiThemeVars.euiColorDarkestShade, 'config', 'style', 'group-subtitle', 'fill'); | |
this._setDefaultValue(euiThemeVars.euiColorDarkestShade, 'config', 'style', 'group-title', 'fill'); |
We should threat both the guide-title
(the axis title) and the group-subtitle
(used when the user wants a subtitle) with the same color as specified by EUI theme.
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.
you can test the subtitle with this spec on vega:
"title": {
"text": "Title Text",
"subtitle": "Subtitle Text"
}
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.
done
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.
@VladLasitsa I think there you haven't fixed my suggestion to use euiColorDarkestShade
(as in the current EUI theme) for all of the following styles: guide-title
, group-subtitle
and group-title
.
src/plugins/vis_type_vega/public/data_model/vega_parser.test.js
Outdated
Show resolved
Hide 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.
Tested on Firefox Linux, Light and dark theme on the default Vega spec. Works as intended, Code 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.
We should stick exactly to the color used by EUI, please check my comments below
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'guide-title', 'fill'); | ||
this._setDefaultValue(euiThemeVars.euiColorDarkShade, 'config', 'style', 'group-title', '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.
@VladLasitsa I think there you haven't fixed my suggestion to use euiColorDarkestShade
(as in the current EUI theme) for all of the following styles: guide-title
, group-subtitle
and group-title
.
@elasticmachine merge upstream |
done |
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
…c#73675) * Support dark theme in vega * Fixed tests * Fixed colors * Fixed tests * Fixed comment * Fixed colors Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
#75139) * Support dark theme in vega * Fixed tests * Fixed colors * Fixed tests * Fixed comment * Fixed colors Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes #16456
Summary
Added support for dark theme in vega:
Now we have this color behavior on dark mode:
And light theme:
Checklist
Delete any items that are not applicable to this PR.
For maintainers