-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
Add nested list stories #1524
base: experimental
Are you sure you want to change the base?
Add nested list stories #1524
Conversation
🦋 Changeset detectedLatest commit: d111206 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d2619d8
to
bd0c918
Compare
} | ||
} | ||
|
||
// Filter out collisions of items that contain other items |
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 comment could be clarified
// Filter out collisions of items that contain other items | |
// Filter out collisions of droppable children |
@@ -90,4 +95,6 @@ export class Droppable< | |||
public get isDropTarget() { | |||
return this.manager?.dragOperation.target?.id === this.id; | |||
} | |||
|
|||
public path: UniqueIdentifier[] = []; |
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 would make this something like:
@reactive
public accessor parent: UniqueIdentifier | undefined;
@derived
public get path() {
const {droppables} = manager.registry;
const {parent} = this;
const path = [];
let parent = droppables.get(parent);
while (parent) {
path.push(parent.id);
parent = droppables.get(parent.parent);
}
return path;
}
And then the @dnd-kit/dom
implementation can override path
and automatically infer the path based on the DOM if this.parent
is undefined
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 made it more abstract in d111206, but chose to override parent
instead of path
in the @dnd-kit/dom
implementation so that .parent
will still work. Let me know what you think.
d3a0646
to
cd400b1
Compare
x: coordinatesDelta.x / frameTransform.scaleX - sizeDelta.width, | ||
y: coordinatesDelta.y / frameTransform.scaleY - sizeDelta.height, | ||
x: coordinatesDelta.x / frameTransform.scaleX + sizeDelta.width, | ||
y: coordinatesDelta.y / frameTransform.scaleY + sizeDelta.height, |
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.
Had to rework this logic to account for regular size changes, too.
It seems to be mostly working, but keyboard sensor positions item a few px out, which has me suspicious
cd400b1
to
d111206
Compare
Description
This PR:
Nested issues
width
/initialSize.width
logic to account for iframes (fixed incd400b1)
Other issues