-
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
[meta] Adapt all existing applications to use the new KibanaThemeProvider
#118866
Comments
Pinging @elastic/kibana-design (Team:Kibana-Design) |
Pinging @elastic/eui-design (EUI) |
@pgayvallet when working on implementing this for Platform Security in #119124, we noticed that nav control registration ( We're updating the Security and Spaces consumption of this in our PR, but I wanted to post here that it looks like there is other usage that needs to be updated, in case you want to tag affected teams in this meta-issue:
|
@jportner thanks for the heads up, you're right, I did not do an exhaustive list of APIs where |
Pretty sure @elastic/observability-ui is done (prs are merged) so I marked that as green. |
Thanks to everyone for working on this. I still see a few teams that don't seem to have opened issues or PRs yet to track their part of the task:
For those teams, even if you did not yet start working on this issue, could you please link your section to either a PR or an issue so that I can track the remaining requires changes? Would be greatly appreciated. |
I've added our tracking issue (#119250) to the description for the Fleet team. Work has already begun, should have a PR up soon. |
security solution is tracking this with this issue: #119320 I don't believe work has begun on this yet. |
security solution should be covered now that this PR has merged: #123499 |
We're almost there. Only team remaining is @elastic/apm-ui / #118869 |
All teams have completed their tasks. Closing. |
Hi @pgayvallet Could you please provide us more details on how this ticket changes will impact Kibana UI. So that we can work upon validating the same. Thanks |
@dikshachauhan-qasource This is mostly a technical change that shouldn't impact the UI in any way. The only test that could potentially be performed is to make sure that light/dark mode is still working as intended in all applications. |
Context
For the
css-in-js
initiative, theEUI
team recently added a new theme context provider:EuiThemeProvider
(see #108972 and elastic/eui#4511).To have Kibana be ready to use the features related to this theme provider, we need all react applications to wrap their root component / react trees with it. Ideally, this would have been done exclusively at core's level, however, due to the agnostic nature of core's apps, and the fact that applications are effectively distinct react trees (e.g calling
ReactDOM.render
during their mount), we will need all application owners to adapt their application mounting points.Also, applications are not the only parts of Kibana rendering react trees. For example, all usage of
kibana_react
'stoMountPoint
also need to be adapted, as, for example, when callingcore.overlays.openFlyout(mountPoint)
. Management sections needs to be adapted too.EUI is planning on leveraging the theme provider to carry the reset styles in their next phase, for 8.1, so this has to be done for the 8.1 FF
How do we do that
In #117368 we added a new
theme
core service, and created the<KibanaThemeProvider />
component andwrapWithTheme
utility that are exposed from thekibana_react
plugin. We also adaptedtoMountPoint
to accept thetheme$
as an optional parameter to wrap the provided component with the theme provider.To summarize, all react trees (all root components passed to
ReactDOM.render
) must now be wrapped with<KibanaThemeProvider>
, either directly, or by usingwrapWithTheme
.ReactDOM.render
For applications
To ease the integration, a new
theme$
option has been added toAppMountParameters
, to help usingKibanaThemeProvider
before
after
For management section.
This is pretty much the same.
theme$
has been added toManagementAppMountParams
in #118852Also see https://github.com/elastic/kibana/pull/117368/files#diff-8665e34e28fd55dda21b54f5d3aeecf5393ba92705295192f18e91ae85298513 for an example of the
savedObjects
management section beforetheme$
was exposed to the management mount parameters.Other usages of
ReactDOM.render
For other usages of
render
, thetheme$
will have to be manually retrieved to be passed down to<KibanaThemeProvider>
. It can be accessed viacoreSetup.theme.theme$
orcoreStart.theme.theme$
;toMountPoint
toMountPoint
has been adapted to accept an optionaltheme$
option as a property of its second parameter. However, due to the fact that this function can be called pretty much anywhere in the code, we couldn't ease the integration as we did by adding thetheme$
property toAppMountParameters
andManagementAppMountParams
, so propagating the theme down to were the call totoMountPoint
is performed will have to be done manually.this
theme$
option will need to be used for all usages oftoMountPoint
, to make sure the theme is properly propagatedbefore
after
or
Applications (and management applications) by team
@elastic/kibana-core
applications
status
core
error
core
home
home
kibanaOverview
kibanaOverview
management apps
objects
kibana
tags
kibana
@elastic/kibana-vis-editors
PR: #119298
applications
visualize
visualize
lens
lens
management apps
settings
kibana
@elastic/kibana-stack-management
applications
dev_tools
devTools
console
devTools
searchprofiler
devTools
grokdebugger
devTools
painless_lab
devTools
management
management
management apps
license_management
stack
cross_cluster_replication
data
watcher
insightsAndAlerting
remote_clusters
data
rollup_jobs
data
snapshot_restore
data
ingest_pipelines
ingest
index_management
data
index_lifecycle_management
data
upgrade_assistant
stack
@elastic/logstash
management apps
pipelines
ingest
@elastic/kibana-app-services #119628
applications
short_url_redirect
share
r
share
reportingRedirect
reporting
management apps
dataViews
kibana
reporting
insightsAndAlerting
search_sessions
kibana
@elastic/kibana-security
applications
interactiveSetup
interactive_setup
space_selector
spaces
security_access_agreement
security
security_capture_url
security
security_login
security
security_logout
security
security_logged_out
security
security_overwritten_session
security
security_account
security
* This app doesn't actually render anything, it just exists to redirect the user somewhere else for authN purposes
management apps
spaces
kibana
users
security
roles
security
api_keys
security
role_mappings
security
@elastic/kibana-presentation
applications
canvas
canvas
dashboards
dashboard
@elastic/kibana-data-discovery
applications
graph
graph
discover
discover
@elastic/fleet #119250
applications
integrations
fleet
fleet
fleet
ingestManager
fleet
@elastic/kibana-gis
applications
maps
maps
@elastic/observability-ui
applications
observability-overview
observability
@elastic/security-asset-management
applications
osquery
osquery
@elastic/ml-ui
applications
ml
ml
data_visualizer
data_visualizer
management apps
transform
data
jobsListLink
insightsAndAlerting
@elastic/uptime
applications
uptime
uptime
@elastic/security-solution
applications
securitySolutionUI
securitySolution
siem
securitySolution
@elastic/infra-monitoring-ui
applications
logs
infra
metrics
infra
infra
infra
monitoring
monitoring
@elastic/enterprise-search-frontend
applications
enterpriseSearch
enterpriseSearch
appSearch
enterpriseSearch
workplaceSearch
enterpriseSearch
renderApp
method as Enterprise Search@elastic/apm-ui
applications
apm
apm
ux
apm
@elastic/kibana-alerting-services
#118880
management apps
triggersActions
insightsAndAlerting
The text was updated successfully, but these errors were encountered: