-
Notifications
You must be signed in to change notification settings - Fork 4.8k
List View: Add multi-select behaviour for blocks when shift key is selected #38314
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
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8749179
List View: Add multi-select behaviour when shift key is selected
andrewserong 4e75817
Ensure shift clicking a block when no blocks are selected selects tha…
andrewserong cfba501
Add support for dragging multiple selected blocks
andrewserong 51376c5
Remove duplication by moving multi-select behaviour to the ListView c…
andrewserong d2fd70d
Add inline comments
andrewserong b6bb2db
Update documentation, add changelog entry
andrewserong 06c731c
Add e2e test for multi-select in the list view
andrewserong edcff8b
Remove stray line from changelog
andrewserong 1362dba
Ensure that clicked on blocks that aren't a part of a selection can s…
andrewserong 74602ca
Try a naive approach to keyboard handling for shift + up/down to sele…
andrewserong 62f32e4
Move block selection to its own useBlockSelection hook
andrewserong 8fbb905
Refactor start and end id calculation to its own function, add unit t…
andrewserong 999568e
Move utility function to utils file, add doc comment, update usage
andrewserong d884e0e
Update multiSelect behavior to support keeping focus within the ListV…
andrewserong 27d63bc
Update unit tests, add additional e2e test for keyboard behaviour
andrewserong c5853bc
Revert change to focus for when shift key is not held
andrewserong 6cb4fb3
Defer calculation of the next/prev clientId to the TreeGrid component…
andrewserong 38b0e5b
Update initialPosition param to be experimental
andrewserong 025087f
Update TreeGrid readme with documentation for the three callback func…
andrewserong c3b6a1e
Add changelog entry
andrewserong b321851
Pass in selectedClientIds to dropdown
andrewserong db31ffd
Prevent shift+click on expand toggle from opening a new window
andrewserong 4f0e0bb
Try announcing deselected blocks
andrewserong 5511896
Rename onChangeRow to onFocusRow, update changelog entry
andrewserong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Try announcing deselected blocks
- Loading branch information
commit 4f0e0bb25692cf11f85952b722481d885fb1f8d2
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message works pretty well in testing.
In terms of code, it could be an option to try moving this announcement to the
multiSelectaction which already has a call tospeak.It should hopefully be possible to combine it with the existing message. Something like '2 blocks selected (Paragraph deselected)'. I'll defer to Alex's call on what the best text would be.
I think it'd be ok to try this out in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming, Dan! I agree, this PR has already gotten fairly big, so it'd probably be a good thing to explore separately as a follow-up.