Skip to content

Default ToC menus to collapsed rather than expanded. #344

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

Merged
merged 2 commits into from
May 16, 2025
Merged

Conversation

jmacdotorg
Copy link
Collaborator

Staged: https://collapse-toc.coderabbit-docs.pages.dev/

Now that we've reorganized the table of contents so that top-level tiers align with the major features of CodeRabbit—expressed as the tasks that you can accomplish with it—I recommend that we have the ToC begin a session collapsed by default, as demonstrated at the staged link above, instead of almost fully expanded the way it is now.

This is much visually cleaner, and puts far less cognitive load on the reader. They can find the major topic they're interested in at a glance and begin exploring it with a click, instead of having to scan a list of pages and topics that stretches far longer than a single screen.

Furthermore, I was honestly finding the current style pretty unwieldy to work with as a content author, let alone a reader!

Fixes #343

@jmacdotorg jmacdotorg requested a review from a team as a code owner May 16, 2025 14:24
Copy link
Contributor

coderabbitai bot commented May 16, 2025

Walkthrough

The sidebar configuration was updated so that all category entries now have their collapsed property set to true, making categories collapsed by default. No other changes were made to the file structure, content, or exported entities.

Changes

File(s) Change Summary
sidebars.ts Changed all category collapsed properties from false to true.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Set all ToC categories to be collapsed by default (#343)

Poem

A hop through docs, the sidebar anew,
Categories folded, a tidier view.
Less clutter to see, more space to explore,
Collapsed by default—what browsing is for!
With every click, a section appears—
A rabbit’s delight, three cheers! 🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a470c3 and da12922.

📒 Files selected for processing (1)
  • sidebars.ts (8 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (10)
sidebars.ts (10)

33-33: Default collapse for "Get started with CodeRabbit" category
Setting collapsed: true here aligns with the PR objective to declutter the sidebar by hiding detailed entries until the user chooses to expand them.


39-39: Collapse "Add CodeRabbit to your repository" section by default
This ensures repository integration instructions don’t overwhelm the user on initial load, improving focus on high-level topics.


73-73: Default collapse for "Configure CodeRabbit" category
Hiding configuration steps by default reduces visual noise and directs users to expand only the areas they need.


84-84: Collapse "Review pull requests" section on startup
Collapsing the PR review section by default minimizes cognitive load and surface complexity.


91-91: Collapse nested "Analyze and improve your code" category
Applying collapsed: true to this nested category maintains consistency with the top-level collapse behavior.


102-102: Default collapse for "Create and resolve issues" category
Marking issue-tracking docs as collapsed by default keeps the sidebar concise at first glance.


113-113: Collapse "Review local changes" category by default
This change ensures local workflows don’t clutter the initial sidebar view.


125-125: Collapse "Generate reports" section on load
Collapsing reporting guides improves the user’s ability to scan high-level sections quickly.


136-136: Default collapse for "Reference" category
Hiding reference links by default streamlines navigation and prevents overwhelming users with link lists.


180-180: Collapse "Resources" category on startup
Ensuring the resources section is collapsed keeps the sidebar focused on core documentation areas.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch collapse-toc
  • Post Copyable Unit Tests in Comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jmacdotorg jmacdotorg enabled auto-merge (squash) May 16, 2025 15:39
Copy link

cloudflare-workers-and-pages bot commented May 16, 2025

Deploying coderabbit-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: ad10c07
Status: ✅  Deploy successful!
Preview URL: https://304d3429.coderabbit-docs.pages.dev
Branch Preview URL: https://collapse-toc.coderabbit-docs.pages.dev

View logs

@jmacdotorg jmacdotorg merged commit d868ab6 into main May 16, 2025
4 checks passed
@jmacdotorg jmacdotorg deleted the collapse-toc branch May 16, 2025 19:30
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.

Experiment with collapsed ToC categories
3 participants