-
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
[ML] Fixes dark mode in flyouts and modals #164399
[ML] Fixes dark mode in flyouts and modals #164399
Conversation
Pinging @elastic/ml-ui (:ml) |
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
wrapWithTheme, | ||
KibanaContextProvider, | ||
} from '@kbn/kibana-react-plugin/public'; | ||
import { wrapWithTheme, KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; |
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.
import { wrapWithTheme, KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; | |
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; |
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.
wrapWithTheme
is still needed as it needs to be passed to the DatePickerContextProvider
component.
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.
It's no longer needed after this change 9b8e1e6
x-pack/plugins/aiops/public/components/log_categorization/show_flyout.tsx
Outdated
Show resolved
Hide resolved
…c/kibana into fixing-dark-mode-in-flyouts
x-pack/packages/ml/date_picker/src/hooks/use_date_picker_context.tsx
Outdated
Show resolved
Hide resolved
…xt.tsx Co-authored-by: Dima Arnautov <[email protected]>
…c/kibana into fixing-dark-mode-in-flyouts
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 (with per-user dark mode) and LGTM. Just have a few type errors to fix I think.
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
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.
AO changes 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.
Code LGTM.
A recent EUI change has caused a problem with the theme when using the deprecated `toMountPoint` inside `overlays.openFlyout` to create flyouts. This causes the contents of the rendered flyout to not know the current theme, this is obvious when running in dark mode. The fix is to switch to the non-deprecated version of `toMountPoint`. Flyouts: Create anomaly detection job from Lens flyout in Dashboard. Anomaly swim lane and anomaly chart job embeddables job selection flyout in Dashboard. Log pattern analysis flyout in Discover. Modals: Trained models start deployment modal. Trained models force stop deployment modal. Trained models stop deployment modal when there are multiple deployments. Misc: Page not found banner. Jobs list header, which contains the settings button. DFA clone job warning toast when the original data view no longer exists. Components in ml's date picker package Fixes elastic#164379 --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Dima Arnautov <[email protected]> (cherry picked from commit af440aa)
💚 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.10`: - [[ML] Fixes dark mode in flyouts and modals (#164399)](#164399) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-23T10:47:18Z","message":"[ML] Fixes dark mode in flyouts and modals (#164399)\n\nA recent EUI change has caused a problem with the theme when using the\r\ndeprecated `toMountPoint` inside `overlays.openFlyout` to create\r\nflyouts.\r\nThis causes the contents of the rendered flyout to not know the current\r\ntheme, this is obvious when running in dark mode.\r\n\r\nThe fix is to switch to the non-deprecated version of `toMountPoint`.\r\n\r\nFlyouts:\r\nCreate anomaly detection job from Lens flyout in Dashboard.\r\nAnomaly swim lane and anomaly chart job embeddables job selection flyout\r\nin Dashboard.\r\nLog pattern analysis flyout in Discover.\r\n\r\nModals:\r\nTrained models start deployment modal.\r\nTrained models force stop deployment modal.\r\nTrained models stop deployment modal when there are multiple\r\ndeployments.\r\n\r\nMisc:\r\nPage not found banner.\r\nJobs list header, which contains the settings button.\r\nDFA clone job warning toast when the original data view no longer\r\nexists.\r\nComponents in ml's date picker package\r\n\r\nFixes https://github.com/elastic/kibana/issues/164379\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dima Arnautov <[email protected]>","sha":"af440aae4b55e3090dc6a7983105fd98e16402ab","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["non-issue",":ml","release_note:skip","Feature:ML/AIOps","v8.10.0","v8.11.0"],"number":164399,"url":"https://github.com/elastic/kibana/pull/164399","mergeCommit":{"message":"[ML] Fixes dark mode in flyouts and modals (#164399)\n\nA recent EUI change has caused a problem with the theme when using the\r\ndeprecated `toMountPoint` inside `overlays.openFlyout` to create\r\nflyouts.\r\nThis causes the contents of the rendered flyout to not know the current\r\ntheme, this is obvious when running in dark mode.\r\n\r\nThe fix is to switch to the non-deprecated version of `toMountPoint`.\r\n\r\nFlyouts:\r\nCreate anomaly detection job from Lens flyout in Dashboard.\r\nAnomaly swim lane and anomaly chart job embeddables job selection flyout\r\nin Dashboard.\r\nLog pattern analysis flyout in Discover.\r\n\r\nModals:\r\nTrained models start deployment modal.\r\nTrained models force stop deployment modal.\r\nTrained models stop deployment modal when there are multiple\r\ndeployments.\r\n\r\nMisc:\r\nPage not found banner.\r\nJobs list header, which contains the settings button.\r\nDFA clone job warning toast when the original data view no longer\r\nexists.\r\nComponents in ml's date picker package\r\n\r\nFixes https://github.com/elastic/kibana/issues/164379\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dima Arnautov <[email protected]>","sha":"af440aae4b55e3090dc6a7983105fd98e16402ab"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164399","number":164399,"mergeCommit":{"message":"[ML] Fixes dark mode in flyouts and modals (#164399)\n\nA recent EUI change has caused a problem with the theme when using the\r\ndeprecated `toMountPoint` inside `overlays.openFlyout` to create\r\nflyouts.\r\nThis causes the contents of the rendered flyout to not know the current\r\ntheme, this is obvious when running in dark mode.\r\n\r\nThe fix is to switch to the non-deprecated version of `toMountPoint`.\r\n\r\nFlyouts:\r\nCreate anomaly detection job from Lens flyout in Dashboard.\r\nAnomaly swim lane and anomaly chart job embeddables job selection flyout\r\nin Dashboard.\r\nLog pattern analysis flyout in Discover.\r\n\r\nModals:\r\nTrained models start deployment modal.\r\nTrained models force stop deployment modal.\r\nTrained models stop deployment modal when there are multiple\r\ndeployments.\r\n\r\nMisc:\r\nPage not found banner.\r\nJobs list header, which contains the settings button.\r\nDFA clone job warning toast when the original data view no longer\r\nexists.\r\nComponents in ml's date picker package\r\n\r\nFixes https://github.com/elastic/kibana/issues/164379\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dima Arnautov <[email protected]>","sha":"af440aae4b55e3090dc6a7983105fd98e16402ab"}}]}] BACKPORT--> Co-authored-by: James Gowdy <[email protected]>
* main: (150 commits) Fixes unnecessary autocompletes on HTTP methods (elastic#163233) [Defend Workflows] Convert filterQuery to kql (elastic#161806) [Fleet] copy `inactivity_timeout` when duplicating agent policy (elastic#164544) Fix 7.17 forward compatibility with 8.2+ (elastic#164274) [ML] Fixes dark mode in flyouts and modals (elastic#164399) [Defend Workflows]Changes to policy settings are not persistent until a refresh (elastic#164403) [Security Solution][Endpoint] Fixes kibana crash when going back to policy details page (elastic#164329) Prepare the Security domain HTTP APIs for Serverless (elastic#162087) skip failing test suite (elastic#160986) [Security Solution] Fix flaky Event Filters test (elastic#164473) [EDR workflows] Osquery serverless tests (elastic#163795) [Fleet] Only show agent dashboard links if there is more than one non-server agent and if the dashboards exist (elastic#164469) [Chrome UI] Fix background color in serverless (elastic#164419) [DOCS] Saved objects - resolve import errors API (elastic#162825) Remove 'Create Rule' button from Rule Group page (elastic#164167) [Security Solution] expandable flyout - fix infinite loop in correlations (elastic#163450) [Remote Clusters] Update copy about port help text (elastic#164442) [api-docs] 2023-08-23 Daily api_docs build (elastic#164524) [data views] Disable scripted fields in serverless environment (elastic#163228) [Reporting] Fix - show diagnostic only when image reporting is enabled (elastic#164336) ...
A recent EUI change has caused a problem with the theme when using the deprecated
toMountPoint
insideoverlays.openFlyout
to create flyouts.This causes the contents of the rendered flyout to not know the current theme, this is obvious when running in dark mode.
The fix is to switch to the non-deprecated version of
toMountPoint
.Flyouts:
Create anomaly detection job from Lens flyout in Dashboard.
Anomaly swim lane and anomaly chart job embeddables job selection flyout in Dashboard.
Log pattern analysis flyout in Discover.
Modals:
Trained models start deployment modal.
Trained models force stop deployment modal.
Trained models stop deployment modal when there are multiple deployments.
Misc:
Page not found banner.
Jobs list header, which contains the settings button.
DFA clone job warning toast when the original data view no longer exists.
Components in ml's date picker package
Fixes #164379