Skip to content

Conversation

@AlexAndBear
Copy link
Collaborator

@AlexAndBear AlexAndBear commented Jan 22, 2026

The version dropdown was appearing on the landing page (/) where it caused confusing navigation behavior. When users clicked the version selector from the landing page, Docusaurus defaulted to navigating to the Admin docs section, as it had no context about which documentation section (User, Admin, or Dev) the user intended to access.

Copilot AI review requested due to automatic review settings January 22, 2026 18:13
Copy link
Contributor

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 fixes an issue where the version dropdown was appearing on the landing page when it should only be visible on documentation pages.

Changes:

  • Added logic to conditionally render the docs version dropdown based on the current page path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


export default function DocsVersionDropdownNavbarItemWrapper(props: Props): ReactNode {
const location = useLocation();
const isDocsPage = location.pathname.split('/').includes('docs')
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for detecting docs pages is fragile. A pathname like '/mydocs' or '/docs-info' would incorrectly match because 'docs' appears as a substring within a segment. Consider using a more precise check such as verifying that 'docs' is an exact segment match or checking if the pathname starts with '/docs/'.

Copilot uses AI. Check for mistakes.
AlexAndBear and others added 2 commits January 22, 2026 19:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AlexAndBear
Copy link
Collaborator Author

bs, closing

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