-
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
[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions #205223
[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions #205223
Conversation
…parentize functions
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
adding @l-suarez to have a look at this, thx 🙏 |
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.
I checked this out quickly today and agree we should get some design input for the table row hover styles. Using the same colour for both row striping and hovering makes the hovered row blend in more and less easy to identify in wider tables, but I'm not sure of an alternative without using tintOrShade
. I'll ask the EUI team to take a look in Slack too in case they have ideas.
For reference, I tried out $euiColorLightShade
for hovering too, but it seemed pretty harsh compared to before IMO.
@davismcphee: In case it helps, I think data grid row hover would call for using |
1e818e7
to
fb383d6
Compare
@PhilippeOberti I hope you don't mind, I merged main and pushed a commit to adjust Unified Data Table to use @MichaelMarcialis Thanks for the hint. I was chatting with EUI folks earlier and they pointed me in a similar direction too, so I gave it a shot. For context, the issue was that for Amsterdam we have an override since the default data grid styles use a yellow highlight that we didn't want (I'm guessing since it conflicts with our "expanded" row styles). The hover styles have been changed in Borealis, but I believe we're supposed to maintain support for both Amsterdam and Borealis in I pushed a change to use |
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.
Looks like CI is green now so I'm gonna approve from the Data Discovery side since I'm good with the current row hover override until we can remove it when Amsterdam is retired 👍
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.
✅ Changes LGTM from EUI side
💔 Build Failed
Failed CI StepsHistory
|
…parentize functions (elastic#205223) ## Summary This PR is part of a list of PRs to perform the changes necessary to get the new Borealis theme working correctly. It focuses on removing the `shade()`, `tint()`, `shadeOrTint()`, `tintOrShade()` and `transparentize()` functions. 2 places have been impacted: - the expandable flyout preview shadow #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | - the unified data table - for row hover background color (I tried a few options here, this change is the one that looked the best to me, despite being identical color to the odd row background... I'm opened to suggestions here!) #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | - for row comparison #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | _Notes: one usage of the `transparentize` function was left untouched [here](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx#L30). This is a custom OverlayMask and this code replicates what's being done in the EUI codebase. I checked and EUI is still using the `transparentize` method with that color, so I figured I would keep this untouched for now..._ elastic#201888 --------- Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
…parentize functions (elastic#205223) ## Summary This PR is part of a list of PRs to perform the changes necessary to get the new Borealis theme working correctly. It focuses on removing the `shade()`, `tint()`, `shadeOrTint()`, `tintOrShade()` and `transparentize()` functions. 2 places have been impacted: - the expandable flyout preview shadow #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | - the unified data table - for row hover background color (I tried a few options here, this change is the one that looked the best to me, despite being identical color to the odd row background... I'm opened to suggestions here!) #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | - for row comparison #### Light | before | after | | ------------- | ------------- | |  |  | #### Dark | before | after | | ------------- | ------------- | |  |  | _Notes: one usage of the `transparentize` function was left untouched [here](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx#L30). This is a custom OverlayMask and this code replicates what's being done in the EUI codebase. I checked and EUI is still using the `transparentize` method with that color, so I figured I would keep this untouched for now..._ elastic#201888 --------- Co-authored-by: Davis McPhee <davis.mcphee@elastic.co> (cherry picked from commit 3057eac) # Conflicts: # x-pack/solutions/security/packages/expandable-flyout/src/components/preview_section.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… transparentize functions (#205223) (#210652) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions (#205223)](#205223) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Philippe Oberti","email":"philippe.oberti@elastic.co"},"sourceCommit":{"committedDate":"2025-01-14T08:30:33Z","message":"[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions (#205223)\n\n## Summary\r\n\r\nThis PR is part of a list of PRs to perform the changes necessary to get\r\nthe new Borealis theme working correctly. It focuses on removing the\r\n`shade()`, `tint()`, `shadeOrTint()`, `tintOrShade()` and\r\n`transparentize()` functions.\r\n\r\n2 places have been impacted:\r\n\r\n- the expandable flyout preview shadow\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n- the unified data table\r\n- for row hover background color (I tried a few options here, this\r\nchange is the one that looked the best to me, despite being identical\r\ncolor to the odd row background... I'm opened to suggestions here!)\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n - for row comparison\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n_Notes: one usage of the `transparentize` function was left untouched\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx#L30).\r\nThis is a custom OverlayMask and this code replicates what's being done\r\nin the EUI codebase. I checked and EUI is still using the\r\n`transparentize` method with that color, so I figured I would keep this\r\nuntouched for now..._\r\n\r\nhttps://github.com//issues/201888\r\n\r\n---------\r\n\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"3057eacf378a3567cafa0e0610fd695e7564c524","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","Team:Threat Hunting:Investigations","EUI Visual Refresh"],"title":"[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions","number":205223,"url":"https://github.com/elastic/kibana/pull/205223","mergeCommit":{"message":"[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions (#205223)\n\n## Summary\r\n\r\nThis PR is part of a list of PRs to perform the changes necessary to get\r\nthe new Borealis theme working correctly. It focuses on removing the\r\n`shade()`, `tint()`, `shadeOrTint()`, `tintOrShade()` and\r\n`transparentize()` functions.\r\n\r\n2 places have been impacted:\r\n\r\n- the expandable flyout preview shadow\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n- the unified data table\r\n- for row hover background color (I tried a few options here, this\r\nchange is the one that looked the best to me, despite being identical\r\ncolor to the odd row background... I'm opened to suggestions here!)\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n - for row comparison\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n_Notes: one usage of the `transparentize` function was left untouched\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx#L30).\r\nThis is a custom OverlayMask and this code replicates what's being done\r\nin the EUI codebase. I checked and EUI is still using the\r\n`transparentize` method with that color, so I figured I would keep this\r\nuntouched for now..._\r\n\r\nhttps://github.com//issues/201888\r\n\r\n---------\r\n\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"3057eacf378a3567cafa0e0610fd695e7564c524"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205223","number":205223,"mergeCommit":{"message":"[Security Solution][THI] - remove usages of EUI tint, shade and transparentize functions (#205223)\n\n## Summary\r\n\r\nThis PR is part of a list of PRs to perform the changes necessary to get\r\nthe new Borealis theme working correctly. It focuses on removing the\r\n`shade()`, `tint()`, `shadeOrTint()`, `tintOrShade()` and\r\n`transparentize()` functions.\r\n\r\n2 places have been impacted:\r\n\r\n- the expandable flyout preview shadow\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n- the unified data table\r\n- for row hover background color (I tried a few options here, this\r\nchange is the one that looked the best to me, despite being identical\r\ncolor to the odd row background... I'm opened to suggestions here!)\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n - for row comparison\r\n\r\n#### Light\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n#### Dark\r\n| before | after |\r\n| ------------- | ------------- |\r\n|\r\n\r\n|\r\n\r\n|\r\n\r\n_Notes: one usage of the `transparentize` function was left untouched\r\n[here](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/timelines/components/modal/index.styles.tsx#L30).\r\nThis is a custom OverlayMask and this code replicates what's being done\r\nin the EUI codebase. I checked and EUI is still using the\r\n`transparentize` method with that color, so I figured I would keep this\r\nuntouched for now..._\r\n\r\nhttps://github.com//issues/201888\r\n\r\n---------\r\n\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"3057eacf378a3567cafa0e0610fd695e7564c524"}}]}] BACKPORT-->
Summary
This PR is part of a list of PRs to perform the changes necessary to get the new Borealis theme working correctly. It focuses on removing the
shade()
,tint()
,shadeOrTint()
,tintOrShade()
andtransparentize()
functions.2 places have been impacted:
Light
Dark
Light
Dark
Light
Dark
Notes: one usage of the
transparentize
function was left untouched here. This is a custom OverlayMask and this code replicates what's being done in the EUI codebase. I checked and EUI is still using thetransparentize
method with that color, so I figured I would keep this untouched for now...#201888