Repository navigation
Fix mobile version picker - #1373
losrebellos wants to merge 17 commits into
Conversation
|
Commit b5e5126 is live at https://docs-pr-1373-metaboat.vercel.app
Deployed to Vercel via GitHub Actions |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # src/components/chrome/TopBar.astro # src/layouts/NewDocsLayout.astro
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Mobile pages can lack a version picker, and responsive thresholds can briefly show duplicate pickers.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This pull request improves the docs version picker across mobile and desktop layouts.
Changes:
- Adds responsive picker styling and dropdown positioning.
- Hides the selector on
/docs/all. - Updates top-bar rendering and reformats the TOC icon.
| File | Summary |
|---|---|
src/layouts/NewDocsLayout.astro |
Controls selector visibility; mobile picker is missing on nested pages. |
src/components/chrome/VersionSelector.astro |
Updates responsive styling; breakpoint overlap can briefly show duplicate pickers. |
src/components/chrome/TopBar.astro |
Conditionally renders the selector; mobile hiding can remove the only picker. |
src/components/chrome/TocToggle.astro |
Reformats the TOC SVG markup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Correct media query to use min-width: 992px instead of 992.02px. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # public/docs/css/styles.css
|
|
||
| <style> | ||
| /* The ids outrank the legacy `.bootstrap .learn__post a` / `li` rules. */ | ||
| :is(#version-selector-top-bar, #version-selector-inline) { |
There was a problem hiding this comment.
I think the peripheral changes on this PR all make sense, but I'm actually not a huge fan of the mobile bordered version. Maybe it's just me. It's pretty in-your-face and I'm not sure why we need one there when we're fine with a borderless dropdown basically right next to it (the "On this page" trigger).
If other people prefer this version, I wouldn't die on this hill. My taste is not impeccable. It's actually quite peccable.
There was a problem hiding this comment.
Great question!
I've added a background and a border because it feels lots and it is not aligned with the rest of the content atm, see screenshot below.
Let's have some UI feedback actually 👌
WDYT @jrayski ?
There was a problem hiding this comment.
There was a problem hiding this comment.
@jrayski Happy to remove the background + border and align it but how do you want the dropdown to open?
Align or not aligned with the content?
There was a problem hiding this comment.
bpander
left a comment
There was a problem hiding this comment.
Good improvements all around. Nice work!
| </script> | ||
|
|
||
| <style> | ||
| /* The ids outrank the legacy `.bootstrap .learn__post a` / `li` rules. |
There was a problem hiding this comment.
nit: if you want a less gnarly selector, I think you can also just double the class name, e.g.
.version__selector.version__selector {
EDIT: Actually, I'm not 100% sure why the gnarly selector is needed. I don't see any issues if just use .version__selector. I might just be missing what it was intended to fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # public/docs/css/main.css # public/docs/css/styles.css






Closes https://linear.app/metabase/issue/GRO-1054/docs-version-picker-has-no-background-on-mobile.
What's in
/docs/latest/...What's newbutton breakpoint updates fordisplayMobile
Desktop
Docs listing page
How to test
Dropdown
/docs/latest