[Lens] [Metric] Improve "Supporting visualization" section#243608
[Lens] [Metric] Improve "Supporting visualization" section#243608mariairiartef merged 11 commits intoelastic:mainfrom
Conversation
|
/ci |
|
/ci |
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
⏳ Build in-progress, with failures
Failed CI StepsTest Failures
History
|
dej611
left a comment
There was a problem hiding this comment.
Found a regression with this PR when transitioning from a numeric dynamic colouring to a non-numeric scenario.
Before the configuration was falling back into static colouring, but with this PR the entire colour control disappears:
Tested in main the previous behaviour:
Note: this only happens when coming from a Dynamic coluring, from a Static colouring setting all is fine.
x-pack/platform/plugins/shared/lens/public/visualizations/metric/dimension_editor.tsx
Outdated
Show resolved
Hide resolved
| const showStaticColorControl = !isMetricNumeric && !state.palette; | ||
|
|
||
| return ( | ||
| <div className="lnsIndexPatternDimensionEditor--padded"> |
There was a problem hiding this comment.
yes, I think this issue was introduced by the tabs PR. Let's fix it in another PR
Thanks! I fixed it here. I think we can rely only in the |
…43608) ## Summary Closes elastic#234901 - Move `Color by value` and `Color mapping` / `Color` settings from "Appearance" section into "Supporting visualization" section - Rename `Color by value` to `Color mode` in Primary Metric and Secondary Metric editors - Rename `Color mapping` to `Dynamic color mapping` - Rename `Color` to `Select color` - Add static color control in "Appearance" section for non-numeric metrics since non-numeric metrics do not support the "Supporting visualization" section #### Numeric metric https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde #### Non-numeric metric <img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43" src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061" /> ### Checklist - [ ] 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
…43608) ## Summary Closes elastic#234901 - Move `Color by value` and `Color mapping` / `Color` settings from "Appearance" section into "Supporting visualization" section - Rename `Color by value` to `Color mode` in Primary Metric and Secondary Metric editors - Rename `Color mapping` to `Dynamic color mapping` - Rename `Color` to `Select color` - Add static color control in "Appearance" section for non-numeric metrics since non-numeric metrics do not support the "Supporting visualization" section #### Numeric metric https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde #### Non-numeric metric <img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43" src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061" /> ### Checklist - [ ] 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
…43608) ## Summary Closes elastic#234901 - Move `Color by value` and `Color mapping` / `Color` settings from "Appearance" section into "Supporting visualization" section - Rename `Color by value` to `Color mode` in Primary Metric and Secondary Metric editors - Rename `Color mapping` to `Dynamic color mapping` - Rename `Color` to `Select color` - Add static color control in "Appearance" section for non-numeric metrics since non-numeric metrics do not support the "Supporting visualization" section #### Numeric metric https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde #### Non-numeric metric <img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43" src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061" /> ### Checklist - [ ] 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
… visualization" title (#245979) ## Summary Follow up to #243608 - Removes supporting visualization section title - Renames "Type" field to "Background chart" and the "Panel" option to "None" **Note** Internally, we don't remove the "Supporting visualization" section, that is the `DimensionEditorAdditionalSection`. We remove the "Supporting visualization" title and the line separator so it looks like it is only one section now. ### After #### Background chart "None" <img width="1404" height="1295" alt="Screenshot 2025-12-11 at 13 08 01" src="https://github.com/user-attachments/assets/b45b6756-1d42-4fcd-8258-4a88dd2937e7" /> #### Background chart "Line" <img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 09 49" src="https://github.com/user-attachments/assets/2854e33f-cbbf-4261-b4e0-82d6fda73c7e" /> #### Background chart "Line" and dynamic coloring <img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 08 35" src="https://github.com/user-attachments/assets/094759fc-56c7-47a1-ac00-f027906c6d12" /> #### Not numeric <img width="1403" height="1294" alt="Screenshot 2025-12-11 at 13 08 52" src="https://github.com/user-attachments/assets/1fb87b45-b3e2-490b-b7a8-0f969ac72fcc" /> ## 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Removed the "Supporting visualization" section heading from the Primary Metric editor. All configuration options remain fully accessible in the same location under "Appearance". The "Type" field has been renamed to "Background chart" and the "Panel" option has been renamed to "None". --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
… visualization" title (elastic#245979) ## Summary Follow up to elastic#243608 - Removes supporting visualization section title - Renames "Type" field to "Background chart" and the "Panel" option to "None" **Note** Internally, we don't remove the "Supporting visualization" section, that is the `DimensionEditorAdditionalSection`. We remove the "Supporting visualization" title and the line separator so it looks like it is only one section now. ### After #### Background chart "None" <img width="1404" height="1295" alt="Screenshot 2025-12-11 at 13 08 01" src="https://github.com/user-attachments/assets/b45b6756-1d42-4fcd-8258-4a88dd2937e7" /> #### Background chart "Line" <img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 09 49" src="https://github.com/user-attachments/assets/2854e33f-cbbf-4261-b4e0-82d6fda73c7e" /> #### Background chart "Line" and dynamic coloring <img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 08 35" src="https://github.com/user-attachments/assets/094759fc-56c7-47a1-ac00-f027906c6d12" /> #### Not numeric <img width="1403" height="1294" alt="Screenshot 2025-12-11 at 13 08 52" src="https://github.com/user-attachments/assets/1fb87b45-b3e2-490b-b7a8-0f969ac72fcc" /> ## 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Removed the "Supporting visualization" section heading from the Primary Metric editor. All configuration options remain fully accessible in the same location under "Appearance". The "Type" field has been renamed to "Background chart" and the "Panel" option has been renamed to "None". --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>



Summary
Closes #234901
Color by valueandColor mapping/Colorsettings from "Appearance" section into "Supporting visualization" sectionColor by valuetoColor modein Primary Metric and Secondary Metric editorsColor mappingtoDynamic color mappingColortoSelect colorNumeric metric
Screen.Recording.2025-11-24.at.12.13.03.mov
Non-numeric metric
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.Release note
The color settings in the Primary Metric editor have been reorganized and renamed. For numeric metrics, the "Color by value" and "Color mapping" / "Color" settings are now located under the chart type field. The settings have been renamed as follows: "Color by value" is now "Color mode", "Color mapping" is now "Dynamic color mapping", and "Color" is now "Select color".