-
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
Respect system dark mode in ESQL editor #200233
Conversation
When `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor uses dark mode. When `uiSettings.overrides.theme:darkMode: system` is set, the ESQL editor uses light mode, while the rest of the UI uses dark mode. Update the ESQL theme creation to create both light and dark variations of the theme at startup and use the theme in React component to determine which ESQL theme to use at runtime.
Pinging @elastic/kibana-esql (Team:ESQL) |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
|
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.
Changes LGTM from the ES|QL side. (I updated the jests tests but I havent contributed mor than 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.
Verified that when we have uiSettings.overrides.theme:darkMode: system
, if appearance is set to dark mode, the ESQL Editor is rendered using the dark theme.
Starting backport for target branches: 8.x |
When `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor uses dark mode. When `uiSettings.overrides.theme:darkMode: system` is set, the ESQL editor uses light mode, while the rest of the UI uses dark mode. Update the ESQL theme creation to create both light and dark variations of the theme at startup and use the theme in React component to determine which ESQL theme to use at runtime. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Stratoula Kalafateli <[email protected]> (cherry picked from commit f48ded9)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Respect system dark mode in ESQL editor (#200233)](#200233) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan L Smith","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T15:49:10Z","message":"Respect system dark mode in ESQL editor (#200233)\n\nWhen `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor\r\nuses dark mode.\r\n\r\nWhen `uiSettings.overrides.theme:darkMode: system` is set, the ESQL\r\neditor uses light mode, while the rest of the UI uses dark mode.\r\n\r\nUpdate the ESQL theme creation to create both light and dark variations\r\nof the theme at startup and use the theme in React component to\r\ndetermine which ESQL theme to use at runtime.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"f48ded9686505d63fe40427c26d6f2b22e462fa0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Feature:ES|QL","Team:ESQL","backport:version","v8.17.0"],"title":"Respect system dark mode in ESQL editor","number":200233,"url":"https://github.com/elastic/kibana/pull/200233","mergeCommit":{"message":"Respect system dark mode in ESQL editor (#200233)\n\nWhen `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor\r\nuses dark mode.\r\n\r\nWhen `uiSettings.overrides.theme:darkMode: system` is set, the ESQL\r\neditor uses light mode, while the rest of the UI uses dark mode.\r\n\r\nUpdate the ESQL theme creation to create both light and dark variations\r\nof the theme at startup and use the theme in React component to\r\ndetermine which ESQL theme to use at runtime.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"f48ded9686505d63fe40427c26d6f2b22e462fa0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200233","number":200233,"mergeCommit":{"message":"Respect system dark mode in ESQL editor (#200233)\n\nWhen `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor\r\nuses dark mode.\r\n\r\nWhen `uiSettings.overrides.theme:darkMode: system` is set, the ESQL\r\neditor uses light mode, while the rest of the UI uses dark mode.\r\n\r\nUpdate the ESQL theme creation to create both light and dark variations\r\nof the theme at startup and use the theme in React component to\r\ndetermine which ESQL theme to use at runtime.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"f48ded9686505d63fe40427c26d6f2b22e462fa0"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan L Smith <[email protected]>
When `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor uses dark mode. When `uiSettings.overrides.theme:darkMode: system` is set, the ESQL editor uses light mode, while the rest of the UI uses dark mode. Update the ESQL theme creation to create both light and dark variations of the theme at startup and use the theme in React component to determine which ESQL theme to use at runtime. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Stratoula Kalafateli <[email protected]>
When `uiSettings.overrides.theme:darkMode: true` is set, the ESQL editor uses dark mode. When `uiSettings.overrides.theme:darkMode: system` is set, the ESQL editor uses light mode, while the rest of the UI uses dark mode. Update the ESQL theme creation to create both light and dark variations of the theme at startup and use the theme in React component to determine which ESQL theme to use at runtime. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Stratoula Kalafateli <[email protected]>
When
uiSettings.overrides.theme:darkMode: true
is set, the ESQL editor uses dark mode.When
uiSettings.overrides.theme:darkMode: system
is set, the ESQL editor uses light mode, while the rest of the UI uses dark mode.Update the ESQL theme creation to create both light and dark variations of the theme at startup and use the theme in React component to determine which ESQL theme to use at runtime.