-
Notifications
You must be signed in to change notification settings - Fork 2
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: Drag & Drop fast follow for card style rows #991
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dfc1be0
row container div for card style and
bsholmes f4bc9de
lint
bsholmes bdda5b3
conditionally use drag container if row is draggable
bsholmes bce35af
lint
bsholmes 420f710
function call
bsholmes 13deb4d
lint
bsholmes b2cc979
cleaner truss, snappier transition
bsholmes c140013
Merge branch 'main' into sc-43820-drag-and-drop-fast-follow
bsholmes a8831c6
fix 'jiggling' issues and debounce dragOver
bsholmes 26f73f8
lint
bsholmes 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
This file contains 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.
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.
question: I'm a little late to the game here, but wouldn't
draggedRow
anddroppedRow
be the same row?It is probably too late to go back and update the implementation at this point, but just spit-balling here; Could we have gotten away with a callback like:
This would give the user the information that a certain row was moved to
newIndex
.Or many even:
If the developer only ever needs to just update their
row
property, this might make their implementations simpler.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.
draggedRow would be the row that was dragged initially, droppedRow would be the row we just dropped the draggedRow onto. We could potentially simplify this callback if we only want it to support reordering, but potentially it could support other kinds of drag & drop behavior and in those cases we want the handler to have info about both rows.
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.
Oh, yes. That is a bit confusing of a name then. I would've assume the row being "dropped" is the row I was dragging. Maybe
targetRow
is a better name?Interesting point about other drag and drop behaviors. Are we being asked to support dropping into another row in order to make the
draggedRow
a child of thetarget/droppedRow
?I'd be tempted to support multiple callbacks for that... like
onReorder
for the current use case, and .... I dunno what else? Would we want to allow rows to drop into each other to nest them or something? I'd be tempted to solution only the problem in front of us instead of envision future scenarios.I'm fine with leaving it as is for now.