-
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
[Visual Refresh] Borealis visualization palettes #201015
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
PR Project deployment started at: https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/145 |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Project deployed, see credentials at: https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/145 |
…alis-vis-palettes
src/plugins/charts/public/services/palettes/decrease_opacity.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/visualizations/actions/open_modal.test.tsx
Outdated
Show resolved
Hide resolved
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.
response-ops
changes OK
isDarkMode | ||
), | ||
]; | ||
? Array.from({ length: palette.colorCount }, (d, i) => palette.getColor(i)) |
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.
The previous palette management provides a way to require a color by "looping" the palette color set or by not looping that.
Here instead it looks like we always loop by default.
I believe this is fine (we always want to loop) but I'm wondering if we are missing a requirements there where we don't want to loop
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.
Yeah I wasn't sure where this looping came into play. Is there a way in the UI to set the specialAssignments
such that the colors do not loop? If not I would agree to remove it until it is needed.
src/plugins/chart_expressions/expression_tagcloud/public/components/tagcloud_component.tsx
Outdated
Show resolved
Hide resolved
palettes={ | ||
KbnPalettes { | ||
"get": [Function], | ||
"getAll": [Function], | ||
"query": [Function], | ||
} | ||
} |
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.
If you look right above that there is also another thing called paletteService
how can we replace that and how can we avoid having such similar expressions?
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.
Yeah this is my attempt to clarify the usage of the legacy charts/palette
service as the paletteService
and the new @kbn/palettes
as palettes
.
Previously the legacy palette is called palettes
, paletteService
, paletteRegistry
, etc.
I think this is something we tackle when we deprecate the legacy charts palette service. For now they live side-by-side.
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.
ok thanks, can you write a simple issue to solve this tech debt? thanks
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Any counts in public APIs
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
|
Adds support for toggling between the old Amsterdam themed visualizations palettes and the new Borealis themed palettes.
)" This reverts commit 9312248.
Summary
Adds support for toggling between the old Amsterdam themed visualizations palettes, to the new Borealis themed palettes.
When toggling between the
Amsterdam
andBorealis
theme, the palettes are now theme-based. So any visualization that uses the default kibana palette will now use the Borealis palettes. The same applies to gradients excludingcustom
gradient palettes, see note below.Key changes:
@kbn/palette
package. This uses a customMap
-like class for getting palettes based on id. This allows for aliasing new palettes to old palette ids at runtime. So accessingpalettes.get('old_amseterdam')
would return the new default palette when the borealis theme is selected. These palettes are generated differently based on the selected theme.charts/services/palettes
) hard codes color stops in the SO even for non-custom
palettes. This poses an issue for swapping the default palettes to use Borealis, this goes for categorical and gradient palettes. Luckily, any change to the palette will convert the palette tocustom
. We use this behavior to update the default palettes to use the new colors by ignoring the hardcoded colors and generating new colors for the current named palette except forcustom
palettes. In short non-custom palette color stops are overridden based on the selected palette.Closes #192848
Running locally
Enabled the theme naming toggle in advanced settings.
Start kibana with
experimental
theme files loaded.Checklist
release_note:*
label is applied per the guidelines