Skip to content

[Lens][Datatable] Fix color by value for Last value array mode#213917

Merged
dej611 merged 4 commits intoelastic:mainfrom
dej611:fix/188263
Mar 18, 2025
Merged

[Lens][Datatable] Fix color by value for Last value array mode#213917
dej611 merged 4 commits intoelastic:mainfrom
dej611:fix/188263

Conversation

@dej611
Copy link
Contributor

@dej611 dej611 commented Mar 11, 2025

Summary

Fixes the table side of #188263

The fix used for Metric has been generalized and re-used for the datatable visualization.

color_by_value_table

Checklist

@dej611 dej611 added release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:version Backport to applied version labels v9.1.0 v8.19.0 v8.18.1 v9.0.1 labels Mar 11, 2025
@dej611 dej611 self-assigned this Mar 11, 2025
@dej611 dej611 marked this pull request as ready for review March 12, 2025 11:42
@dej611 dej611 requested a review from a team as a code owner March 12, 2025 11:42
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1527 1526 -1

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 +74.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
lens 58.8KB 58.8KB -14.0B

History

cc @dej611

@dej611 dej611 merged commit 0b9df09 into elastic:main Mar 18, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.x, 9.0

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 18, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### Checklist

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

(cherry picked from commit 0b9df09)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts
9.0

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 213917

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 18, 2025
…213917) (#214919)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Lens][Datatable] Fix color by value for Last value array mode
(#213917)](#213917)

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

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable]
Fix color by value for Last value array
mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
clintandrewhall pushed a commit to clintandrewhall/kibana that referenced this pull request Mar 20, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263 

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### Checklist

- [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
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263 

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### Checklist

- [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
nickofthyme pushed a commit to nickofthyme/kibana that referenced this pull request Mar 27, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### Checklist

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

(cherry picked from commit 0b9df09)

# Conflicts:
#	x-pack/platform/plugins/shared/lens/public/shared_components/coloring/utils.ts
#	x-pack/platform/plugins/shared/lens/public/visualizations/datatable/components/dimension_editor.test.tsx
#	x-pack/platform/plugins/shared/lens/public/visualizations/datatable/visualization.tsx
#	x-pack/platform/plugins/shared/lens/public/visualizations/metric/dimension_editor.tsx
@nickofthyme
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x
8.18

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

Questions ?

Please refer to the Backport tool documentation

nickofthyme pushed a commit to nickofthyme/kibana that referenced this pull request Mar 27, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### Checklist

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

(cherry picked from commit 0b9df09)

# Conflicts:
#	x-pack/platform/plugins/shared/lens/public/shared_components/coloring/utils.ts
#	x-pack/platform/plugins/shared/lens/public/visualizations/datatable/components/dimension_editor.test.tsx
#	x-pack/platform/plugins/shared/lens/public/visualizations/datatable/visualization.tsx
#	x-pack/platform/plugins/shared/lens/public/visualizations/metric/dimension_editor.tsx
nickofthyme added a commit that referenced this pull request Mar 27, 2025
…#213917) (#216118)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Lens][Datatable] Fix color by value for Last value array mode
(#213917)](#213917)

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

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","v9.0.0","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable]
Fix color by value for Last value array
mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214919","number":214919,"state":"MERGED","mergeCommit":{"sha":"ce776eca54a3b56d07d2404486162d5050098d26","message":"[9.0]
[Lens][Datatable] Fix color by value for Last value array mode (#213917)
(#214919)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [[Lens][Datatable] Fix color by value for Last value
array
mode\n(#213917)](https://github.com/elastic/kibana/pull/213917)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Marco Liberati
<dej611@users.noreply.github.com>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
@kibanamachine kibanamachine added v8.18.0 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Mar 27, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

nickofthyme added a commit that referenced this pull request Mar 28, 2025
…213917) (#216117)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Datatable] Fix color by value for Last value array mode
(#213917)](#213917)

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

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","v9.0.0","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable]
Fix color by value for Last value array
mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214919","number":214919,"state":"MERGED","mergeCommit":{"sha":"ce776eca54a3b56d07d2404486162d5050098d26","message":"[9.0]
[Lens][Datatable] Fix color by value for Last value array mode (#213917)
(#214919)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [[Lens][Datatable] Fix color by value for Last value
array
mode\n(#213917)](https://github.com/elastic/kibana/pull/213917)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Marco Liberati
<dej611@users.noreply.github.com>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable]
Fix color by value for Last value array mode (#213917)\n\n##
Summary\n\nFixes the table side of #188263 \n\nThe [fix used
for\n`Metric`](#209110) has
been\ngeneralized and re-used for the datatable
visualization.\n\n\n![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\n\n\n###
Checklist\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","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 28, 2025
cqliu1 pushed a commit to cqliu1/kibana that referenced this pull request Mar 31, 2025
…ic#213917)

## Summary

Fixes the table side of elastic#188263 

The [fix used for
`Metric`](elastic#209110) has been
generalized and re-used for the datatable visualization.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### Checklist

- [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
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:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.18.0 v8.18.1 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants