Skip to content

fix(toolbar): make the top menu bar horizontally scrollable on tablets#879

Merged
giswqs merged 2 commits into
mainfrom
fix/issue-871-scrollable-topbar
Jun 25, 2026
Merged

fix(toolbar): make the top menu bar horizontally scrollable on tablets#879
giswqs merged 2 commits into
mainfrom
fix/issue-871-scrollable-topbar

Conversation

@giswqs

@giswqs giswqs commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

On iPad and landscape phones the top menu bar ran off the right edge of the screen with no way to reach the menus that overflowed (Settings, Help, the theme toggle, the project name). At the md breakpoint and above the toolbar switched to a single non-wrapping row (md:flex-nowrap) with no overflow handling, so any items past the viewport edge were simply clipped and unreachable.

This adds md:overflow-x-auto so the toolbar scrolls horizontally when its items do not fit, keeping every menu reachable. Behavior is unchanged elsewhere:

  • Below md the toolbar still wraps to multiple rows as before.
  • On a wide desktop where everything fits, there is no scrollbar and the project name still sits pinned to the far right.
  • Compact/embed mode already scrolled horizontally and is untouched.

The branding (map icon + "GeoLibre" text) is kept per the maintainer's decision in the issue thread; this change keeps it while ensuring the rest of the menus stay accessible on small screens.

Verification

Drove the real app in a browser with Playwright in both light and dark themes:

  • At 800px wide the toolbar previously clipped Settings/Help with no scroll; after the fix the row scrolls horizontally (scrollWidth 1168 > clientWidth 800) and Settings, Help, the theme toggle, and the project name are all reachable.
  • At 1440px wide the header fits exactly (scrollWidth == clientWidth, not scrollable) and the desktop layout is unchanged.

pre-commit run --files (including the full npm build) passes.

Fixes #871

Summary by CodeRabbit

  • Bug Fixes
    • Improved the top toolbar layout on larger screens so overflowing menu items can scroll horizontally instead of being cut off or wrapping awkwardly.

#871)

At md and above the toolbar switched to a single non-wrapping row with no
overflow handling, so on iPad and landscape phones the menus that did not
fit (Settings, Help, the theme toggle, the project name) ran off the right
edge with no way to reach them. Add md:overflow-x-auto so the row scrolls
horizontally while keeping the wrapping behavior below md and the unchanged
desktop layout when everything fits.
@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for geolibre-app ready!

Name Link
🔨 Latest commit e3009bd
🔍 Latest deploy log https://app.netlify.com/projects/geolibre-app/deploys/6a3d6d229b40fb000988ad8c
😎 Deploy Preview https://deploy-preview-879--geolibre-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@giswqs, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 6 minutes and 34 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 11a9a56f-ddeb-4a6e-b901-789b9a8827da

📥 Commits

Reviewing files that changed from the base of the PR and between 948b69e and e3009bd.

📒 Files selected for processing (1)
  • apps/geolibre-desktop/src/components/layout/TopToolbar.tsx
📝 Walkthrough

Walkthrough

The top toolbar header now allows horizontal scrolling on medium and larger screens while preserving its non-wrapping layout. The change updates the responsive class list in the desktop toolbar component.

Changes

Top toolbar overflow handling

Layer / File(s) Summary
Responsive header overflow
apps/geolibre-desktop/src/components/layout/TopToolbar.tsx
The header className adds md:overflow-x-auto and keeps the medium-screen non-wrapping layout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 I hopped along the toolbar, light and bright,
With scrollable room on medium screens just right.
No wrap, no squeeze, the links can glide,
A tidy little overflow for the menu to ride.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR improves access on compact screens, but it does not relocate or replace the brand element as required by #871. Implement the brand relocation/logo updates requested in #871, or clarify that the issue is only being partially addressed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making the top toolbar horizontally scrollable on tablets.
Out of Scope Changes check ✅ Passed The changes stay focused on the top toolbar layout and do not introduce unrelated scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-871-scrollable-topbar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⚡ Cloudflare Pages preview

Item Value
Preview https://f03711a8.geolibre-preview.pages.dev
Demo app https://f03711a8.geolibre-preview.pages.dev/demo/
Commit b6bd82a

Comment thread apps/geolibre-desktop/src/components/layout/TopToolbar.tsx Outdated
// above we switch to a single non-wrapping row and let it scroll
// horizontally so tablets/landscape phones can still reach the
// menus that overflow the viewport (e.g. Help, Settings) (#871).
"flex-wrap px-2 md:flex-nowrap md:overflow-x-auto",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UX / discoverability concern (medium confidence): overflow-x: auto on a flex container pushes the ml-auto spacer to the far right of the scroll content, not the visible viewport edge. On a tablet at ~800 px the theme-toggle button and project-name input (the ml-auto div at roughly line 1127) will only be visible after the user scrolls all the way right — they are not pinned to the visible right edge.

This is better than the previous fully-inaccessible behaviour, and the compact path already has the same pattern, so it is internally consistent. But on touch devices the horizontal scrollbar is auto-hidden, so there is no visual affordance that the bar is scrollable. Worth considering a subtle scroll-shadow or the scrollbar-width: thin token (already used elsewhere in index.css) so users on touch screens can discover the overflow content.

Not a blocker — just worth noting for a follow-up if discoverability proves to be a problem in practice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, noted. Leaving this open as a possible follow-up. The right-side controls becoming reachable only after scrolling is the same pattern the compact/embed path already uses, so the behavior stays internally consistent, and it is strictly better than the previous fully-inaccessible state. A scroll-shadow or thin-scrollbar affordance can be added later if discoverability proves to be a problem in practice.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

The change is a single Tailwind class addition (md:overflow-x-auto) that correctly fixes the tablet overflow bug. The logic is sound and mirrors the already-working compact path. Two findings below, one of which should be addressed before merge.

CLAUDE.md (must-fix)

# Finding Confidence
1 Multi-line block comment violates project style — CLAUDE.md says "Never write multi-paragraph docstrings or multi-line comment blocks — one short line max." The 4-line comment added in the ternary body belongs in the commit message/PR description (where it already lives), not in source. Suggested one-liner posted as inline comment. High

Quality / UX (informational)

# Finding Confidence
2 Theme toggle and project name require horizontal scrolling on narrow tabletsml-auto on the trailing div (line 1127) pushes it to the far right of the scroll content, not the visible viewport edge. On touch devices overflow-x: auto hides the scrollbar by default, so users may not discover the toolbar is scrollable. This is still better than the previous fully-inaccessible state and is consistent with the compact path; a scroll-shadow or scrollbar-width: thin (already used in index.css) could improve discoverability. Not a blocker — consider as a follow-up. Medium

Bugs / Security / Performance

Nothing found. The change is CSS-class-only with no logic, data-handling, or external calls.

- Collapse the 4-line toolbar comment to a single short line per the
  project's one-line comment rule (#871).
? "flex-nowrap overflow-x-auto px-1.5"
: "flex-wrap px-2 md:flex-nowrap",
: // Wrap below md; scroll a single row at md+ so tablets reach every menu (#871).
"flex-wrap px-2 md:flex-nowrap md:overflow-x-auto",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix is correct and mirrors what the compact path already does. One mild concern worth tracking: iOS and iPadOS hide horizontal scrollbars by default (they only appear mid-swipe and fade out), so on the main target device (tablet) there is no persistent visual affordance telling the user the toolbar is scrollable. If a menu item is just outside the viewport the user will not know to swipe.

This is a pre-existing gap in the compact path too, so it is out of scope for this PR, but a follow-up could add a right-edge fade/shadow on overflow—something like:

Suggested change
"flex-wrap px-2 md:flex-nowrap md:overflow-x-auto",
"flex-wrap px-2 md:flex-nowrap md:overflow-x-auto md:[mask-image:linear-gradient(to_right,black_calc(100%-2rem),transparent)]",

(or a JS-measured approach if the mask-image approach is too blunt). Not a blocker; just flagging so the issue thread has the note.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed, and thanks for the concrete suggestion. As you note, this is out of scope for this PR and pre-exists in the compact path, so I'll leave it as a follow-up rather than add a mask-fade here (a right-edge mask would also visually dim the project-name input at the end of the row). Tracking it for a separate discoverability pass across both the compact and md+ scroll paths. Leaving this open for the maintainer to weigh in.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Reviewed the diff (2 additions / 1 deletion in TopToolbar.tsx) and read the surrounding component for context.

Bugs

Nothing found. The fix is correct: adding md:overflow-x-auto to the non-compact header exactly mirrors the pattern already used by the compact path (flex-nowrap overflow-x-auto). The ml-auto group at the end of the header (theme toggle + project name) correctly rides to the far right of the scrollable row and is reachable by scrolling right.

Security

Nothing found.

Performance

Nothing found. Pure CSS-class change; zero runtime cost.

Quality

  • Inline comment inside cn() — the added comment (// Wrap below md; scroll a single row at md+…) is slightly unusual inside a JSX expression but is readable and useful. No change needed.
  • CSS implicit overflow-y upgrade (very low confidence) — CSS spec upgrades overflow-y from visible to auto when overflow-x is set to anything other than visible. In practice this is harmless here because every direct child is a shrink-0 icon button that fits within min-h-11, and all dropdown menus are portal-rendered so they are not clipped by the container. Worth knowing but not a bug.
  • Touch discoverability (low-medium confidence, noted inline) — iOS/iPadOS hides scrollbars by default, so on the primary target device there is no persistent indicator that the toolbar scrolls. This is a pre-existing gap shared with the compact path. A follow-up could add a right-edge gradient fade. Not a blocker.

CLAUDE.md

No violations. The change is Tailwind-class-only, touches no i18n strings, adds no new external hosts, and does not directly modify node_modules. The PR description confirms pre-commit run --files (which includes the full npm build) passes.

Overall: The fix is minimal, correct, and consistent with the existing compact-mode pattern. One inline note filed for discoverability; nothing blocking.

@giswqs giswqs merged commit b9b6c72 into main Jun 25, 2026
25 checks passed
@giswqs giswqs deleted the fix/issue-871-scrollable-topbar branch June 25, 2026 18:21
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.

UX Report: Relocation and Optimization of the Top Navigation Brand Icon

1 participant