Skip to content

Make Version Selector Visible on Mobile Docs#6533

Open
sahil5206 wants to merge 1 commit intopipe-cd:masterfrom
sahil5206:development
Open

Make Version Selector Visible on Mobile Docs#6533
sahil5206 wants to merge 1 commit intopipe-cd:masterfrom
sahil5206:development

Conversation

@sahil5206
Copy link

What was wrong?

After PR #6480, mobile users couldn't switch documentation versions. The version selector was only visible on desktop, so mobile users were stuck on v1.

Why it happened

The version selector in the navbar used Bootstrap classes that hide it on small screens. Mobile navigation uses the sidebar, which didn't include the version selector.

What I did

Added the version selector to the sidebar for mobile users, following the same pattern as the language selector.
Updated the JavaScript to work with both the navbar (desktop) and sidebar (mobile) selectors.

Result

Desktop: Version selector in the navbar (unchanged)
Mobile: Version selector in the sidebar menu (new)
Mobile users can now switch documentation versions.

Files changed

docs/layouts/partials/sidebar-tree.html - Added version selector to sidebar
docs/assets/js/navbar-version-selector.js - Updated to support multiple selectors

How to test

Run the site locally: make run/site
Open any docs page in mobile view (<992px width)
Open the sidebar menu
You should see the version selector at the top of the sidebar
Click it to verify the dropdown works

Signed-off-by: sahil gupta <Sahilg5206official@gmail.com>
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.

1 participant