Repository navigation
Size the orphaned comments popover against the document, not its pill - #511
Merged
Merged
Conversation
Collaborator
Author
|
Review: Looks good I checked this in a production build against the fake server on port 8827, using my own headless Playwright script. The test documents had 6 orphaned comments, and one had 1 orphan plus anchored comments. What I verified
Non-blocking
CI: container passed, format/lint/types/tests passed, e2e passed. |
The orphaned comments card shares `.plan-comment-card`, whose width and max-height are percentages of the containing block. Its containing block was the pill's own absolutely positioned wrapper, so the card resolved to roughly the pill's width and less than its height, showing only a sliver of the first avatar. The wrapper now spans the layer's height, pointer-transparent, and the card takes its width from the document's inline-size container. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A selection's fixed formatting toolbar stayed above an open orphan or anchored comment card and covered it. The orphan card's offset is now one custom property shared by its top and max-height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
design-orphan-comments-popover
branch
from
October 12, 2026 10:48
342eb7a to
f0000c1
Compare
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.
Clicking N comment(s) without prose opened a ~14px sliver under the pill — only the top of an avatar showed.
Root cause. The orphan card reuses
.plan-comment-card, whosewidth: min(20rem, calc(100% - 1.5rem))andmax-height: calc(100% - 1rem)resolve against the containing block. For anchored cards that is the full-document comment layer, but for the orphan card it was.plan-comment-orphans— the pill's own absolutely positioned wrapper. So the card was about the pill's width minus 24px, and its height was the pill's height minus 16px.Fix (CSS only). The wrapper now stretches to the layer's height (
bottom: 0.5rem) and stops taking pointer events itself (the pill and card still do). The orphan card takeswidth: min(20rem, calc(100cqi - 1rem))from the document's inline-size container andmax-height: calc(100% - 2.5rem), so it ends 0.5rem above the document's bottom edge and scrolls when there are many. It stays right-aligned to the pill. Escape and outside-click dismissal are unchanged. The phone sheet uses a different path and already worked. Header layout is untouched (see #507).Short window with four orphaned comments: the card is bounded by the document and scrolls.
Phone (sheet path, unchanged):
Tests. A new e2e test in
e2e/sidecar.e2e.tsopens the popover at 1280×800 and checks the following: the quote and the Reply field are fully in view, the card does not overflow, it is at least 280px wide, it sits below the pill, it is right-aligned to the pill, and Escape returns focus to the pill. Onmainthis test fails at the Reply visibility check. With the fix, all four orphan tests pass locally.bun run typespasses.There is no app dark theme, so I only checked light mode.
🤖 Generated with Claude Code