Skip to content

Keep the commented text above the comment sheet on a phone - #189

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:sheet-scroll
Nov 15, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:sheet-scroll

Conversation

@splitbrain-bot

Copy link
Copy Markdown

Summary: On a phone, the line or block that the reviewer comments on stays visible directly above the comment sheet.

Changes:

  • ComposerSheet reports the top of the area that the sheet and the keyboard cover. It measures again after the slide-in animation and when the visible area changes.
  • The review pane scrolls so the end of the commented line or block sits 8px above that top, in the source view and in the rendered view. A block taller than the free space shows its end next to the form. The scroll follows the sheet, the keyboard and the pane resize until the reviewer scrolls.
  • While the sheet is open, the pane gets bottom padding as tall as the covered area, so the last lines of a file can scroll above the sheet.
  • The review header hides while the sheet is open, to give the text more room.
  • SheetContent takes an overlayClassName. The comment sheet uses bg-black/25, and the other sheets keep their overlay.
  • The desktop layout does not change.

Tests: e2e tests on the phone viewport for a line in the source view and a block in the rendered view near the end of a file. The test browser has no keyboard, so the behavior with a real keyboard is not tested.

On a phone, the comment sheet and the keyboard covered the lower half of
the screen, so a line or a block tapped in that part was hidden behind
them, and a dark overlay dimmed the rest.

The sheet now reports the top of the area that it and the keyboard
cover, and the review pane scrolls so the end of the commented line or
block sits just above it. The scroll follows the sheet animation, the
keyboard and the pane resize until the reviewer scrolls. A bottom
padding lets the last lines of a file scroll above the sheet. The review
header hides while the sheet is open, to give the text more room, and
the overlay of the comment sheet is lighter.
@splitbrain
splitbrain merged commit f99004c into splitbrain:main Nov 15, 2026
5 checks 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