Repository navigation
fix(plugin-page-builder): rank every canvas droppable on one scale - #831
Conversation
collisionPriority OVERRIDES the detector's own value rather than filling a gap: @dnd-kit/abstract applies it after the detector has decided, and the detector assigns High when the pointer is inside an element and Normal otherwise. There is no default of zero. So giving gap zones a depth starting at 1 while leaving the grid's before: and append: droppables unset did not leave those neutral - it left them on the detector's scale, sharing numbers with shallow depths. Which kind won then depended on how deeply the document nested: grid targets outranked gap zones near the root and lost to them further down. Every canvas droppable now takes its priority from canvasPriority(depth). before: ranks at its node's own depth, since it marks a position among siblings; append: one level in, since it targets the grid's own children. The scale is based above the detector's range so a droppable that ever misses its priority loses to every ranked one at any depth, which fails loudly instead of plausibly. Nothing failed before this: grids carry no interleaved gap zones, so the two kinds only meet where a grid sits beside block flow, and no fixture nests one deep enough to cross over. That was a fixture gap rather than evidence, so the new test asserts the scale against CollisionPriority itself - read from @dnd-kit/abstract, now declared, rather than copied as literals that would keep passing after the library changed them.
|
@codex please review this PR |
|
Warning Review limit reached
Next review available in: 30 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8682ae760
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
The 24 packages version together, so a hand-written list leaves the omitted ones bumped with no changelog entry. Generated from the fixed group in .changeset/config.json rather than typed, which is the only form that cannot drift as that group changes.
…ty-scale # Conflicts: # packages/plugin-page-builder/src/admin/canvas/CanvasNode.tsx
|
@codex please review this PR |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
collisionPriorityoverrides the detector's own value rather than filling a gap.@dnd-kit/abstractapplies it after the detector has already decided:and the detector assigns
High(3) when the pointer is inside an element,Normal(2) otherwise. There is no default of zero.So #813 giving gap zones a depth starting at 1, while leaving the grid's
before:andappend:droppables unset, did not leave those neutral — it left them on the detector's scale, sharing numbers with shallow depths. Which kind won then depended on how deeply the document nested: grid targets outranked gap zones near the root and lost to them further down. Nobody intended that.What changes
Every canvas droppable takes its priority from
canvasPriority(depth):before:ranks at its node's own depth — it marks a position among siblings, so it competes with the gap zones beside it.append:ranks one level in — it targets a position among the grid's own children.The scale is based above the detector's range, so a droppable that ever misses its priority loses to every ranked one at any depth. That is a loud, constant failure instead of a plausible one that varies with nesting.
On the evidence
Nothing failed before this. Grids carry no interleaved gap zones, so the two kinds only meet where a grid sits beside ordinary block flow, and no fixture nests one deep enough for the scales to cross. That is a fixture gap rather than evidence of correctness, so it is stated rather than left to read as coverage.
The new test asserts the scale against
CollisionPriorityitself, read from@dnd-kit/abstract— now declared as a devDependency — rather than copied as the literals 2 and 3, which would keep passing after the library changed them.Verification
Found by lane 20468 reading
@dnd-kit/abstractsource, correcting a warning I had given them backwards. Filed attasks/left-tasks/2026-08-15-0100-two-priority-scales-in-the-canvas.md.Once this lands, the tie #829 documents as a stated limit stops being reachable at all.