Skip to content

Feature/scrollbar fix - #122

Open
MikolajSzczepkowski wants to merge 3 commits into
devfrom
feature/scrollbar-fix
Open

MikolajSzczepkowski wants to merge 3 commits into
devfrom
feature/scrollbar-fix

Conversation

@MikolajSzczepkowski

@MikolajSzczepkowski MikolajSzczepkowski commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Why

How it was tested

Linked issue

https://app.asana.com/1/9116197837664/project/1219757752291653/task/1219942733320344?focus=true
Closes #34

Screenshots

Before is dev at bf9232d and after is this branch at 3ed89d5, both on a local server against the dev API at 1440 by 900. The chat thread is a seeded 16-message conversation.

Change Before After
Provider menu, scrolled Provider menu scrolled: the Apply button covers the World Food Programme row, no scrollbar Provider menu scrolled: a sage scrollbar shows and Apply sits in its own foot under the list
Long chat thread Studio chat thread with no scrollbar Studio chat thread with a thin stone scrollbar

- Opt in to a thin, trackless bar despite the global scrollbar hiding
- Widen chat ordered-list padding so two-digit markers aren't clipped
- Portal Apply below the list's scroll region so it covers no row
- Draw persistent scrollbars Chrome honours; thin bar in Firefox
- Drop the pinned-option accent bar, keep only its weight
@jm-rivera

Copy link
Copy Markdown
Contributor

Claude's automated review (Claude Code), posted from Jorge's account. It is a machine review, so treat each point as a lead to check.

UX

  • src/components/organisms/Studio/workspace/ChatPanel.module.scss:580: .chatScroll's mask-image fades the element to full transparency over its top and bottom 24 px, and Chrome and Safari apply it to the scrollbar too. A chat usually rests scrolled to the bottom, where the thumb fades out; the after screenshot in this PR shows it.
  • src/components/organisms/DataSearch/DataSearch.module.scss:607: the styled bar takes 6 px of layout width and nothing sets scrollbar-gutter: stable. Typing in the place filter can take the list in and out of overflow, so rows widen and narrow by 6 px on each keystroke. In the chat, right-aligned user bubbles jump left when a thread first overflows.
  • DataSearch.module.scss:669: .placeList is a fixed rem(300) wide with a -rem(10) bleed, so the scrollbar pushes it past the padding box. overflow-x: hidden hides the overflow but clips each row's hover fill and right radius in the 216-row place picker. Sizing it calc(100% + rem(20)), as .slotOption does, removes the cause and the need for the clip.
  • DataSearch.module.scss:632: .slotMenuBody keeps overflow-y: auto (so overflow-x computes to auto) and now turns the scrollbar back on with a width but no height. Menus without the split, such as Refine (SearchSentence.tsx) and GalleryFilter, can show a full-thickness horizontal bar from the subpixel overflow of the full-bleed rows. .chatScroll has the same exposure with wide tables or code.

Correctness

  • src/components/organisms/DataSearch/SlotMenu.tsx:505: a null context value means both "outside a SlotMenu" and "foot not committed yet", so every open mounts Apply in the scroll list, then unmounts it and mounts a fresh button in the portal, and positioning can measure the panel in between. Every call site sits inside a SlotMenu or OptionSubmenu, so the in-place branch never runs in practice. An undefined sentinel for "outside", or having the shell render the foot directly, removes the double pass.

Comments

  • DataSearch.module.scss:784: the old comment about "the current pick's accent bar" still sits directly above the new comment saying the bar is gone.
  • SlotMenu.tsx:213 ("through a sticky Apply"), SlotMenu.tsx:390 and DataSearch.module.scss:682, 897 and 1785 still say .slotMenuBody scrolls. In SlotMenu and OptionSubmenu the scroller is now .slotMenuScroll, so a maintainer following them edits the wrong class.
  • DataSearch.module.scss:708 ("rather than pinned inside it") and 788 (the bar that "read as a stray mark") describe the removed design. Comments that state what the code does now age better.

@jm-rivera jm-rivera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikolajSzczepkowski please see the automated review comments.

- Keep row widths stable when a filter toggles list overflow
- Keep the chat scrollbar thumb out of the edge fade mask
- Render nothing for Apply until the menu foot is committed
@MikolajSzczepkowski

Copy link
Copy Markdown
Collaborator Author

Thanks, all addressed in the follow-up commits.

  • Chat mask: the mask is now two layers, the fade over the content and a solid 6 px column over the scrollbar gutter, so the thumb stays visible at the thread's resting bottom.
  • Gutter: scrollbar-gutter: stable on the menu scroller mixin and on .chatScroll. Filtering the place list no longer resizes the rows, and user bubbles keep their right edge when a thread first overflows.
  • .placeList: sized calc(100% + rem(20)) like .slotOption, so it ends at the padding edge and nothing is clipped. The overflow-x: hidden workaround is gone with the cause.
  • Horizontal bar: the mixin sets overflow: hidden auto, so .slotMenuBody (Refine, GalleryFilter) and .slotMenuScroll never scroll sideways; .chatScroll likewise, with pre scrolling on its own.
  • Double mount: the foot context now distinguishes undefined (outside a SlotMenu, render in place) from null (foot not committed yet, render nothing), so Apply mounts once, in the foot.
  • Comments: dropped the stale accent-bar paragraph and pointed the filter, input and place-list comments at .slotMenuScroll; the Apply and pinned-row comments describe the current state only.

This branch has not been deployed

No deployments
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.

styles: a global * rule hides every scrollbar, so the Studio chat and /data Select panels give no sign they scroll and chat item 10 is clipped

2 participants