mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
## Summary Refactors color mapping logic to store raw values in save objects. Main changes: - Instead assignments having a single rule with many values, we now have assignments with multiple rules of varying types with a single value. - As per the previous change, there is no more explicit `auto` rule, this is now implicit when there are no rules in the assignment. - Raw values can now be raw and in cases such as `RangeKey`s and `MultiValueKey`s can be instance values. This is not ok for storing in redux nor the SO so be have added a `serialize` methods to facilitate this value storage. Code changes attempt to identify which value is used based on variable/param names and type aliases as both are `unknown`. - For values that are non-string or non-number types, we no longer allow creating custom matching options. - Values are now correctly formatted. - Add runtime migration for `xy`, `partition`, `tagcloud` and `datatable` viz. Requires `formBased` `datasourceState` to determine best string-to-raw value convertion. Closes #193080 Fixes #187519 ### Checklist - [x] 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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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) ### Identify risks <!-- Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging --> - [x] Migration from previous stored types. ## Release note This PR fixes an issue ([#193080](https://github.com/elastic/kibana/issues/193080)) where custom ranges and multi-field values were not correctly colored based on selected color mapping configurations. This change includes a runtime migration to convert old mappings as strings to their raw value equivalent. This conversion is done at runtime when the vis is rendered and only updated when the visualization is saved. Thus this conversion does not dirty the state of the visualization such as when first opening to edit. This _should_ have no affect to the user apart from improved value formatting in the color mapping assignment selection UI. In rare cases, some assignments may not be correctly converted exactly to the new raw value but are still preserved to use as string value matches. The only know case where we are not be able to fully convert the value is when using labels on custom ranges, the label will not show in the color mapping assignment UI unless the value is removed as added back. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co> |
||
---|---|---|
.. | ||
kbn-babel-preset | ||
kbn-bazel-runner | ||
kbn-capture-oas-snapshot-cli | ||
kbn-check-mappings-update-cli | ||
kbn-check-prod-native-modules-cli | ||
kbn-ci-stats-performance-metrics | ||
kbn-ci-stats-shipper-cli | ||
kbn-cli-dev-mode | ||
kbn-dependency-ownership | ||
kbn-dependency-usage | ||
kbn-docs-utils | ||
kbn-eslint-config | ||
kbn-eslint-plugin-disable | ||
kbn-eslint-plugin-eslint | ||
kbn-eslint-plugin-eui-a11y | ||
kbn-eslint-plugin-i18n | ||
kbn-eslint-plugin-imports | ||
kbn-eslint-plugin-telemetry | ||
kbn-failed-test-reporter-cli | ||
kbn-find-used-node-modules | ||
kbn-generate | ||
kbn-generate-console-definitions | ||
kbn-import-locator | ||
kbn-json-ast | ||
kbn-kibana-manifest-schema | ||
kbn-lint-packages-cli | ||
kbn-lint-ts-projects-cli | ||
kbn-lock-manager | ||
kbn-managed-vscode-config | ||
kbn-managed-vscode-config-cli | ||
kbn-manifest | ||
kbn-mock-idp-plugin | ||
kbn-optimizer | ||
kbn-peggy-loader | ||
kbn-performance-testing-dataset-extractor | ||
kbn-picomatcher | ||
kbn-plugin-check | ||
kbn-plugin-generator | ||
kbn-plugin-helpers | ||
kbn-relocate | ||
kbn-repo-file-maps | ||
kbn-repo-linter | ||
kbn-repo-source-classifier | ||
kbn-repo-source-classifier-cli | ||
kbn-set-map | ||
kbn-sort-package-json | ||
kbn-styled-components-mapping-cli | ||
kbn-ts-projects | ||
kbn-ts-type-check-cli | ||
kbn-validate-next-docs-cli | ||
kbn-web-worker-stub | ||
kbn-whereis-pkg-cli | ||
kbn-yarn-lock-validator |