Skip to content

Conversation

SoonIter
Copy link
Member

@SoonIter SoonIter commented Oct 8, 2025

Summary

feat(auto-nav-sidebar): add new type: "section-header-dir"

For new UI:

Migrate "type": "dir" to "type": "dir-section-header"

before

[
  {
    "type": "dir",
    "name": "use-mdx",
     "label": "Use MDX"
  },
]
image

after

[
  {
    "type": "dir-section-header",
    "name": "use-mdx",
    "label": "Use MDX" // required field
  }
]
image

Related Issue

Checklist

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

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 10:44
Copy link

netlify bot commented Oct 8, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 9247bc3
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/68e73db752c4b70008f82a64
😎 Deploy Preview https://deploy-preview-2643--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Copilot 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 adds a new sidebar item type called "dir-section-header" that combines directory and section header functionality in the auto-nav-sidebar feature.

  • Introduces a new DirSectionHeaderSideMeta type that merges directory and section header metadata
  • Adds processing logic for the new type in the normalization module
  • Refactors existing code to support the new type and improve maintainability

Reviewed Changes

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

File Description
packages/core/src/node/auto-nav-sidebar/type.ts Defines the new DirSectionHeaderSideMeta type and adds it to the union type
packages/core/src/node/auto-nav-sidebar/normalize.ts Implements processing logic for the new type and refactors existing functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SoonIter SoonIter changed the title feat(auto-nav-sidebar): add new type: "section-header-dir" feat(auto-nav-sidebar): add new type: "dir-section-header" Oct 9, 2025
@SoonIter SoonIter merged commit b86d93c into main Oct 9, 2025
10 checks passed
@SoonIter SoonIter deleted the syt/section-header branch October 9, 2025 06:39
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.

2 participants