[Fleet] Fix styled component theme lookup issue#221979
Merged
nickofthyme merged 4 commits intoelastic:mainfrom May 30, 2025
Merged
[Fleet] Fix styled component theme lookup issue#221979nickofthyme merged 4 commits intoelastic:mainfrom
nickofthyme merged 4 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
jen-huang
reviewed
May 29, 2025
Contributor
jen-huang
left a comment
There was a problem hiding this comment.
Thanks for the fix! Would you also mind applying the same to the file at x-pack/platform/plugins/shared/fleet/public/applications/fleet/app.tsx? This plugin exports two apps (Integrations and Fleet) and we are seeing the same happening in both places. TIA :)
Contributor
Author
|
@jen-huang done |
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
Contributor
|
Starting backport for target branches: 8.19 |
Contributor
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Contributor
Author
|
These Cypress tests are sooooo flaky! https://buildkite.com/elastic/kibana-pull-request/builds/303547#01971e5e-865b-408d-b586-d467da6776ac |
nickofthyme
added a commit
to nickofthyme/kibana
that referenced
this pull request
May 30, 2025
## Summary This fixes an issue caused by changes in elastic#220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-90215c9231256571f4b7369e58505a234b7f7b4082cf7c9fda47692787b52222L80-L83), which prevented the style components from receiving the correct `colorMode`.
1 task
nickofthyme
added a commit
that referenced
this pull request
Jun 2, 2025
## Summary This fixes an issue caused by changes in #220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-e5bb3127661b2bd4a13f88f8793ee5e7cfdabe3a6deb5332064d28f7363eeb13L49-L51), which prevented the style components from receiving the correct `colorMode`. Similar issue fixed in #221979. In short we cannot call `useKibanaIsDarkMode` outside of the global theme provider. This usage of the `useDarkMode` utility is needed in this one case, hopefully soon to be removed with styled-components.
zacharyparikh
pushed a commit
to zacharyparikh/kibana
that referenced
this pull request
Jun 4, 2025
## Summary This fixes an issue caused by changes in elastic#220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-90215c9231256571f4b7369e58505a234b7f7b4082cf7c9fda47692787b52222L80-L83), which prevented the style components from receiving the correct `colorMode`.
zacharyparikh
pushed a commit
to zacharyparikh/kibana
that referenced
this pull request
Jun 4, 2025
## Summary This fixes an issue caused by changes in elastic#220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-e5bb3127661b2bd4a13f88f8793ee5e7cfdabe3a6deb5332064d28f7363eeb13L49-L51), which prevented the style components from receiving the correct `colorMode`. Similar issue fixed in elastic#221979. In short we cannot call `useKibanaIsDarkMode` outside of the global theme provider. This usage of the `useDarkMode` utility is needed in this one case, hopefully soon to be removed with styled-components.
nickpeihl
pushed a commit
to nickpeihl/kibana
that referenced
this pull request
Jun 12, 2025
## Summary This fixes an issue caused by changes in elastic#220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-90215c9231256571f4b7369e58505a234b7f7b4082cf7c9fda47692787b52222L80-L83), which prevented the style components from receiving the correct `colorMode`.
nickpeihl
pushed a commit
to nickpeihl/kibana
that referenced
this pull request
Jun 12, 2025
## Summary This fixes an issue caused by changes in elastic#220141, specifically [here](https://github.com/elastic/kibana/pull/220141/files#diff-e5bb3127661b2bd4a13f88f8793ee5e7cfdabe3a6deb5332064d28f7363eeb13L49-L51), which prevented the style components from receiving the correct `colorMode`. Similar issue fixed in elastic#221979. In short we cannot call `useKibanaIsDarkMode` outside of the global theme provider. This usage of the `useDarkMode` utility is needed in this one case, hopefully soon to be removed with styled-components.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This fixes an issue caused by changes in #220141, specifically here, which prevented the style components from receiving the correct
colorMode.Before
After
This is likely due to how we still use the deprecated
EuiThemeProviderwhich needs to be passed the currentcolorMode. See code here...kibana/x-pack/platform/plugins/shared/fleet/public/applications/integrations/app.tsx
Lines 105 to 107 in 088e80a