-
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
[Infra Alerting UI] Audit new EUI Borealis theme #205142
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
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.
LGTM
💚 Build Succeeded
Metrics [docs]
History
cc @fkanout |
@@ -28,16 +28,19 @@ export type Palette = { | |||
const euiPalette = euiPaletteColorBlind(); |
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.
euiPaletteColorBlind
used to be static in Amsterdam as we only had a single set of visualization colors but it was changed to ensure support for Borealis and Amsterdam.
The default palette is currently Amsterdam (until EUI switches default theme) and on EuiProvider
theme update (this is within React) this palette updates.
I don't know how this is actually used, but the code here looks static, so it would likely use the initial value (Amsterdam).
If you're finding that you have unwanted static values (meaning Amsterdam colors in Borealis) the suggested usage for this is to either declare the variable inside a component that uses it if you're in React land (to ensure it can be recalled on rerenders based on EuiProvider
) or you can manually listen to the store updates that the palettes are feeding from.
// simplified code
import { EUI_VIS_COLOR_STORE } from '@elastic/eui;
// colors from default EUI theme
let visColors = euiPaletteColorBlind();
// subscribe to the store for changes (changes happen based on EuiProvider updates)
const storeId = EUI_VIS_COLOR_STORE.subscribe(
VIS_COLOR_STORE_EVENTS.UPDATE,
(updatedColors) => {
// update your colors here
visColors = updatedColors; // or call euiPaletteColorBlind() again
}
);
// unsubscribe
EUI_VIS_COLOR_STORE.unsubscribe(VIS_COLOR_STORE_EVENTS.UPDATE, storeId);
Hi @fkanout! For some reason, trying to run yarn es snapshot returns an error if switched to this PR. Could you share some screenshots with me, or perhaps we could do a pair review? Thank you! |
Hi @patpscal , I was out sick, hence the delayed reply! Thanks for checking the PR. It was outdated and had some merge conflicts, which could explain the error you had. I tried |
@patpscal if the error you are referring to is related to the |
Summary
It fixes #205052 by