-
-
Notifications
You must be signed in to change notification settings - Fork 200
chore(theme): better UI for overview items without headers case #2899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Updated in commit 02fd932. Items without headers now display in a responsive grid layout (4 columns desktop, 3 tablet, 2 mobile, 1 small mobile) similar to the screenshot you provided. UI for items without headers:
UI for items with headers (unchanged):
Screenshot: https://github.com/user-attachments/assets/10b1b824-3911-4eb5-b17d-1ce5c4b717c2 |
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@copilot 自动 rebase 到 main |
I don't have the capability to perform git rebase operations. You'll need to manually rebase this branch onto main using: git fetch origin
git rebase origin/main
git push --force-with-leaseOr use GitHub's UI to update the branch if there are conflicts that need resolution. |
Co-authored-by: SoonIter <[email protected]>
Updated OverviewGroup to hide the content section for items without headers, improving aesthetics. Items without headers now display with full-width title styling instead of the split layout. Updated E2E test fixtures to include headers for proper testing. Co-authored-by: SoonIter <[email protected]>
Changed the rendering logic to display items without headers in a responsive grid layout (4 columns desktop, 3 tablet, 2 mobile) instead of the split card layout. Items with headers continue to display in the standard split layout. Updated E2E tests to handle both layouts. Co-authored-by: SoonIter <[email protected]>
02fd932 to
2260be0
Compare
Rsdoctor Bundle Diff Analysis📊 Quick Summary (Click to expand)
📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
|
@copilot 修复 CI 测试 |
Fixed heading case in test MDX files to follow lowercase convention required by heading-case linter. Changed "Feature A/B" to "feature a/b" and "Section 1/2" to "section a/b". Co-authored-by: SoonIter <[email protected]>
There was a problem hiding this 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 improves the visual presentation of Overview pages in the Rspress documentation system by implementing a responsive grid layout for items that don't contain subheadings (h2/h3 headers), while maintaining the existing split layout for items with content sections.
Key changes:
- Separated overview items into two groups based on content presence and rendered them with different layouts
- Added responsive grid styling (4/3/2/1 columns) for simple overview items
- Updated E2E tests to handle both layout patterns
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/theme/components/OverviewGroup/index.tsx |
Added logic to separate items by content presence and render them in different layouts (split or grid) |
packages/core/src/theme/components/OverviewGroup/index.scss |
Added CSS variables, grid layout styles, and responsive breakpoints for the new grid display |
website/docs/en/ui/runtime-components/index.mdx |
Created overview index page with frontmatter configuration |
website/docs/en/ui/runtime-components/head.mdx |
Added overviewHeaders: [] frontmatter to indicate no headers for grid display |
website/docs/en/ui/runtime-components/no-ssr.mdx |
Added overviewHeaders: [] frontmatter to indicate no headers for grid display |
website/docs/zh/ui/runtime-components/index.mdx |
Created Chinese overview index page with frontmatter configuration |
website/docs/zh/ui/runtime-components/head.mdx |
Added overviewHeaders: [] frontmatter to indicate no headers for grid display |
website/docs/zh/ui/runtime-components/no-ssr.mdx |
Added overviewHeaders: [] frontmatter to indicate no headers for grid display |
e2e/fixtures/nested-overview/index.test.ts |
Updated tests to query both standard and grid layout items and verify combined results |
e2e/fixtures/nested-overview/doc/basic-level-1/level-2/two.mdx |
Added test content with section headers for verification |
e2e/fixtures/nested-overview/doc/basic-level-1/level-2/level-3/three.mdx |
Added test content with feature headers for verification |
e2e/fixtures/auto-nav-sidebar/index.test.ts |
Updated test expectations to reflect reordered overview items |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Plan to Improve Overview Section Formatting
Summary
This PR improves the aesthetics of Overview pages by implementing different layouts based on whether items have subheadings:
Changes
Items WITH headers (h2/h3): Display in standard split layout with title on left, headers on right
Items WITHOUT headers: Display in responsive grid layout (simple cards)
Technical Details
packages/core/src/theme/components/OverviewGroup/index.tsx:packages/core/src/theme/components/OverviewGroup/index.scss:.rp-overview-group__gridfor responsive grid (4/3/2/1 columns).rp-overview-group__grid-itemfor grid card stylingE2E tests: Updated to check for items in both layouts
Lint fixes: Corrected heading case in test fixtures to pass CI checks
Screenshots
Built-in Hooks (items without headers display in clean grid layout):

API Overview (items with headers display in standard split layout):

Original prompt
implement this.
[Chronological Review: The conversation began with the user expressing a concern about the appearance of the Overview section in their documentation, specifically when it only contains a title without any subheadings (h2, h3). The user requested an implementation to address this issue, indicating a desire for improved aesthetics in the documentation layout.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
[Progress Assessment:
[Context Validation: The user’s request for implementation is clear, and the context of the file being modified is captured.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: The user requested improvements to the Overview section of their documentation, stating, "当 Overview 仅含标题,而没有 h2 h3 的时候会比较丑,如图 1" and subsequently asked to "implement this." - Session Context: The conversation focused on addressing a specific aesthetic issue in the documentation layout, particularly regarding the Overview section's formatting. - User Intent Evolution: The user clearly articulated their need for a more visually appealing documentation structure and requested implementation of the changes.- Technical Foundation:
- Repository: rspress
- Current Branch: syt/docs-polish
- Active Pull Request: docs: add components (docs: add components #2891)
- Codebase Status:
- File Name: head.mdx
- Purpose: This file is part of the documentation structure that requires modification to improve the Overview section's appearance.
- Current State: The user has identified the need for changes but has not yet implemented them.
- Key Code Segments: Specific code segments were not discussed, but the focus is on the layout of the Overview section.
- Dependencies: The changes will likely affect how the documentation is rendered and viewed by users.
- Problem Resolution:
- Issues Encountered: The user identified that the Overview section looks unappealing without subheadings.
- Solutions Implemented: No solutions have been implemented yet; the user is awaiting the implementation of their request.
- Debugging Context: There are no ongoing troubleshooting efforts mentioned.
- Lessons Learned: The importance of visual presentation in documentation has been highlighted.
- Progress Tracking:
- Completed Tasks: The user has articulated the problem with the Overview section.
- Partially Complete Work: The implementation of the requested changes is still pending.
- Validated Outcomes: No features or code have been confirmed working through testing yet.
- Active Work State:
- Current Focus: The user is focused on implementing visual improvements to the Overview section of the documentation.
- Recent Context: The last few exchanges involved the user expressing their concerns about the documentation layout and requesting implementation.
- Working Code: No specific code snippets were discussed recently.
- Immediate Context: The user was addressing the aesthetic issue of the Overview section before the summary was triggered.
- Recent Operations:
- Last Agent Commands: The user requested to "implement this" regarding the visual improvements for the Overview section.
- Tool Results Summary: No specific tool results were generated as the conversation was centered around user requests.
- Pre-Summary State: The agent was discussing the implementation of the requested changes when the token budget was exceeded.
- Operation Context: The commands were e...
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.