-
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
[ui-shared-deps/theme] implement auto-switching theme vars module #70274
Merged
spalger
merged 11 commits into
elastic:master
from
spalger:implement/canonical_eui_theme_vars_module
Jul 1, 2020
Merged
[ui-shared-deps/theme] implement auto-switching theme vars module #70274
spalger
merged 11 commits into
elastic:master
from
spalger:implement/canonical_eui_theme_vars_module
Jul 1, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spalger
added
Team:Operations
Team label for Operations Team
v8.0.0
release_note:skip
Skip the PR/issue when compiling release notes
v7.9.0
labels
Jun 29, 2020
…onical_eui_theme_vars_module
…onical_eui_theme_vars_module
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-operations (Team:Operations) |
Pinging @elastic/apm-ui (Team:apm) |
sorenlouv
approved these changes
Jul 1, 2020
mistic
approved these changes
Jul 1, 2020
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
spalger
added a commit
to spalger/kibana
that referenced
this pull request
Jul 1, 2020
…astic#70274) Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
spalger
added a commit
that referenced
this pull request
Jul 1, 2020
…le (#70274) (#70485) Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
release_note:skip
Skip the PR/issue when compiling release notes
Team:APM
All issues that need APM UI Team support
Team:Operations
Team label for Operations Team
v7.9.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally submitted as a part of #66673, but extracted to simplify the original PR.
This implements the
@kbn/ui-shared-deps/theme
module which has three exports:euiThemeVars
will point to the v7 or v8 theme, either light or dark mode, based on the UI Setting value at page loadeuiDarkVars
&euiLightVars
specific pointers to the light/dark theme vars from eui.Imports for
@elastic/eui/dist/eui_theme_light.json
and@elastic/eui/dist/eui_theme_dark.json
will be rewritten to access the exports of the new@kbn/ui-shared-deps/theme
module.To show the module in use I removed the
getTheme()
helper from the APM plugin and instead used the import directly inx-pack/plugins/apm/public/plugin.ts
. It would be totally reasonable to refactor this further and just import the theme from the location where it's needed, rather than passing it tofetchLandingPageData()
, but I wanted to avoid coupling the APM code further to this magic without them asking for it.