-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[APM] Use theme variables for components #68157
Closed
Closed
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c202dd8
Use theme colors for stacktrace
balthazar 665d3eb
[APM] Use theme for all components
balthazar 5129f5b
Switch HoC withTheme to useTheme and convert classes to hooks
balthazar c3df48b
Change hardcoded white to euiColorEmptyShade for ServiceMap
balthazar 873249a
Snapshots and Legends fix
balthazar 3c8f961
Switch to context and add test helper
balthazar 3a1ddb0
Fix tests and update snaps
balthazar b46e276
Merge branch 'master' into stacktrace-dark
balthazar 42ce184
New snaps + new anomaly detection
balthazar 9dc86df
Remove shallow from testHelpers
balthazar 81bfa6a
Remove commented tests
balthazar d988ec3
Fix prettier
sorenlouv 235c7bb
Pass correct theme to cytoscape
balthazar 4eaa2f8
Fix ServiceMap
balthazar 39d7d85
Merge branch 'master' into stacktrace-dark
elasticmachine 4fbe5a1
fixes some rendering issues in service maps
ogupte e8efe2d
removed the old anomaly detection logic from service map popover cont…
ogupte b5d9003
Merge branch 'master' of github.com:elastic/kibana into stacktrace-dark
sorenlouv 69e21ab
Fix eslint, tsc lint issues and unit tests
sorenlouv b5d621b
Remove types for styled-components default theme
sorenlouv beb918d
Update x-pack/plugins/apm/public/components/shared/KueryBar/Typeahead…
balthazar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
When you use
useTheme
styled-component returns aDefaultTheme
object. Which does haveeui
on it. That's why this message is shown:Property 'eui' does not exist on type 'DefaultTheme'.
you need to change it to:
Where ThemeContext is imported from
styled-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.
Are you saying
useTheme
doesn't automatically add the context?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 does, but typescript complains about
eui
not exist.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.
So we can't use
useTheme
just because of the TypeScript config?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.
Yeah! otherwise, that error will persist.
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.
That's why I hate TypeScript, vanilla ftw 🙂