-
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] Use KibanaThemeProvider in ML plugin #120892
[ML] Use KibanaThemeProvider in ML plugin #120892
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.
Code LGTM
@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.
LGTM, just one suggestion about the dependency cache
@@ -20,8 +20,15 @@ export function showExpiredLicenseWarning() { | |||
}); | |||
// Only show the banner once with no way to dismiss it | |||
const overlays = getOverlays(); | |||
const theme = getTheme(); |
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 actually can avoid using dependency cache here by passing overlays and a theme as arguments. First to MlClientLicense
constructor and then to this function.
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.
MlClientLicense
would need to keep a local reference to overlays
and theme
for use later, which is no different to the dependency cache keeping references to them.
At least with the dependency cache they are all in the same place.
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.
Fair point. @jgowdyelastic and I discussed this and decided that keeping a copy in the cache rather than a copy in the licence is simpler for now.
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Kibana Machine <[email protected]>
Summary
Adapts the ML plugin and the ML jobs page under Stack Management to use the
KibanaThemeProvider
implementation and thetheme$
prop intoMountPoint
calls.Part of #119007 and #118866.
Checklist