fix: compare drag origin against drop target by full path, not key#2640
Open
christianhg wants to merge 1 commit into
Open
fix: compare drag origin against drop target by full path, not key#2640christianhg wants to merge 1 commit into
christianhg wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: c455041 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 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 |
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 744.1 KB | -1 B, -0.0% |
| Internal (gzip) | 142.8 KB | -6 B, -0.0% |
| Bundled (raw) | 1.35 MB | -1 B, -0.0% |
| Bundled (gzip) | 303.8 KB | -5 B, -0.0% |
| Import time | 98ms | -0ms, -0.5% |
@portabletext/editor/behaviors
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 467 B | - |
| Internal (gzip) | 207 B | - |
| Bundled (raw) | 424 B | - |
| Bundled (gzip) | 171 B | - |
| Import time | 2ms | -0ms, -0.3% |
@portabletext/editor/plugins
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 3.6 KB | - |
| Internal (gzip) | 1021 B | - |
| Bundled (raw) | 3.4 KB | - |
| Bundled (gzip) | 952 B | - |
| Import time | 8ms | -0ms, -0.1% |
@portabletext/editor/selectors
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 76.3 KB | - |
| Internal (gzip) | 14.3 KB | - |
| Bundled (raw) | 72.4 KB | - |
| Bundled (gzip) | 13.3 KB | - |
| Import time | 8ms | -0ms, -1.8% |
@portabletext/editor/traversal
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 9.2 KB | - |
| Internal (gzip) | 2.4 KB | - |
| Bundled (raw) | 9.3 KB | - |
| Bundled (gzip) | 2.4 KB | - |
| Import time | 5ms | +0ms, +1.0% |
@portabletext/editor/utils
| Metric | Value | vs main (1b64415) |
|---|---|---|
| Internal (raw) | 30.6 KB | - |
| Internal (gzip) | 6.5 KB | - |
| Bundled (raw) | 28.4 KB | - |
| Bundled (gzip) | 6.1 KB | - |
| Import time | 7ms | -0ms, -1.1% |
🗺️ . · ./behaviors · ./plugins · ./selectors · ./traversal · ./utils · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
drag.dragoverself-drop guard inbehavior.core.drop-position.tsdiscriminates "is the cursor over a dragged block?" by comparing_keystrings. Same bug class as #2638 fixed in the render layer: keys are sibling-unique, not tree-unique.normalize-nodefixes duplicates among siblings (src/slate/core/normalize-node.ts:163, :480), never across branches. Today's flat document hides it because root-level keys are unique among siblings. The moment content nests inside containers, two cells in two rows can have the same_key, and dragging onto one suppresses the indicator on the other.One-line swap:
draggedBlock.node._key === dropFocusBlock.node._key→pathEquals(draggedBlock.path, dropFocusBlock.path). Closes the depth-shared-key bug class wherever dnd discrimination runs.7/7 existing dnd browser tests green.