Skip to content

fix(layout): pin the right pane's view switch and hide its scrollbar - #142

Merged
itabajah merged 1 commit into
mainfrom
fix/right-pane-pinned-header-scroll
Jul 13, 2026
Merged

fix(layout): pin the right pane's view switch and hide its scrollbar#142
itabajah merged 1 commit into
mainfrom
fix/right-pane-pinned-header-scroll

Conversation

@itabajah

Copy link
Copy Markdown
Owner

What

The right column (Schedule + Homework, or Exams) scrolled as one block — the Schedule | Exams switch scrolled away with the content, and the pane's scrollbar drew a visible rule down its edge.

Now the right pane is a full-height column that owns its scrolling internally — the same shape LeftPane already used:

  • Desktop (≥ 1024px): the view switch is a fixed header; only the content below it scrolls. The window itself never scrolls.
  • Mobile (≤ 1023px): the panes stack into one page-long scroll, so a fixed header isn't possible — the switch is sticky top-0 instead, pinning to the top of the viewport (on a bg-surface strip) while the column is in view, so it stays reachable from anywhere in the schedule/exams content.
  • Scrollbar hidden via a new scrollbar-hidden utility (scrollbar-width: none + ::-webkit-scrollbar { display: none }). Wheel, touch, and keyboard scrolling are untouched — only the bar is gone. scrollbar-gutter: stable is dropped along with it, since no bar ever appears.

How

  • AppShell: the right column is now overflow-hidden and full height in both desktop branches (fixed 55/45 grid and the draggable PanelGroup); its bottom padding moves inside the pane so it scrolls with the content instead of clipping the pinned header.
  • App.tsx (RightPane): header row + a lg:flex-1 lg:overflow-y-auto scroll field beneath it. scroll-mt-16 on the homework section keeps the mobile "Homework" shortcut from landing under the sticky switch.
  • tsconfig.node.json: adds DOM to lib — Playwright's evaluate callbacks are typed against browser globals.

Verification

pnpm verify green (typecheck, lint, format, 954 unit tests, coverage, build) and all 10 Playwright e2e pass.

New e2e/right-pane-scroll.spec.ts covers all three layout branches: at 1440px and 1100px it asserts the field really overflows, its scrollbar width is 0, scrolling it moves the content, the switch's bounding box does not move, and the window has no overflow; at 390px it asserts the switch stays pinned in the viewport after scrolling.

Manually checked in the running app at 1440 / 1100 / 390px, in both Schedule and Exams views.

Note

The left column's course-list scrollbar is left as-is — the request was about the secondary column. Happy to hide that one too if you want them symmetric.

🤖 Generated with Claude Code

The right column scrolled as one block, so the Schedule | Exams switch drifted
off-screen as soon as the user moved down the calendar or the homework list, and
its scrollbar drew a rule down the edge of the pane.

The pane is now a full-height column that owns its scrolling internally, the same
shape LeftPane already used: the switch is a fixed header and only the content
under it scrolls, in a field whose scrollbar is hidden (new `scrollbar-hidden`
utility — wheel, touch, and keyboard scrolling are untouched). On mobile, where
the panes stack into one page-long scroll, the switch is sticky instead, so it
stays reachable from anywhere in the column.

Covered by e2e/right-pane-scroll.spec.ts across all three layout branches
(fixed 55/45 split, draggable split, stacked).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@itabajah
itabajah merged commit d5612af into main Jul 13, 2026
2 checks passed
@itabajah
itabajah deleted the fix/right-pane-pinned-header-scroll branch July 13, 2026 13:57
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.

1 participant