PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

Clicking 'Introduction' in sidebar (grouped by tagGroup) expands all groups instead of one

Open
#1,076 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.1k
Forks
315
Avg merge
7d 5h
Merged PRs (30d)
7

Description

Describe the bug

When using the tagGroup option for groupPathsBy in docusaurus.config.ts, each group gets an "Introduction" page. Clicking on this page in any group expands the menu for all groups, which negatively impacts the user experience.

Expected behavior

Clicking on an "Introduction" page should only expand the corresponding group in the sidebar, rather than affecting all groups.

Current behavior

Clicking on an "Introduction" page in any group expands the menu for all groups, making the sidebar feel unintuitive.

Possible solution

One possible fix could be to place a single "Introduction" page at the beginning of the grouped pages instead of having one per group. Additionally, ensuring that each "Introduction" page has a unique ID in the generated sidebar.ts might prevent the issue.

Steps to reproduce

  1. Configure groupPathsBy with tagGroup in docusaurus.config.ts.
  2. Generate the sidebar.
  3. Observe that each group gets an "Introduction" page.
  4. Click on any "Introduction" page and notice that all groups expand simultaneously.

Screenshots

Image

Context

This behavior makes navigation confusing, as users expect only the clicked group to expand rather than all groups.

Your Environment

  • Version used: 4.3.3
  • Environment name and version:
  • Operating System and version: Windows 11 & Ubuntu 22
  • Link to your project:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names docusaurus.config.ts and the generated sidebar.ts; begin by configuring tagGroup and inspecting how each Introduction entry is generated. Confirm the fix by clicking an Introduction entry and verifying that only its corresponding group expands while the other groups remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.