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

[Fleet][Eui Visual Refresh] Make agent status colors theme aware #204070

Conversation

jillguyonnet
Copy link
Contributor

@jillguyonnet jillguyonnet commented Dec 12, 2024

Summary

Closes #201997

Fleet does not make proper use of color palettes, in the sense that vis colors should only be used to visualizations.

There are currently two Fleet UI elements, in the agents list table, that use some vis colors and need to be updated:

  • the status icons in the agent status summary
  • the horizontal agent status bar

image

This PR updates the function getColorForAgentStatus, which returns the color based on agent status, to return theme colors with semantic meaning aligned with the agent status badges. This will ensure colours are aligned between agent status badges and the table header in both Amsterdam and Borealis themes.

It should be noted that the colours used for offline and inactive status (lightShade and darkShade), are marked as disabled, since their use isn't properly semantic:
Screenshot 2024-12-16 at 15 31 00

Screenshots

Before (current main)

Amsterdam theme

fleet-agents-amsterdam-main

Borealis theme

fleet-agents-borealis-main

After

Amsterdam theme

fleet-agents-amsterdam-branch

Borealis theme

fleet-agents-borealis-branch

@jillguyonnet jillguyonnet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team EUI Visual Refresh labels Dec 12, 2024
@jillguyonnet jillguyonnet self-assigned this Dec 12, 2024
@jillguyonnet jillguyonnet requested a review from a team as a code owner December 12, 2024 16:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

code LGTM 🚀

@jillguyonnet jillguyonnet force-pushed the fleet/201997-make-agent-status-colors-theme-aware branch from 99ce7db to 144c01b Compare December 12, 2024 16:32
@jillguyonnet
Copy link
Contributor Author

Thanks @nchaulet - FYI I had accidentally committed an unrelated WIP change that I reverted, code is otherwise the same.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #20 / useFleetServerUnhealthy should call notifications service if an error happen while fetching status

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
fleet 1.7MB 1.7MB -132.0B

cc @jillguyonnet

@jillguyonnet jillguyonnet changed the title [Fleet] Make agent status colors theme aware [Fleet][Eui Visual Refresh] Make agent status colors theme aware Dec 13, 2024
Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

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

LGTM

@jillguyonnet
Copy link
Contributor Author

@elasticmachine merge upstream

@jillguyonnet jillguyonnet force-pushed the fleet/201997-make-agent-status-colors-theme-aware branch from 9b2b349 to 5eafbc6 Compare December 16, 2024 14:30
Copy link
Contributor

@mgadewoll mgadewoll left a 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

@jillguyonnet jillguyonnet merged commit b3124d7 into elastic:main Dec 17, 2024
8 checks passed
@jillguyonnet jillguyonnet deleted the fleet/201997-make-agent-status-colors-theme-aware branch December 17, 2024 09:31
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Dec 19, 2024
…stic#204070)

## Summary

Closes elastic#201997

Fleet does not make proper use of [color
palettes](https://eui.elastic.co/#/utilities/color-palettes), in the
sense that [vis colors should only be used to
visualizations](elastic#199715 (comment)).

There are currently two Fleet UI elements, in the agents list table,
that use some vis colors and need to be updated:
- the status icons in the agent status summary
- the horizontal agent status bar


![image](https://github.com/user-attachments/assets/7c4500b0-1c2d-4a65-9886-3857c8210dc2)

This PR updates the function `getColorForAgentStatus`, which returns the
color based on agent status, to return theme colors with semantic
meaning aligned with the agent status badges. This will ensure colours
are aligned between agent status badges and the table header in both
Amsterdam and Borealis themes.

It should be noted that the colours used for offline and inactive status
(lightShade and darkShade), are marked as disabled, since their use
isn't properly semantic:
<img width="1012" alt="Screenshot 2024-12-16 at 15 31 00"
src="https://github.com/user-attachments/assets/ee7a185f-01d9-4139-a1ff-785a249fd882"
/>

## Screenshots

### Before (current `main`)

#### Amsterdam theme

<img width="1918" alt="fleet-agents-amsterdam-main"
src="https://github.com/user-attachments/assets/1be3ccf7-64bd-40e3-832d-b79f47345170"
/>

#### Borealis theme

<img width="1918" alt="fleet-agents-borealis-main"
src="https://github.com/user-attachments/assets/276208ed-91a8-41df-8858-53a0e7894c4a"
/>

### After

#### Amsterdam theme

<img width="1918" alt="fleet-agents-amsterdam-branch"
src="https://github.com/user-attachments/assets/e9e6ab25-f43e-4949-9e9c-8edc3443effd"
/>

#### Borealis theme

<img width="1918" alt="fleet-agents-borealis-branch"
src="https://github.com/user-attachments/assets/6ae2c3ca-9209-406f-8f46-6ee40dc77632"
/>
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:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet][EUI Visual refresh] Check color palettes usage and make sure that they are theme-aware
6 participants