Skip to content

[Lens] [Metric chart] Update appearance popover#233992

Merged
mariairiartef merged 5 commits intoelastic:mainfrom
mariairiartef:lens/233702
Sep 10, 2025
Merged

[Lens] [Metric chart] Update appearance popover#233992
mariairiartef merged 5 commits intoelastic:mainfrom
mariairiartef:lens/233702

Conversation

@mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented Sep 4, 2025

Closes #233702

Summary

Updates titles and text toolbar popover for metric chart, now called "Appearance".

Screen.Recording.2025-09-04.at.13.44.56.mov

Shows all settings and disables the ones that weren't shown before: subtitle, secondary metric align and icon position.

Screenshot 2025-09-04 at 13 41 46

Considerations

Prevents unnecessary state updates by ensuring that when a user clicks an option that is already selected, the state is not updated.

Checklist

@mariairiartef mariairiartef self-assigned this Sep 4, 2025
@mariairiartef mariairiartef added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens labels Sep 4, 2025
@mariairiartef mariairiartef added the backport:skip This PR does not require backporting label Sep 4, 2025
@mariairiartef mariairiartef marked this pull request as ready for review September 4, 2025 11:52
@mariairiartef mariairiartef requested a review from a team as a code owner September 4, 2025 11:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copilot AI review requested due to automatic review settings September 5, 2025 08:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the metric chart visualization's toolbar popover to improve its appearance and functionality. The main change is renaming the "Titles and text" popover to "Appearance" and restructuring it to show all settings with appropriate disabled states for unavailable options.

Key Changes

  • Replaced the "Titles and text" popover with a new "Appearance" popover
  • Reorganized settings into logical groups (Primary metric, Title and subtitle, Secondary metric, Other)
  • Added disabled states for subtitle, secondary metric alignment, and icon position when not applicable

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
types.ts Adds new type aliases for better type safety and clarity
toolbar.tsx Updates import to use the new AppearancePopover component
titles_and_text_popover.tsx Removes the old popover implementation
titles_and_text_popover.test.tsx Removes tests for the old popover
title_weight_option.tsx Removes individual option component (consolidated)
text_alignment_options.tsx Removes individual option components (consolidated)
primary_position_option.tsx Removes individual option component (consolidated)
appearance_popover.tsx Adds new unified appearance popover with improved organization
appearance_popover.test.tsx Adds comprehensive tests for the new popover
toolbar_popover.tsx Adjusts width and padding for better layout
Translation files Removes outdated translation keys
Copy link
Contributor

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mariairiartef mariairiartef enabled auto-merge (squash) September 10, 2025 08:21
@gvnmagni gvnmagni self-requested a review September 10, 2025 10:51
@gvnmagni
Copy link

Beautiful!

@mariairiartef mariairiartef merged commit c59726a into elastic:main Sep 10, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1414 1411 -3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.5MB 1.5MB -1.6KB

History

cc @mariairiartef

eleonoramicozzi pushed a commit to eleonoramicozzi/kibana that referenced this pull request Sep 10, 2025
Closes elastic#233702

## Summary

Updates titles and text toolbar popover for metric chart, now called
"Appearance".


https://github.com/user-attachments/assets/54bcd8aa-cf87-45e2-a39c-3ec6fa8bf59e

Shows all settings and disables the ones that weren't shown before:
subtitle, secondary metric align and icon position.

<img width="2560" height="906" alt="Screenshot 2025-09-04 at 13 41 46"
src="https://github.com/user-attachments/assets/431e7e4a-6962-4de6-805e-8238ff6a72d4"
/>

#### Considerations

Prevents unnecessary state updates by ensuring that when a user clicks
an option that is already selected, the state is not updated.

### 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)
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Sep 15, 2025
Closes elastic#233702

## Summary

Updates titles and text toolbar popover for metric chart, now called
"Appearance".


https://github.com/user-attachments/assets/54bcd8aa-cf87-45e2-a39c-3ec6fa8bf59e

Shows all settings and disables the ones that weren't shown before:
subtitle, secondary metric align and icon position.

<img width="2560" height="906" alt="Screenshot 2025-09-04 at 13 41 46"
src="https://github.com/user-attachments/assets/431e7e4a-6962-4de6-805e-8238ff6a72d4"
/>

#### Considerations

Prevents unnecessary state updates by ensuring that when a user clicks
an option that is already selected, the state is not updated.

### 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)
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
Closes elastic#233702

## Summary

Updates titles and text toolbar popover for metric chart, now called
"Appearance".


https://github.com/user-attachments/assets/54bcd8aa-cf87-45e2-a39c-3ec6fa8bf59e

Shows all settings and disables the ones that weren't shown before:
subtitle, secondary metric align and icon position.

<img width="2560" height="906" alt="Screenshot 2025-09-04 at 13 41 46"
src="https://github.com/user-attachments/assets/431e7e4a-6962-4de6-805e-8238ff6a72d4"
/>

#### Considerations

Prevents unnecessary state updates by ensuring that when a user clicks
an option that is already selected, the state is not updated.

### 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)
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
niros1 pushed a commit that referenced this pull request Sep 30, 2025
Closes #233702

## Summary

Updates titles and text toolbar popover for metric chart, now called
"Appearance".


https://github.com/user-attachments/assets/54bcd8aa-cf87-45e2-a39c-3ec6fa8bf59e

Shows all settings and disables the ones that weren't shown before:
subtitle, secondary metric align and icon position.

<img width="2560" height="906" alt="Screenshot 2025-09-04 at 13 41 46"
src="https://github.com/user-attachments/assets/431e7e4a-6962-4de6-805e-8238ff6a72d4"
/>

#### Considerations

Prevents unnecessary state updates by ensuring that when a user clicks
an option that is already selected, the state is not updated.

### 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)
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
alaudazzi added a commit to elastic/docs-content that referenced this pull request Oct 3, 2025
This PR adds the new appearance settings for the metric chart.

Closes #3088
Relates to elastic/kibana#229815 and
elastic/kibana#233992
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Lens needs_docs release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v9.2.0

7 participants