Skip to content
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

[Visualize] Remove visualization:colorMapping advanced setting #197802

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Oct 25, 2024

Summary

Fixes #193682
Removes the deprecated visualization:colorMapping advanced setting.

Release notes

Thevisualization:colorMapping advanced setting for TSVB and Visualize charts has been removed. Users are encouraged to switch to Lens charts, which offer a more advanced, per-chart color mapping feature with enhanced configuration options. For more details, refer to PR #162389.

@mbondyra mbondyra added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:deprecation Team:Visualizations Visualization editors, elastic-charts and infrastructure backport:version Backport to applied version labels labels Oct 25, 2024
@mbondyra mbondyra changed the title [Visualize] deprecate visualize:color.mapping setting [Visualize] Remove visualization:colorMapping advanced setting Oct 25, 2024
@mbondyra mbondyra force-pushed the visualize/deprecate_color_mapping_setting branch 3 times, most recently from 5db080f to 1b3aa5b Compare October 28, 2024 10:35
@elastic elastic deleted a comment from elasticmachine Oct 28, 2024
@mbondyra mbondyra force-pushed the visualize/deprecate_color_mapping_setting branch from 1b3aa5b to 4911980 Compare October 28, 2024 12:13
@mbondyra
Copy link
Contributor Author

run docs-build

@mbondyra mbondyra marked this pull request as ready for review October 28, 2024 16:00
@mbondyra mbondyra requested review from a team as code owners October 28, 2024 16:00
@elasticmachine
Copy link
Contributor

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

@mbondyra mbondyra force-pushed the visualize/deprecate_color_mapping_setting branch from 0bddc81 to cb7e36d Compare October 31, 2024 08:21
Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

First code review pass, left some comments.

this._oldMap = {};
this._mapping = {};
}

private getConfigColorMapping(): Record<string, string> {
return _.mapValues(this.uiSettings?.get(COLOR_MAPPING_SETTING) || {}, standardizeColor);
return _.mapValues({}, standardizeColor);
Copy link
Contributor

Choose a reason for hiding this comment

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

This will return an empty object now.
If that's the expected result, why just return it?

Suggested change
return _.mapValues({}, standardizeColor);
return {};

And if so the standardizeColor can be removed altogether.

Copy link
Member

Choose a reason for hiding this comment

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

If that is the case, I also believe the entire class can be removed, because it relies on this method to get the color for a specific key.

Copy link
Member

Choose a reason for hiding this comment

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

and probably we can also remove the syncColors functionality that relies on this method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I simplified the MappedColors class but we cannot remove it completely because still need syncColors functionality, unless we decide to remove it from dashboard.

Screenshot 2024-11-11 at 16 28 01

Copy link
Member

Choose a reason for hiding this comment

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

I believe we can remove this from the dashboard (it actually doesn't work anymore as you can see from your code). I will open an issue with that and we can decide later. No need to do that in this PR.

@mbondyra mbondyra force-pushed the visualize/deprecate_color_mapping_setting branch from cb7e36d to 4ab47fc Compare November 11, 2024 13:30
@mbondyra mbondyra marked this pull request as draft November 11, 2024 14:04
@elastic elastic deleted a comment from elasticmachine Nov 11, 2024
@mbondyra mbondyra force-pushed the visualize/deprecate_color_mapping_setting branch from 027a6e0 to e02560d Compare November 12, 2024 06:47
@mbondyra mbondyra marked this pull request as ready for review November 12, 2024 13:36
@nickofthyme nickofthyme requested a review from a team as a code owner November 14, 2024 21:49
@botelastic botelastic bot added Feature:Embedding Embedding content via iFrame Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) labels Nov 14, 2024
@nreese

This comment was marked as resolved.

@nickofthyme nickofthyme added backport:skip This commit does not require backporting and removed backport:version Backport to applied version labels labels Nov 14, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
charts 129 127 -2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
charts 253 252 -1

Async chunks

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

id before after diff
charts 9.4KB 9.5KB +18.0B
visTypeVislib 371.6KB 371.4KB -229.0B
total -211.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
charts 10 9 -1

Page load bundle

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

id before after diff
charts 45.3KB 43.1KB -2.2KB
Unknown metric groups

API count

id before after diff
charts 268 267 -1

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Embedding Embedding content via iFrame Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:deprecation Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove visualization:colorMapping Advanced Setting
7 participants