Repository navigation
Dock the comment composer on narrow screens - #151
Open
jwarwick78 wants to merge 1 commit into
Open
jwarwick78 wants to merge 1 commit into
jwarwick78 wants to merge 1 commit into
Conversation
Below the 1100px review-rail breakpoint the anchored rail is hidden and the comment composer stacks above the document. Autofocusing it drags the scroll container back to 0, so adding a comment deep in a document costs the reviewer their place. Render the composer in a fixed dock at the bottom of the viewport instead. Out of the document flow, focus has nothing to scroll into view. The dock mirrors the document column's gutter and max width so it reads as part of the page, and it layers below the fixed review-handoff controls so the handoff button stays clickable. When the dock would cover the highlight that was just commented on, scroll by the smallest amount that clears it rather than jumping to the anchor. The document also grows bottom padding matching the dock height so a comment on the last line still has room to clear. Above the breakpoint the anchored rail is unchanged. Also fixes a dark-mode regression this surfaces: the banner comment body used bg-white with no dark variant, which was invisible on a white panel but obvious once the dock became the primary comment surface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@jwarwick78 is attempting to deploy a commit to the Lex Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
You're deep in a spec. You find the sentence that's wrong. You highlight it, hit Comment, and Roughdraft throws you back to the top of the document to type. Then you go hunt for your place again. Every time.
Under 1100px the review rail is hidden, so the composer stacks above the document. Focusing it drags the scroll container to 0.
So I docked it to the bottom instead.
Now there's nothing to scroll into view. The composer floats over the page, lined up with the text column so it reads like part of the document instead of a window that wandered in. If your highlight would land behind the dock, the page nudges up by the smallest amount that clears it. 100px in the test case. You barely notice.
It sits under the handoff controls in the stack, so "I'm done" stays clickable while a comment is open.
Above 1100px I changed nothing. The anchored rail is good. I left it alone.
One freebie while I was in there: the comment body was
bg-whitewith no dark variant. Invisible before, because it sat on a white panel. Once it became the main surface at narrow widths it lit up like a fridge. One line.Tests
5 Playwright specs. I reverted the source with the tests in place, and the two that matter fail while the wide-viewport one keeps passing. 6 unit tests on the clearance math.
pnpm checkandpnpm test:smokeboth green. Screenshot guide updated.Happy long weekend.