Skip to content

feat(tree): multi-selection no longer requires holding shift key #3733

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

Merged

Conversation

anveshmekala
Copy link
Contributor

Related Issue: #3117

Summary

This will enable to select multiple calcite-tree-items when mode is set to multi | multi-children without holding shift key. Additionally, calciteTreeSelect will emit the array of selected items instead of one.

@github-actions github-actions bot added this to the Sprint 12/6 - 12/17 milestone Dec 17, 2021
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Dec 17, 2021
@anveshmekala anveshmekala added the 2 - in development Issues that are actively being worked on. label Dec 17, 2021
@anveshmekala anveshmekala marked this pull request as ready for review December 22, 2021 22:56
@anveshmekala anveshmekala requested a review from a team as a code owner December 22, 2021 22:56
@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Dec 30, 2021
@anveshmekala anveshmekala removed the Stale Issues or pull requests that have not had recent activity. label Dec 30, 2021
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

This is looking good, @anveshmekala!

calcite-tree has a few selection modes, so it'd be good to get some additional manual testing to drive new E2E tests since the current E2E test suite doesn't cover all of them. @benelan Can you help with this?

@jcfranco
Copy link
Member

@anveshmekala Should this use the feat type? I believe multi selection was possible before with the shift key. Also, can you update the PR title to convey this (multi-selection no longer requires holding down the shift key).

@anveshmekala anveshmekala marked this pull request as draft December 31, 2021 20:53
@anveshmekala anveshmekala marked this pull request as ready for review January 7, 2022 17:08
@anveshmekala anveshmekala changed the title fix(tree): enable multi select with pointer feat(tree): multi-selection no longer requires holding shift key Jan 7, 2022
@anveshmekala anveshmekala requested a review from jcfranco January 7, 2022 17:49
@anveshmekala
Copy link
Contributor Author

/merge master

@eriklharper
Copy link
Contributor

/merge master

@benelan
Copy link
Member

benelan commented Jan 24, 2022

Tested the branch locally, LGTM! One thing I noticed is that calciteTreeSelect emits when opening/closing child trees, even though nothing was selected. This happens on master so unrelated to this PR, but is that expected behavior?

cc @jcfranco

Edit - repro sample: https://codepen.io/benesri/pen/QWOLJPa

@jcfranco
Copy link
Member

This happens on master so unrelated to this PR, but is that expected behavior?

I don't think so. That event should be exclusively tied to selection which is different from the visual state of the tree. The doc seems to indicate this as well.

@anveshmekala
Copy link
Contributor Author

/merge master

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Aside from a couple of comments, this LGTM! ✨🌳✨

@jcfranco
Copy link
Member

@benelan @anveshmekala Thanks for doing manual testing on this. 💪

@benelan
Copy link
Member

benelan commented Jan 25, 2022

/merge master

@anveshmekala anveshmekala merged commit b8fdfbf into master Jan 25, 2022
@anveshmekala anveshmekala deleted the anveshmekala/3117-fix-tree-multi-select-with-click branch January 25, 2022 18:21
y0n4 pushed a commit that referenced this pull request Jan 27, 2022
* fix(tree): enable multi select with pointer

* save selected items at main level

* fix single selection mode

* deselect siblings when mode is single

* fix deselecting tree item when mode is multi

* fix deselecting with shift keydown

* refactor e2e test

* remove unused imports in e2e

* feedback changes

* emit calciteTreeSelect event without shift key

* refactor code

* add e2e test and feedback changes

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
y0n4 pushed a commit that referenced this pull request Jan 27, 2022
* fix(label, input, input-message)!: deprecate and no longer support status prop for calcite-label

* alter tests for status being passed in calcite label

* update the readme for labels using status and add status prop to input/input-message

* add deprecated comment for status prop

* refactor(panel, shell, tree-item): Add keys to conditionally rendered slots. (#3962)

* refactor(panel, shell, tree-item): Add keys to conditionally rendered slots.

* add const for key.

* fix code

* review cleanup

* feat(panel): Add method to scroll content. #3924 (#3960)

* ci(screener): updating to Chrome 97 (#3940)

* 1.0.0-next.373

* docs: update component READMEs (#3972)

Co-authored-by: jcfranco <[email protected]>

* ci(screener): enlarging screen resolution (#3977)

* refactor(input): fix all types that are any (#3981)

* refactor: Update relevant components to handle slotting after init (#3889)

* refactor: Update relevant components to use ConditionalSlotComponent #3686

* cleanup

* cleanup

* cleanup

* fix links that aren't direct slots

* remove assigned slot check, only get direct children

* fix test

* cleanup

* cleanup

* partial review fixes

* revert changes to combobox and card

* refactor(slider): remove drag event listeners on component disconnected (#3969)

* refactor(slider): remove eventListeners on DOM disconnected

* feedback changes

* add private method for duplicate code

* rename method

* build: update browserslist db (#3985)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* test(input): when both 'ArrowUp' and 'ArrowDown' are pressed at the same time most recently pressed key takes over (#3989)

Co-authored-by: Eliza Khachatryan <[email protected]>

* alter verbiage of deprecated prop

* ci(screener): restoring pre-Sauce integration settings (#3994)

* docs(template): provide context for the repro samples (#3970)

* docs(templates): provide content for the repro samples

* use cc latest version

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: pin node 16 and npm 8 for volta (#3964)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(readme): remove sketch info until it is up to date (#3996)

* fix(date-picker): update utils locale to get the lang code if regional code is not found (#3968)

* fix(date-picker): update utils locale to get the lang code if regional code is not found

* alter util changes based from pr comments

* 1.0.0-next.374

* ci: allow primary and secondary contacts to merge on all prs (#3999)

* ci: allow primary and secondary contacts to merge on all prs

* cleanup

* use admin token

* fix(date-picker, input-date-picker): update pt-BR and pt-PT localization files (#3980)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(tree):  multi-selection no longer requires holding shift key (#3733)

* fix(tree): enable multi select with pointer

* save selected items at main level

* fix single selection mode

* deselect siblings when mode is single

* fix deselecting tree item when mode is multi

* fix deselecting with shift keydown

* refactor e2e test

* remove unused imports in e2e

* feedback changes

* emit calciteTreeSelect event without shift key

* refactor code

* add e2e test and feedback changes

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 1.0.0-next.375

* test(dropdown): correct logical errors in the test (#3998)

* test(dropdown): correct logical errors in the test

* assert both events after each toggle action and  use page.waitForEvent before doing assertions

Co-authored-by: Eliza Khachatryan <[email protected]>

* deprecate and restore the use of status prop

* restore reading status prop from label

Co-authored-by: Matt Driscoll <[email protected]>
Co-authored-by: Erik Harper <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <[email protected]>
Co-authored-by: jcfranco <[email protected]>
Co-authored-by: Anveshreddy mekala <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eliza Khachatryan <[email protected]>
Co-authored-by: Eliza Khachatryan <[email protected]>
Co-authored-by: JC Franco <[email protected]>
@anveshmekala anveshmekala removed the 2 - in development Issues that are actively being worked on. label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants