Skip to content

fix: version switcher dropdown overflow on smaller screens (#578)#1271

Merged
jonbrenas merged 2 commits intomalariagen:masterfrom
Tanisha127:fix/version-switcher-dropdown-overflow
Apr 3, 2026
Merged

fix: version switcher dropdown overflow on smaller screens (#578)#1271
jonbrenas merged 2 commits intomalariagen:masterfrom
Tanisha127:fix/version-switcher-dropdown-overflow

Conversation

@Tanisha127
Copy link
Copy Markdown
Contributor

@Tanisha127 Tanisha127 commented Apr 2, 2026

Problem

Fixes #578

The version switcher dropdown extends beyond the viewport on smaller screens, making older versions (including "dev") unreachable.

As seen in the issue screenshot, even on a 21.5-inch screen the dropdown was already cut off. Maintainers temporarily trimmed switcher.json (PRs #602, #727, #843) as a workaround, but as more versions are released this problem will keep recurring.

Solution

Added a custom CSS file that permanently fixes the overflow by limiting the dropdown height to 60% of the viewport and enabling vertical scrolling — so all versions remain accessible on any screen size, regardless of how many versions are in switcher.json in the future.

Changes

  • Added docs/source/_static/custom.css with overflow fix
  • Registered the CSS file in docs/source/conf.py

Testing

  • Built docs locally with sphinx-build -b html source build/html
  • Verified scrolling works on small screens via Chrome DevTools device simulation (tested at 1280px, 768px, 375px widths)
  • All versions visible and selectable on all screen sizes

@Tanisha127 Tanisha127 force-pushed the fix/version-switcher-dropdown-overflow branch from 04b68e9 to 728599e Compare April 2, 2026 17:35
@Tanisha127
Copy link
Copy Markdown
Contributor Author

Hi @jonbrenas and @ahernank,

I've submitted a fix for this issue in PR #1271.
The fix adds a custom CSS file that limits the version switcher dropdown height to 60% of the viewport and enables vertical scrolling — so all versions remain accessible on any screen size, regardless of how many versions are in switcher.json in the future.
All 8 CI checks have passed including linting, coverage, and tests across Python 3.10, 3.11, and 3.12.
Would appreciate your review when you get a chance. Thanks!

@jonbrenas jonbrenas merged commit 657b9bb into malariagen:master Apr 3, 2026
8 checks passed
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.

Cannot always select older versions from docs switcher

2 participants