Skip to content
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 team] Update components for EUI visual refresh #201795

Conversation

SiddharthMantri
Copy link
Contributor

@SiddharthMantri SiddharthMantri commented Nov 26, 2024

Closes #200005

Summary

Integrate changes from the Borealis theme to components owned by @elastic/kibana-security team.

Notes

There are no visual changes in this PR. However:

  • Switch from using success to accentSecondary where needed
  • Switched from 'colors.disabledtocolors.textDisabled`

Screenshots

There isn't much to add but adding a few before/after screenshots of the changes made

Usage Before After
API Key token field image image
User profile page image image
Copy SO to space counter image image
Space listing image image

How to test

  1. Start ES and KIB as:
yarn es snapshot --license trial
KBN_OPTIMIZER_THEMES=experimental yarn start --no-base-path
  1. Navigate to Stack Management > Advance Setting and change the theme to Borealis.
  2. Verify the different screens as seen in the screenshots to see if they render correctly with no visual regression

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Release notes

Update Kibana Security components to use new EUI Borealis theme.

@SiddharthMantri SiddharthMantri requested a review from a team as a code owner November 26, 2024 14:08
@SiddharthMantri
Copy link
Contributor Author

SiddharthMantri commented Nov 26, 2024

Hi @elastic/eui-team There are a few places we use the following hard coded colors:

Color code
#00bfb3
#d3dae6
#dddddd
#dddddd
#ffffff
#d3dae6
#09e8ca
#09e8ca

Do you have any recommended color tokens for these? I couldn't find exact matches in the palettes or sass variables. Any suggestions?

@SiddharthMantri SiddharthMantri added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! backport:skip This commit does not require backporting v9.0.0 EUI Visual Refresh labels Nov 26, 2024
@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@mgadewoll
Copy link
Contributor

Hi @elastic/eui-team There are a few places we use the following hard coded colors:

Color code
#00bfb3
#d3dae6
#dddddd
#dddddd
#ffffff
#d3dae6
#09e8ca
#09e8ca
Do you have any recommended color tokens for these? I couldn't find exact matches in the palettes or sass variables. Any suggestions?

@SiddharthMantri Could you provide us with a context of where/for what these colors are used for? And in which color mode are those used, light or dark mode? Because e.g. a light grey might be a background or a text color or something else 🙂

@SiddharthMantri
Copy link
Contributor Author

SiddharthMantri commented Nov 27, 2024

@mgadewoll Of course! Adding some context here:

#00bfb3 Space color
#d3dae6 Space color
#ddd Badge color
#ddd Badge color
#ffffff <meta name="theme-color" content="#ffffff" />
#d3dae6 Space color
#09e8ca user profile color
#09e8ca user profile color

@mgadewoll
Copy link
Contributor

mgadewoll commented Nov 28, 2024

@mgadewoll Of course! Adding some context here:

#00bfb3 Space color
#d3dae6 Space color
#ddd Badge color
#ddd Badge color
#ffffff <meta name="theme-color" content="#ffffff" />
#d3dae6 Space color
#09e8ca user profile color
#09e8ca user profile color

@SiddharthMantri Here is the mapping we're recommending based on the usage.
These are now dynamic tokens, meaning they'll adjust properly to light/dark mode as well.

old hex value new token
#00bfb3 colors.vis.euiColorVis0
#d3dae6 colors.vis.euiColorVis3
#ddd colors.backgroundLightText // if this badge is an EuiBadge, we can instead just remove the custom hex color and the color prop entirely, as the default is color="default" which results in the same grey color mapping
#ffffff colors.backgroundBasePlain
#09e8ca colors.vis.euiColorVis1

@@ -52,7 +52,7 @@ export const MyPluginComponent: React.FC = () => {
).map(([capability, value]) => {
return value === true ? (
<div key={capability}>
<EuiHealth color="success">{capability}</EuiHealth>
<EuiHealth color="accentSecondary">{capability}</EuiHealth>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiddharthMantri Upon checking with the EUI team, it appears we won't have accentSecondary as an option for EuiHealth. Without having seen the screenshot for this I imagine this EuiHealth element is trying to convey something positive, so staying with the success color here would be the recommended course of action.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andreadelrio! Fixed in 9ef4111

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending update re: Andrea's comment

@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@@ -76,7 +78,7 @@ export const SpaceListInternal = ({
defaultMessage: `* All spaces`,
}),
initials: '*',
color: '#D3DAE6',
color: euiTheme.colors.vis.euiColorVis3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiddharthMantri can you please provide us with a screenshot of this? cc @gvnmagni

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreadelrio Of course! i just added the before and after to the description above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiddharthMantri Thanks, it looks like the color before was this gray though (#D3DAE6), not the purple shown in your screenshot?
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreadelrio Oops, you're right. I was using the recommendation from here: #201795 (comment) Happy to switch to whichever color is closest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiddharthMantri thanks! I asked Lene a clarifying question regarding this.

@andreadelrio
Copy link
Contributor

@SiddharthMantri Here is the mapping we're recommending based on the usage. These are now dynamic tokens, meaning they'll adjust properly to light/dark mode as well.

old hex value new token
#00bfb3 colors.vis.euiColorVis0
#d3dae6 colors.vis.euiColorVis3
#ddd colors.backgroundLightText // if this badge is an EuiBadge, we can instead just remove the custom hex color and the color prop entirely, as the default is color="default" which results in the same grey color mapping
#ffffff colors.backgroundBasePlain
#09e8ca colors.vis.euiColorVis1

@mgadewoll can I ask you why #d3dae6 (light gray) maps to vis3 which is a light blue?

image

@mgadewoll
Copy link
Contributor

@SiddharthMantri Here is the mapping we're recommending based on the usage. These are now dynamic tokens, meaning they'll adjust properly to light/dark mode as well.
old hex value new token
#00bfb3 colors.vis.euiColorVis0
#d3dae6 colors.vis.euiColorVis3
#ddd colors.backgroundLightText // if this badge is an EuiBadge, we can instead just remove the custom hex color and the color prop entirely, as the default is color="default" which results in the same grey color mapping
#ffffff colors.backgroundBasePlain
#09e8ca colors.vis.euiColorVis1

@mgadewoll can I ask you why #d3dae6 (light gray) maps to vis3 which is a light blue?

image

@andreadelrio The recommendation was done without me fully knowing what it's used for, I thought it's part of the vis colors range somehow (used for badges and avatars etc). If it's used more generally, then it should not be changed, that's my bad!
Instead it can be euiColorVisGrey0 then 🙂

@SiddharthMantri
Copy link
Contributor Author

Thanks @mgadewoll! Updated the color and the screenshots.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 540.9KB 540.9KB +8.0B
serverlessSearch 367.7KB 367.7KB +8.0B
spaces 256.9KB 256.9KB +34.0B
total +50.0B

History

Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style changes LGTM. Thanks!

@SiddharthMantri SiddharthMantri enabled auto-merge (squash) December 12, 2024 10:13
@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri merged commit bffd4e1 into elastic:main Dec 12, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting EUI Visual Refresh release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security team] Update security team owned user interfaces to use EUI Borealis
5 participants