Skip to content

Keep the comment composer clear of selected text - #5134

Merged
zbeyens merged 4 commits into
udecode:mainfrom
minwookshin:codex/keep-comment-selection-visible
Sep 29, 2026
Merged

zbeyens merged 4 commits into
udecode:mainfrom
minwookshin:codex/keep-comment-selection-visible

Conversation

@minwookshin

@minwookshin minwookshin commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🐛 Fixes the draft comment composer covering or detaching from selected text; related to #5127.
🧭 Task plan: docs/plans/2026-09-28-plate-5134-main-comment-selection.md
🟢 High confidence in the scoped placement fix.

Phase 🧪 Tests 🌐 Browser
Reproduced ➖ N/A — browser geometry failure 🔴 On original main, the composer covered the first selected line near the top of a 900×330 viewport and detached from the selection near the bottom.
Verified 🟢 pnpm check, website typecheck, registry source/changelog checks, clean structured review 🟢 Real /blocks/editor-ai proof: top/bottom placement, backward multi-block selection, and scroll-driven flip kept the marked range clear with no console/request/page errors.

✅ Outcome Draft comments stay next to the full selected range and keep it clear whenever the composer fits on either side. This targets main as requested.

⚠️ Caveat When neither side fits the full selection, standard Radix shift and available-height behavior applies. Browser proof covers Chrome with the real registry components; other engines and physical devices were not tested. CI owns generated registry payloads.

🏗️ Design Preserve the focus block before collapsing the selection. Merge the live rectangles of every draft-marked leaf through @platejs/floating; let Radix own flip, shift, offset, and collision policy; use Radix's always update strategy only while drafting so the virtual range follows editor scrolling. Existing discussion and suggestion anchoring is unchanged.

🧪 Verified pnpm check, pnpm g:build, pnpm --filter www typecheck, pnpm lint:fix, registry source/changelog validation, focused browser geometry, and structured local review passed. The copied registry item declares @platejs/floating; no published package API changed.

@codesandbox

codesandbox Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@changeset-bot

changeset-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c4516b9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@minwookshin

Copy link
Copy Markdown
Contributor Author

Synced with current next; Base UI and Radix placement checks pass on the pushed commit (6/6 in Chrome).
Broader check blockers are documented in the PR description.

@minwookshin
minwookshin marked this pull request as ready for review September 27, 2026 23:58
@minwookshin
minwookshin requested a review from a team September 27, 2026 23:58
@zbeyens

zbeyens commented Sep 28, 2026

Copy link
Copy Markdown
Member

next has no release lane yet. Feel free to PR against main instead.

@minwookshin
minwookshin changed the base branch from next to main September 28, 2026 22:47
@minwookshin
minwookshin force-pushed the codex/keep-comment-selection-visible branch from 0ca7836 to 9d72098 Compare September 28, 2026 22:47
@minwookshin minwookshin changed the title Keep selected text visible when the comment composer flips above it Keep the comment composer clear of selected text Sep 28, 2026
@minwookshin

minwookshin commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated this against main and verified short, wrapped, and multi-block selections. Local pnpm check and the website typecheck pass; the fork workflows are waiting for maintainer approval.

@zbeyens

zbeyens commented Sep 29, 2026

Copy link
Copy Markdown
Member

next has no release lane yet. Feel free to PR against main instead.

Resolved and replayed on be74f847d26d074c081e63fb1ce1be68aa4ac686: PR #5134 targets main; its dedicated task plan exists at this exact head and names only PR #5134. Full local checks and focused browser proof pass.

@zbeyens

zbeyens commented Sep 29, 2026

Copy link
Copy Markdown
Member

Autoclosure receipt

Exact head: c4516b99c95654f5b36c2904b1d4806d8ebb3211.

P1 replay on this head:

  • local committed HEAD = fetched refs/pr/5134 = live headRefOid = the OID above;
  • PR is open against main;
  • the body contains exactly one task-plan line;
  • docs/plans/2026-09-28-plate-5134-main-comment-selection.md exists at this head and names only PR Keep the comment composer clear of selected text #5134;
  • pnpm check and the goal-plan checker pass; focused website typecheck, registry source/changelog checks, browser geometry, and clean second autoreview pass;
  • GitHub Sync auto-release checkbox check passes.

Final feedback readback before this receipt: 0 inline threads, 0 review bodies/reviews, 6 top-level comments, 0 unresolved actionable P1+.

Feedback ledger:

No P2/P3 deferrals. No merge performed.

@zbeyens
zbeyens merged commit 92b1eb9 into udecode:main Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants