Skip to content

fix(web): hide squad-list scrollbar in collapsed rail#77

Merged
SymbolStar merged 1 commit into
mainfrom
fix/squad-rail-hide-scrollbar
Jun 11, 2026
Merged

fix(web): hide squad-list scrollbar in collapsed rail#77
SymbolStar merged 1 commit into
mainfrom
fix/squad-rail-hide-scrollbar

Conversation

@SymbolStar

Copy link
Copy Markdown
Owner

Why

Scott 反馈:折叠态 squad rail 里默认的 WebKit/Firefox 滚动条 (~7px) 在 48px 宽 rail 里很丑,挤在 28px squad icon 上。

Fix

#thread-composer / #post-composer textarea 已经在用的同一招——只在 body.squad-collapsed 下对 #squad-list 隐藏滚动条 chrome:

body.squad-collapsed #squad-list {
  scrollbar-width: none;            /* Firefox */
  overflow-x: hidden;               /* 顺手关掉横向短条 */
}
body.squad-collapsed #squad-list::-webkit-scrollbar { display: none; } /* WebKit */

只是隐藏 chrome,list 仍然可滚(鼠标滚轮 / 触屏拖 / 编程 scrollTop 全正常)。Expanded 态完全不动,还走默认 scrollbar。

Verification (puppeteer)

场景 测量 结果
collapsed + 注入 60 个 squad item scrollHeight=2410 / clientHeight=640 / offsetWidth-clientWidth bar 占 0px
同上 list.scrollTop = 200 后读回 200 ✓ 仍可滚动
expanded getComputedStyle scrollbar-width=auto / overflow-x=auto ✓ 不受影响

附修复后折叠态 rail 截图:[[copilot/scroll-fix-rail.png]](48×800 全条干净,没有滚动条)。

留给最终回归

@designer 你之前的四项清单(ghost panel 不复现 / halo 可见 / ⌘\ / footer ⚙)merge 这个之后再加一项「折叠态 squad-list 无滚动条 chrome」一起验。

In a 48px-wide collapsed squad rail, the default WebKit/Firefox
scrollbar (~7px) is visually loud and crowds the 28px squad icons —
scott flagged it as 'too ugly'. Apply the same hide-bar trick already
used on #thread-composer / #post-composer textareas: set
scrollbar-width:none + ::-webkit-scrollbar{display:none}, scoped to
body.squad-collapsed #squad-list only. The list stays scrollable
(scrollTop / wheel / touch all work), only the bar chrome is
suppressed.

Also: overflow-x:hidden in collapsed mode to kill the stray short
horizontal bar at the bottom (visible in scott's screenshot).

Verified with puppeteer (1280×800):
- collapsed + 60 fake squad items injected: scrollHeight=2410,
  clientHeight=640, offsetWidth-clientWidth=0 (bar takes no width),
  scrollTop=200 still works → scrolling intact
- expanded mode untouched: scrollbar-width=auto, overflow-x=auto
@github-actions

Copy link
Copy Markdown

🤖 bot-review (comment-only · phase 1)

Diff: 1 file changed, 11 insertions(+) @ 888f840

Red-line checks:

  • ✅ A-7.5: no new 'forbidden' code in xiaof

Phase 1: this bot leaves comments only. Auto-approve will be enabled per-path after 1–2 weeks of clean runs. Promotion plan: judy PR #42 follow-up.

@SymbolStar SymbolStar merged commit 27e71dd into main Jun 11, 2026
5 of 6 checks passed
SymbolStar added a commit that referenced this pull request Jun 11, 2026
Scott followup to #77 — apply the same hide-bar trick to #thread-list
(thread rail) and #post-list (post stream) so the always-on scrollbar
chrome doesn't clutter the reading surface.

- Default state: scrollbar-width:none + ::-webkit-scrollbar{display:none}.
  Wheel / touch / programmatic scrollTop all still work.
- Restored on :focus-within so keyboard users (PageUp/PageDown / arrow
  keys) still get a visible bar when interacting with either list —
  WCAG 2.1 SC 2.1.1 (designer's a11y note in thread).

Verified with puppeteer (1280×800) by injecting 50 fake threads + 30
fake posts:
  thread-list: scrollHeight=4430, clientHeight=599, bar takes 0px,
               scrollTop=250 still works
  post-list:   scrollHeight=1731, clientHeight=661, bar takes 0px,
               scrollTop=250 still works
  thread-list:focus-within → scrollbar-width=auto restored
  squad-list (expanded mode) untouched: scrollbar-width=auto
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