-
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] Fixes color mappings special tockens i18n #168152
[Lens] Fixes color mappings special tockens i18n #168152
Conversation
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.
Looks good to me. Tested vis with non-auto-assign values of (empty)
and Other
starting with fr-FR
then en
then finally ja-JP
and all color mappings are correctly assigned even for concatenated fields, even with adding a manual (empty)
and Other
bucket.
Simple fields

Concatenated fields

Probably a rare edge case but I think this would break for fields labeled as (empty)
or Other
. Not worth trying to fix that but if possible in the future would be nice to pass down the original keyed values instead of inverting from a formatted string value.
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
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.
I had to change the translations keys to make CI happy but I added the new keys to our translations files too to make sure that they will be translated.
This works fine, I tested it with french in Chrome
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
## Summary fix elastic#168151 To test: - create a cartesian charts with breakdowns that contains both the `Other` group and an `(empty)` value - apply a manual color mapping that use both these terms by select them from the combo-box, not by typing them. - Then change the Kibana language to a different one other than English and see if the color mapping applies correctly. --------- Co-authored-by: Stratoula Kalafateli <[email protected]> (cherry picked from commit c828ff4)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…68189) # Backport This will backport the following commits from `main` to `8.11`: - [[Lens] Fixes color mappings special tockens i18n (#168152)](#168152) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-06T09:21:41Z","message":"[Lens] Fixes color mappings special tockens i18n (#168152)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/168151\r\n\r\nTo test:\r\n- create a cartesian charts with breakdowns that contains both the\r\n`Other` group and an `(empty)` value\r\n- apply a manual color mapping that use both these terms by select them\r\nfrom the combo-box, not by typing them.\r\n- Then change the Kibana language to a different one other than English\r\nand see if the color mapping applies correctly.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"c828ff49dbf7f4e8ef28adf832ab40bd495ea2db","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.11.0","v8.12.0"],"number":168152,"url":"https://github.com/elastic/kibana/pull/168152","mergeCommit":{"message":"[Lens] Fixes color mappings special tockens i18n (#168152)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/168151\r\n\r\nTo test:\r\n- create a cartesian charts with breakdowns that contains both the\r\n`Other` group and an `(empty)` value\r\n- apply a manual color mapping that use both these terms by select them\r\nfrom the combo-box, not by typing them.\r\n- Then change the Kibana language to a different one other than English\r\nand see if the color mapping applies correctly.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"c828ff49dbf7f4e8ef28adf832ab40bd495ea2db"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168152","number":168152,"mergeCommit":{"message":"[Lens] Fixes color mappings special tockens i18n (#168152)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/168151\r\n\r\nTo test:\r\n- create a cartesian charts with breakdowns that contains both the\r\n`Other` group and an `(empty)` value\r\n- apply a manual color mapping that use both these terms by select them\r\nfrom the combo-box, not by typing them.\r\n- Then change the Kibana language to a different one other than English\r\nand see if the color mapping applies correctly.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"c828ff49dbf7f4e8ef28adf832ab40bd495ea2db"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <[email protected]>
## Summary fix elastic#168151 To test: - create a cartesian charts with breakdowns that contains both the `Other` group and an `(empty)` value - apply a manual color mapping that use both these terms by select them from the combo-box, not by typing them. - Then change the Kibana language to a different one other than English and see if the color mapping applies correctly. --------- Co-authored-by: Stratoula Kalafateli <[email protected]>
Summary
fix #168151
To test:
Other
group and an(empty)
value