-
Notifications
You must be signed in to change notification settings - Fork 89
feat(list): Add support for dragging items. #7109
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 all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
59f1968
WIP
driskull ceea051
feat(list): Add support for sorting and dragging items. #6554
driskull 0478bb0
cleanup
driskull 84cd376
Merge branch 'master' into dris0000/sortable-list
driskull 49ce1f8
Merge branch 'master' into dris0000/sortable-list
driskull ae85ebc
Merge branch 'master' into dris0000/sortable-list
driskull 5bcd803
Merge branch 'dris0000/sortable-list' of github.com:Esri/calcite-comp…
driskull 2eae6be
Merge branch 'master' into dris0000/sortable-list
driskull befbfea
cleanup
driskull bf8ecad
add pull/put events
driskull 84502ef
feat(list): Add support for sorting and dragging items. #6554
driskull 88a9258
add comment
driskull 9a7b80d
cleanup
driskull 5ef19b2
cleanup
driskull de11b60
Merge branch 'master' into dris0000/sortable-list
driskull ccc748e
drag handle alignment
driskull 8ab64fe
cleanup
driskull 0cacf88
Merge branch 'master' into dris0000/sortable-list
driskull a2acfdb
wip
driskull ccf0a9a
Merge branch 'master' into dris0000/sortable-list
driskull 628c09f
Merge branch 'main' into dris0000/sortable-list
driskull a553935
Merge branch 'main' into dris0000/sortable-list
driskull 9b6dd24
cleanup
driskull f010af2
cleanup
driskull 24e20e9
Merge branch 'main' into dris0000/sortable-list
driskull 1c922ba
Merge branch 'main' into dris0000/sortable-list
driskull d0eae6a
Merge branch 'main' into dris0000/sortable-list
driskull 19e9eff
event detail
driskull d06d16f
cleanup
driskull 980a144
cleanup
driskull 9b6c5eb
test app
driskull e4943b0
Merge branch 'main' into dris0000/sortable-list
driskull 69c3138
Merge branch 'main' into dris0000/sortable-list
driskull bbf9a68
Merge branch 'main' into dris0000/sortable-list
driskull d20bea8
cleanup slot changes for openable
driskull 99e5e12
WIP sorting keyboard
driskull f97ceea
WIP
driskull 3580920
WIP
driskull f1f94c7
cleanup
driskull 202b9e7
Merge branch 'main' into dris0000/sortable-list
driskull ca77444
cleanup
driskull 83fb4c0
cleanup
driskull 98acf7d
cleanup
driskull b7eb538
cleanup
driskull 4b4329a
Merge branch 'main' into dris0000/sortable-list
driskull e174a94
examples, tests
driskull 162cd5e
cleanup
driskull f820923
fix test
driskull f826ce0
review fixes
driskull 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
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
packages/calcite-components/src/components/handle/assets/handle/t9n/messages.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| { | ||
| "dragHandle": "Drag handle" | ||
| "dragHandle": "Drag handle", | ||
| "dragHandleActive": "Reordering {itemLabel}, current position {position} of {total}.", | ||
| "dragHandleChange": "{itemLabel}, new position {position} of {total}. Press space to confirm.", | ||
| "dragHandleCommit": "{itemLabel}, current position {position} of {total}.", | ||
| "dragHandleIdle": "{itemLabel}, press space and use arrow keys to reorder content. Current position {position} of {total}." | ||
| } |
6 changes: 5 additions & 1 deletion
6
packages/calcite-components/src/components/handle/assets/handle/t9n/messages_en.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| { | ||
| "dragHandle": "Drag handle" | ||
| "dragHandle": "Drag handle", | ||
| "dragHandleActive": "Reordering {itemLabel}, current position {position} of {total}.", | ||
| "dragHandleChange": "{itemLabel}, new position {position} of {total}. Press space to confirm.", | ||
| "dragHandleCommit": "{itemLabel}, current position {position} of {total}.", | ||
| "dragHandleIdle": "{itemLabel}, press space and use arrow keys to reorder content. Current position {position} of {total}." | ||
| } |
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
4 changes: 4 additions & 0 deletions
4
packages/calcite-components/src/components/handle/interfaces.d.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| export interface HandleNudge { | ||
| direction: "up" | "down"; | ||
| } | ||
|
|
||
| export interface HandleChange { | ||
| message: string; | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Does this arrow function need to be called each render?
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.
I think its only called once when the ref is established
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.
I've just seen patterns where we declare a private method on the class for assigning the ref so that the function doesn't have to get recalled on every render, so that stood out to me.