Skip to content

Commit

Permalink
[ColorMapping] Fix palette key mapping for legacy palette ids (#211858)
Browse files Browse the repository at this point in the history
Currently, palettes with the legacy palette id of `eui_amsterdam_color_blind`, the old default id, gets assigned the `kibana 7` palette. The desired behavior is that this palette is assigned the new borealis default palette in `9.0`.
  • Loading branch information
nickofthyme authored Feb 20, 2025
1 parent d3ef4c7 commit 9e7d931
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class KbnPalettes {
function buildAliasMappings(palettes: IKbnPalette[]): Map<string, string> {
return palettes.reduce((acc, { id, aliases }) => {
aliases.forEach((alias) => {
acc.set(alias, id);
if (!acc.has(alias)) acc.set(alias, id);
});
return acc;
}, new Map());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const elasticPalette = new KbnColorFnPalette({
id: KbnPalette.Default,
type: 'categorical',
aliases: [
KbnPalette.Default, // needed when switching between new and old themes
'elastic_borealis', // placeholder - not yet used
KbnPalette.Amsterdam, // to assign to existing default palettes
],
Expand Down

0 comments on commit 9e7d931

Please sign in to comment.