Skip to content

Optimize quick-nav sidebar: closer positioning, responsive width, auto-hide - #47

Merged
JonasGao merged 3 commits into
mainfrom
copilot/optimize-sidebar-menu-spacing
Feb 1, 2026
Merged

JonasGao merged 3 commits into
mainfrom
copilot/optimize-sidebar-menu-spacing

Conversation

Copilot AI commented Jan 31, 2026 •

Copy link
Copy Markdown
Contributor

The quick navigation sidebar in grouping modes had excessive spacing from the main content (20px gap) and used fixed widths that didn't adapt to screen size.

Changes

  • Reduced sidebar-to-content gap: 20px → 8px
  • Responsive width: clamp(140px, 15vw, 200px) adapts to viewport
  • Auto-hide on narrow screens: Hidden at ≤1280px (removes old inline mobile layout)
  • XL screen support: ≥1600px gets larger sidebar (180-220px)
  • CSS custom properties: --sidebar-width and --sidebar-gap for maintainability
.quick-nav-sidebar {
  --sidebar-width: clamp(140px, 15vw, 200px);
  --sidebar-gap: 8px;
  
  width: var(--sidebar-width);
  margin-left: calc(-1 * var(--sidebar-width) - var(--sidebar-gap));
  margin-right: var(--sidebar-gap);
}

Screenshots

1600px - sidebar visible, minimal gap:
sidebar-1600px

1200px - sidebar hidden:
sidebar-1200px

Original prompt

优化在各种分组显示模式下,左侧的跳转菜单。现在菜单没有贴合在主体列表上,距离主体列表有一些远,我希望离主体列表近一些,保持一个很小的间隙即可。然后让跳转的菜单可以根据屏幕宽度自动调整自己的宽度以及是否显示


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 31, 2026 15:55
…o-hide on narrow screens

Co-authored-by: JonasGao <4549584+JonasGao@users.noreply.github.com>
Co-authored-by: JonasGao <4549584+JonasGao@users.noreply.github.com>
Copilot AI changed the title [WIP] Update sidebar navigation menu spacing and responsiveness Optimize quick-nav sidebar: closer positioning, responsive width, auto-hide Jan 31, 2026
Copilot AI requested a review from JonasGao January 31, 2026 15:57
@JonasGao
JonasGao marked this pull request as ready for review February 1, 2026 04:31
Copilot AI review requested due to automatic review settings February 1, 2026 04:31

Copilot AI left a comment

Copy link
Copy Markdown

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 refines the quick navigation sidebar layout in grouping modes to improve proximity to the main content, make sizing responsive, and simplify behavior on smaller screens.

Changes:

  • Introduces CSS custom properties (--sidebar-width, --sidebar-gap) and uses clamp() to make the sidebar width responsive while keeping a tight, consistent gap to the main content.
  • Removes the old “inline/mobile” quick-nav layout and instead auto-hides the sidebar at <= 1280px viewport widths where there’s insufficient space for a floating sidebar.
  • Adds an XL breakpoint (>= 1600px) to slightly enlarge the sidebar and its typography for better usability on very wide screens, with minor padding and font-size adjustments.

@JonasGao
JonasGao merged commit 2287551 into main Feb 1, 2026
6 checks passed
@JonasGao
JonasGao deleted the copilot/optimize-sidebar-menu-spacing branch February 1, 2026 06:20
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.

3 participants