Skip to content

fix(theme/Outline): enable scrollable TOC on wide screens for long outlines#3170

Merged
SoonIter merged 1 commit intomainfrom
syt-vibe-kanban/0296-outline-ui-heigh
Feb 28, 2026
Merged

fix(theme/Outline): enable scrollable TOC on wide screens for long outlines#3170
SoonIter merged 1 commit intomainfrom
syt-vibe-kanban/0296-outline-ui-heigh

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Feb 28, 2026

Summary

Before

image

After

image

Related Issue

#3163 (comment)

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

AI Summary

What changed

The outline (TOC) panel on the right side of doc pages now scrolls independently on wide screens (≥1280px), keeping the title and bottom action buttons always visible.

Before: On desktop, the entire outline container scrolled as one block. When a page had many headings, the bottom actions (e.g., "Scroll to top", LLM buttons) would be pushed off-screen and only reachable by scrolling the whole panel.

After: The TOC list scrolls within a fixed-height area while the title header and bottom section remain pinned in place — matching the behavior that was already implemented for narrow screens (≤1280px).

Why

Long outline lists (like those on elements.ai) made the bottom controls inaccessible on desktop. This was noted in #3163 (comment) as a follow-up UX fix.

Implementation details

  • Outline/index.scss: Added height: 100% to .rp-outline so it fills the outer container. The __toc section now always has overflow-y: auto and min-height: 0 (flex trick for scroll overflow). Title, divider, and bottom sections are marked flex-shrink: 0 to stay visible.
  • DocLayout/index.scss: Changed .rp-doc-layout__outline from overflow: hidden scroll to overflow: hidden, delegating scroll responsibility to the inner __toc element.
  • On mobile (≤1280px), the existing max-height: 60vh constraint is preserved for the floating panel.

This PR was written using Vibe Kanban


Copilot AI review requested due to automatic review settings February 28, 2026 07:52
@SoonIter SoonIter changed the title outline 的 UI 优化,在宽屏的时候也设置为滚动,有固定的 height (vibe-kanban) fix(theme/Outline): enable scrollable TOC on wide screens for long outlines Feb 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
node 12.0 MB 0
node_md 1.5 MB 0
web 15.9 MB +155.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 3207806c77 | PR: #3169

Metric Current Baseline Change
📊 Total Size 15.9 MB 15.9 MB +155.0 B (0.0%)
📄 JavaScript 15.7 MB 15.7 MB 0
🎨 CSS 120.5 KB 120.3 KB +155.0 B (0.1%)
🌐 HTML 0 B 0 B 0
📁 Other Assets 166.8 KB 166.8 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the right-side outline panel styling to improve the UI/scrolling behavior on wide screens by moving scrolling responsibility from the outline <aside> to the TOC area inside the outline component.

Changes:

  • Remove scrolling from rp-doc-layout__outline (DocLayout aside) by changing it to overflow: hidden.
  • Make the outline component a full-height flex column and add an internally scrollable TOC region (overflow-y: auto) with non-shrinking header/divider/bottom rows.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/theme/layout/DocLayout/index.scss Stops the outline <aside> from being a scroll container (sets overflow: hidden).
packages/core/src/theme/components/Outline/index.scss Converts outline to a full-height flex layout and makes the TOC section scrollable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 28, 2026

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e2798d
Status: ✅  Deploy successful!
Preview URL: https://2a14c10d.rspress-v2.pages.dev
Branch Preview URL: https://syt-vibe-kanban-0296-outline.rspress-v2.pages.dev

View logs

@SoonIter SoonIter force-pushed the syt-vibe-kanban/0296-outline-ui-heigh branch from a679a6c to 1e2798d Compare February 28, 2026 08:45
@SoonIter SoonIter enabled auto-merge (squash) February 28, 2026 08:50
@SoonIter SoonIter merged commit 6b318df into main Feb 28, 2026
6 checks passed
@SoonIter SoonIter deleted the syt-vibe-kanban/0296-outline-ui-heigh branch February 28, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants