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

feat(Legend): change click on item behaviour #2427

Merged
merged 24 commits into from May 14, 2024

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented May 8, 2024

Summary

Clicking on a legend item has been improved to isolate a series on first click, show all series on second click.
Also, when clicking on a hidden series now will add the selected series into the visible set.

BREAKING CHANGE

The modifier key has been changed to CTRL (or CMD on Mac) from SHIFT. The SHIFT key will no longer have any effect on click.

Details

A full description of the new behaviour:

First click isolates selected element, then behave according to context (if single element is selected, restore all, otherwise toggle on off).

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • Unit tests have been added or updated to match the most common scenarios

@dej611 dej611 added :legend Legend related issue :xy Bar/Line/Area chart related labels May 8, 2024
@markov00 markov00 changed the title [Legend] Change click on item behaviour feat(legend): change click on item behaviour May 8, 2024
@dej611
Copy link
Contributor Author

dej611 commented May 9, 2024

buildkite update screenshots

@dej611 dej611 changed the title feat(legend): change click on item behaviour feat(Legend): change click on item behaviour May 9, 2024
@dej611 dej611 marked this pull request as ready for review May 9, 2024 15:13
@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

Now all checks are passing @markov00 . It was a wrong casting in the playwright test.

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611 dej611 marked this pull request as draft May 14, 2024 12:14
@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

buildkite update screenshots

@dej611
Copy link
Contributor Author

dej611 commented May 14, 2024

All screenshots are now being checked and resolved with no changes from the main branch.

@dej611 dej611 marked this pull request as ready for review May 14, 2024 14:22
@dej611 dej611 merged commit b1c72df into elastic:main May 14, 2024
14 checks passed
@dej611 dej611 deleted the feat/legend-click-behaviour branch May 14, 2024 14:56
dej611 added a commit to dej611/elastic-charts that referenced this pull request May 16, 2024
dej611 added a commit that referenced this pull request May 16, 2024
Revert "feat(Legend): change click on item behaviour (#2427)"

This reverts commit b1c72df.
dej611 added a commit to dej611/elastic-charts that referenced this pull request May 16, 2024
* ✨ New click behaviour + CMD as new meta key

* ✅ Add tests

* test(vrt): update screenshots [skip ci]

* ✅ Fix test

* ✅ fix id

* 👌 Revisit comments

* 🐛 Add os specific detection

* ✅ fix test

* ♻️ Restore test

* ✨ Add new command for playwright

* 📸 Update screenshots

* Revert "📸 Update screenshots"

This reverts commit 332c895.

* ✅ Move os detection

* ✅ Move the check back

* ✅ fix with new behaviour

* ✅ Fix tests with new behaviour

* ♻️ Refactor for TS

* ✅ Fix tests

* test(vrt): update screenshots [skip ci]

* ✅ Fix more tests

* test(vrt): update screenshots [skip ci]

* :white_check_make: Refactor tests

* test(vrt): update screenshots [skip ci]

---------

Co-authored-by: elastic-datavis[bot] <98618603+elastic-datavis[bot]@users.noreply.github.com>
nickofthyme pushed a commit that referenced this pull request May 20, 2024
# [65.0.0](v64.1.0...v65.0.0) (2024-05-20)

### Bug Fixes

* **barSeries:** error rendering bars with negative log scale ([#2407](#2407)) ([4ab6d8f](4ab6d8f))
* **deps:** update dependency @elastic/eui to ^93.5.1 ([#2375](#2375)) ([35ed956](35ed956))
* **deps:** update dependency @elastic/eui to ^93.5.2 ([#2386](#2386)) ([e26c6dd](e26c6dd))
* **deps:** update dependency @elastic/eui to ^93.6.0 ([#2393](#2393)) ([40f2b7b](40f2b7b))
* **deps:** update dependency @elastic/eui to ^94.3.0 ([#2424](#2424)) ([cff5181](cff5181))
* **deps:** update dependency @elastic/eui to v94 ([#2409](#2409)) ([67c814f](67c814f))
* **deps:** update dependency @playwright/test to ^1.43.0 ([#2388](#2388)) ([42f86d7](42f86d7))
* **deps:** update dependency @playwright/test to ^1.43.1 ([#2413](#2413)) ([79b1c7f](79b1c7f))
* **deps:** update dependency json-schema-to-typescript to v14 ([#2414](#2414)) ([785f635](785f635))
* **deps:** update dependency json-schema-to-typescript to v14.0.4 ([#2421](#2421)) ([790170a](790170a))
* **legend:** custom legend covered by background ([#2366](#2366)) ([5b9ffac](5b9ffac))

### Features

* add support for start day of week on MLT axis ([#2362](#2362)) ([3aac1f0](3aac1f0))
* **Legend:** change click on item behaviour ([#2427](#2427)) ([b1c72df](b1c72df))
* **legend:** change click on item behaviour ([#2431](#2431)) ([b03bdd0](b03bdd0))
* **legend:** Improve interactions legend labels ([#2418](#2418)) ([384baac](384baac))
* **legend:** select legend statistic value ([#2355](#2355)) ([a602838](a602838))
* **metric:** support array of values ([#2428](#2428)) ([e448bd7](e448bd7))

### Reverts

* **legend:** change click on item behaviour ([#2429](#2429)) ([cc438a1](cc438a1)), closes [#2427](#2427)

### BREAKING CHANGES

* **legend:** The legend modifier key has been changed to CTRL (or CMD on Mac) from SHIFT. The SHIFT key will no longer have any effect on click.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:legend Legend related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants