Hide version dropdown when not browsing that docs instance
planned
ivan.g.despot@gmail.com
It would be very helpful if we could hide a dropdown if the user is not in that part of the documentation that is versioned. This would also make it much easier to have multiple versioned docs at the same time because right now, all of the dropdowns have to be visible at the same time, and it's very confusing for users.
m
marshakaplan766
Optimizing user experience is crucial, especially for Assignment Help UK platforms. Hiding version dropdowns when not browsing documentation instances enhances simplicity and functionality. It ensures smoother navigation for students seeking assistance, improving overall usability and satisfaction.
P
Pavindu Lakshan
Anyone looking to implement this on your own, please check https://github.com/facebook/docusaurus/issues/4389#issuecomment-1962954701
Alireza Jamshidi
It can be done by adding some CSS in "custom.css". But unfortunately, the dropdown elements have no CSS classes included. So you have to use the sequence of elements like this:
```css
.navbar.navbar--fixed-top .navbar__items.navbar__items--right > .navbar__item:nth-child(3),
.navbar.navbar--fixed-top .navbar__items.navbar__items--right > .navbar__item:nth-child(4) {
display: none;
}
html.docs-wrapper.plugin-id-default .navbar.navbar--fixed-top .navbar__items.navbar__items--right > .navbar__item:nth-child(3) {
display: block;
}
html.docs-wrapper.plugin-id-docs2 .navbar.navbar--fixed-top .navbar__items.navbar__items--right > .navbar__item:nth-child(4) {
display: block;
}
```
Sébastien Lorber
Yes, this is a much awaited feature:
Sébastien Lorber
planned