Skip to content

[Lens as code] Fix format visibility for last_value non-numeric dimensions#263810

Merged
andrimal merged 7 commits intoelastic:mainfrom
andrimal:fix/lens-as-code/last-value-format/263793
Apr 20, 2026
Merged

[Lens as code] Fix format visibility for last_value non-numeric dimensions#263810
andrimal merged 7 commits intoelastic:mainfrom
andrimal:fix/lens-as-code/last-value-format/263793

Conversation

@andrimal
Copy link
Copy Markdown
Contributor

@andrimal andrimal commented Apr 16, 2026

Summary

Fix #263793

This PR aligns inline Lens dimension editor formatting for API-created charts with UI behavior by skipping format display when last_value uses a non-numeric field

after.fix.mp4

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@andrimal andrimal added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:version Backport to applied version labels v9.4.0 v9.5.0 labels Apr 16, 2026
Comment on lines +340 to +341
// Failing: See https://github.com/elastic/kibana/issues/253327
test.skip('should list all field names and document as a whole in prioritized order', async () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Until this slow test issue is fixed #253327, lets only skip the problematic test and not the whole suite.

@andrimal andrimal marked this pull request as ready for review April 17, 2026 10:17
@andrimal andrimal requested a review from a team as a code owner April 17, 2026 10:17
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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.

Changes looks good to me

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
lens 2.0MB 2.0MB +237.0B

History

@andrimal andrimal merged commit 8ddda6a into elastic:main Apr 20, 2026
17 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/24667135059

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 20, 2026
…ensions (elastic#263810)

## Summary

Fix elastic#263793

This PR aligns inline Lens dimension editor formatting for API-created
charts with UI behavior by skipping `format` display when `last_value`
uses a non-numeric field

https://github.com/user-attachments/assets/beaaec55-5300-4a62-9170-ff7cd7d6d610

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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] 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.

(cherry picked from commit 8ddda6a)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 20, 2026
…ic dimensions (#263810) (#264395)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[Lens as code] Fix format visibility for `last_value` non-numeric
dimensions (#263810)](#263810)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Andreana
Malama","email":"andreana.malama@elastic.co"},"sourceCommit":{"committedDate":"2026-04-20T12:43:07Z","message":"[Lens
as code] Fix format visibility for `last_value` non-numeric dimensions
(#263810)\n\n## Summary\n\nFix #263793 \n\nThis PR aligns inline Lens
dimension editor formatting for API-created\ncharts with UI behavior by
skipping `format` display when `last_value`\nuses a non-numeric
field\n\n\nhttps://github.com/user-attachments/assets/beaaec55-5300-4a62-9170-ff7cd7d6d610\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"8ddda6adeb498970ad637e4adb4042116eb14014","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:version","v9.4.0","v9.5.0"],"title":"[Lens
as code] Fix format visibility for `last_value` non-numeric
dimensions","number":263810,"url":"https://github.com/elastic/kibana/pull/263810","mergeCommit":{"message":"[Lens
as code] Fix format visibility for `last_value` non-numeric dimensions
(#263810)\n\n## Summary\n\nFix #263793 \n\nThis PR aligns inline Lens
dimension editor formatting for API-created\ncharts with UI behavior by
skipping `format` display when `last_value`\nuses a non-numeric
field\n\n\nhttps://github.com/user-attachments/assets/beaaec55-5300-4a62-9170-ff7cd7d6d610\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"8ddda6adeb498970ad637e4adb4042116eb14014"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/263810","number":263810,"mergeCommit":{"message":"[Lens
as code] Fix format visibility for `last_value` non-numeric dimensions
(#263810)\n\n## Summary\n\nFix #263793 \n\nThis PR aligns inline Lens
dimension editor formatting for API-created\ncharts with UI behavior by
skipping `format` display when `last_value`\nuses a non-numeric
field\n\n\nhttps://github.com/user-attachments/assets/beaaec55-5300-4a62-9170-ff7cd7d6d610\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"8ddda6adeb498970ad637e4adb4042116eb14014"}}]}]
BACKPORT-->

Co-authored-by: Andreana Malama <andreana.malama@elastic.co>
justinkambic added a commit to justinkambic/kibana that referenced this pull request Apr 20, 2026
The lens entry bundle was 72-83B over its 86,000B page-load limit after
rebasing this branch on main. Nothing in this PR's scope
(kbn-unified-chart-section-viewer + one Discover test spec) can reach
lens's bundle — a codebase-wide grep shows zero imports of
@kbn/unified-chart-section-viewer from x-pack/platform/plugins/shared/lens,
and a local dist build's stats.json contains no matching module paths.

Cumulative drift from recent Lens-as-code commits that merged into main
(e.g., elastic#262871, elastic#264134, elastic#261581, elastic#264147, elastic#263810) pushed the entry
bundle just over the line. Raising the limit here is the documented
path when no in-PR contribution is found.

Limit set via `node scripts/build_kibana_platform_plugins --focus lens --update-limits`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens as code] Format becomes available for non numeric last_value operation

4 participants