-
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
[Lens] Color mapping for categorical dimensions #162389
[Lens] Color mapping for categorical dimensions #162389
Conversation
c26a3cb
to
7ec4bdd
Compare
e7a581d
to
03dc53f
Compare
befd1dc
to
b361b2e
Compare
…-ref HEAD~1..HEAD --fix'
9cb310d
to
d442274
Compare
## Summary Closes #166833 Closes #167063 This PR allows the inline editing of Lens panels in canvas and dashboards. ![inline_editing](https://github.com/elastic/kibana/assets/17003240/8abb636b-7b5a-4d35-9f91-a1bf2ff963f2) ### Changes #### Discover - The basic UI change in Discover flyout is that we add the Cancel button in the flyout footer (resets to the state before the flyout changes). - It also solves (with passing the embeddableOutput observable to the flyout) the bug that is more prominent in this PR ([first bullet](#162389 (comment))) #### Dashboard - All Lens panels have an Edit visualization panel action - The Edit Lens action is now hidden - A flyout opens (in the header there is a link where the users can go to the editor) - The by reference panels change to by value as long as the users are editing. On apply and close, we save to the SO - All tests have changed to accomodate this navigation change. All the existing ones test the editor (as they used to do). I have added new tests for testing the inline experience #### Known issues - If a user is currently editing a by reference visualization, doesn't click Cancel or Apply and navigate away, the panel stays as by value panel. The users can always go back and reset the changes and we could not find an easy fix with Devon. We consider it as a nice to have and a non-blocking behavior. #### Missing These 2 features are missing to give the full set of capabilities of the editor to the flyout. Both are missing from ESQL editing too and are going to be added on a follow up PR - Chart switcher - Suggestions (as icons and not previews) #### Flaky tests runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3182 (100 times) #### Panel focus This PR will look even better when this is merged! #165417 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: Marco Liberati <[email protected]>
thanks @stratoula nice catch, I just fixed that and also aligned the colors set shown in the dimension button with the color mapping selected |
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.
Tested again and it works fine. 🎉
@MichaelMarcialis can you please review again? Marco has made the majority of the changes you asked. This PR introduces changes in many files so I would love this be merged before the FF 🙏
Hi @stratoula do you think this feature has good chance to be released in 8.11 ? |
@Danouchka yes we are very positive that this is going to be merged soonish :) |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
This PR introduces the new color mapping feature into Lens.
The color mapping feature is introduced as a standalone sharable component available from
@kbn/coloring
. The README.md file describes the components and the logic behind it.The Color Mapping component is also connected to Lens and is available in the following charts:
This MVP feature will be released under the Tech Preview flag.
This PR needs to prove the user experience and the ease of use. UI styles, design improvements and embellishments will be released in subsequent PRs.
The current MVP-provided palettes are just a placeholder. I'm coordinating with @gvnmagni for a final set of palettes.
close #155037
close #6480
fix #28618
fix #96044
fix #101942
fix #112839
fix #116634
Release note
This feature introduces the ability to change and map colors to break down dimensions in Lens. The feature provides an improved way to specify colors and their association with categories by giving the user a predefined set of color choices
or customized one that drives the user toward a correct color selection.
It provides ways to pick new colors and generate gradients.
This feature is in Tech Preview and is enabled by default on every new visualization but can be turned off at will.