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

[Lens] Color mapping UX refactoring #175144

Merged
merged 31 commits into from
Feb 8, 2024

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jan 18, 2024

Summary

This update revisits the UX for the Lens color mapping applying a slightly different UX behaviour to allow looping of colors from a chosen palette.

Screenshot 2024-01-31 at 13 00 45

fix #168891
fix #176076

@markov00 markov00 force-pushed the 2024_01_15-loop_colors_v2 branch from 8ea1d4d to 656c2ed Compare January 22, 2024 15:44
@markov00 markov00 added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jan 31, 2024
@markov00 markov00 force-pushed the 2024_01_15-loop_colors_v2 branch from ac3771b to 1479cd5 Compare February 1, 2024 09:53
@markov00 markov00 marked this pull request as ready for review February 5, 2024 09:24
@markov00 markov00 requested a review from a team as a code owner February 5, 2024 09:24
@stratoula
Copy link
Contributor

stratoula commented Feb 7, 2024

@dej611 I see what you say now!

Yes this is weird. Also why does it take the pink color? I am expecting here the next one (yellowish)

image

@markov00
Copy link
Member Author

markov00 commented Feb 7, 2024

@stratoula @dej611 @ninoslavmiskovic I've aligned the next color selection logic in both cases. Now we choose the next color in the palette after the last one configured in the assignments.
This applies in the loop and the next color when adding a new assignment start and should work as expected.

I've also added the suggestion from Stratoula (and Nino in our call) to hide the unassigned terms section until we don't have at least one assigned term: in fact, this doesn't offer any feature when there are no assignments and it also can create confusion if you play with that before assigning terms. @MichaelMarcialis please let us know if is fine for you.

@MichaelMarcialis
Copy link
Contributor

I've also added the suggestion from Stratoula (and Nino in our call) to hide the unassigned terms section until we don't have at least one assigned term: in fact, this doesn't offer any feature when there are no assignments and it also can create confusion if you play with that before assigning terms. @MichaelMarcialis please let us know if is fine for you.

@markov00: Makes sense to me. Let's do it!

@elastic elastic deleted a comment from stratoula Feb 7, 2024
@stratoula
Copy link
Contributor

/ci

@stratoula
Copy link
Contributor

I tested it again and works great now!

@markov00 I just find the third disabled swatch a bit weird. When you click the single color I understood why we have it there. Does it make sense to hide it until the user clicks the single color? Or am I missing something obvious here?

What about this?

Also on the inline editing, when the flyout has its maximum width, the left column has a big space with the right one. Can they be responsive ?

image

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This works great! LGTM! Looking forward to making this the default and remove the switch! 🎉

@stratoula
Copy link
Contributor

/ci

@markov00 markov00 enabled auto-merge (squash) February 8, 2024 11:36
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.

Tested locally in Safari 👍

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
charts 122 125 +3
eventAnnotationListing 466 469 +3
expressionHeatmap 156 159 +3
expressionMetricVis 97 100 +3
expressionPartitionVis 171 174 +3
expressionTagcloud 145 148 +3
expressionXY 231 234 +3
lens 1260 1263 +3
visDefaultEditor 188 191 +3
visTypeTimeseries 442 445 +3
total +30

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
@kbn/coloring 174 180 +6

Async chunks

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

id before after diff
expressionPartitionVis 40.8KB 36.4KB -4.4KB
expressionTagcloud 23.2KB 18.8KB -4.3KB
expressionXY 132.6KB 128.2KB -4.3KB
lens 1.4MB 1.4MB +1.3KB
total -11.8KB

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
@kbn/coloring 8 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
expressionPartitionVis 27.5KB 27.4KB -161.0B
expressionTagcloud 11.7KB 11.5KB -161.0B
expressionXY 40.7KB 40.5KB -161.0B
lens 45.4KB 45.4KB -1.0B
total -484.0B
Unknown metric groups

API count

id before after diff
@kbn/coloring 211 217 +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@markov00 markov00 merged commit 0ed5fe6 into elastic:main Feb 8, 2024
19 checks passed
@markov00 markov00 deleted the 2024_01_15-loop_colors_v2 branch February 8, 2024 13:24
@kibanamachine kibanamachine added v8.13.0 backport:skip This commit does not require backporting labels Feb 8, 2024
markov00 added a commit that referenced this pull request Feb 9, 2024
## Summary

This PR hides the single color picker when the color palette is selected
in the button group as agreed with @MichaelMarcialis and @stratoula
(initial conversation here #175144
followed by an offline one)

From this:
<img width="362" alt="Screenshot 2024-02-09 at 09 20 37"
src="https://github.com/elastic/kibana/assets/1421091/5f68fc57-627b-45b7-90e8-1aa78ee4b5b2">

To this:
<img width="376" alt="Screenshot 2024-02-09 at 09 19 51"
src="https://github.com/elastic/kibana/assets/1421091/fbefee5b-74e2-48e0-937b-c9e8e4699dce">
<img width="371" alt="Screenshot 2024-02-09 at 09 19 48"
src="https://github.com/elastic/kibana/assets/1421091/677c1f7f-c02f-4d77-a18f-ea2ffd22f874">
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
This commit revisits the UX for the Lens color mapping applying a
slightly different UX behaviour to allow looping of colors from a chosen
palette.
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…176564)

## Summary

This PR hides the single color picker when the color palette is selected
in the button group as agreed with @MichaelMarcialis and @stratoula
(initial conversation here elastic#175144
followed by an offline one)

From this:
<img width="362" alt="Screenshot 2024-02-09 at 09 20 37"
src="https://github.com/elastic/kibana/assets/1421091/5f68fc57-627b-45b7-90e8-1aa78ee4b5b2">

To this:
<img width="376" alt="Screenshot 2024-02-09 at 09 19 51"
src="https://github.com/elastic/kibana/assets/1421091/fbefee5b-74e2-48e0-937b-c9e8e4699dce">
<img width="371" alt="Screenshot 2024-02-09 at 09 19 48"
src="https://github.com/elastic/kibana/assets/1421091/677c1f7f-c02f-4d77-a18f-ea2ffd22f874">
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
This commit revisits the UX for the Lens color mapping applying a
slightly different UX behaviour to allow looping of colors from a chosen
palette.
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…176564)

## Summary

This PR hides the single color picker when the color palette is selected
in the button group as agreed with @MichaelMarcialis and @stratoula
(initial conversation here elastic#175144
followed by an offline one)

From this:
<img width="362" alt="Screenshot 2024-02-09 at 09 20 37"
src="https://github.com/elastic/kibana/assets/1421091/5f68fc57-627b-45b7-90e8-1aa78ee4b5b2">

To this:
<img width="376" alt="Screenshot 2024-02-09 at 09 19 51"
src="https://github.com/elastic/kibana/assets/1421091/fbefee5b-74e2-48e0-937b-c9e8e4699dce">
<img width="371" alt="Screenshot 2024-02-09 at 09 19 48"
src="https://github.com/elastic/kibana/assets/1421091/677c1f7f-c02f-4d77-a18f-ea2ffd22f874">
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 enhancement New value added to drive a business result Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color mapping feature case-sensitivity [Lens] Add option to color all terms in new color mapping UX
7 participants