Skip to content

Stop the report tab row from becoming scrollable - #461

Merged
str1fe merged 2 commits into
mainfrom
fix/reports-tabs-scrollbar
Sep 21, 2026
Merged

str1fe merged 2 commits into
mainfrom
fix/reports-tabs-scrollbar

Conversation

@str1fe

@str1fe str1fe commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

On /reports the row holding the tabs (Tasks, Team members, …) rendered a scrollbar even though the tabs fit, which looked out of place.

Cause

The tab links carry -mb-px so the active underline sits on top of the row's bottom border. Since the links live inside the overflow-x-auto container, that negative margin makes the content 1px taller than the container's content box (measured clientHeight 45 vs scrollHeight 46). overflow-x: auto also turns overflow-y into auto, so the 1px of vertical overflow was enough to produce a scrollbar.

Fix

Move the negative margin to a new inner scroll wrapper and keep the border and padding on the outer element:

  • the active underline still overlaps the row's border, so the look is unchanged;
  • nothing overflows vertically inside the scroll container, so no scrollbar appears;
  • the row can still scroll horizontally on narrow phones, where four long tab labels (e.g. "Teammedlemmer") don't fit — now with no-scrollbar, matching the pattern already used in _sidenav.html.erb.

Testing

Verified the geometry in a browser on an isolated copy of the same markup and CSS: clientHeight/scrollHeight are now 46/46 and clientWidth/offsetWidth 600/600, i.e. no overflow and no scrollbar gutter. The change is markup-only and touches one partial.

🤖 Generated with Claude Code

str1fe and others added 2 commits September 21, 2026 22:43
The tab links carried `-mb-px` so the active underline sits on top of the
row's bottom border. Because the links live inside the `overflow-x-auto`
container, that negative margin made the content 1px taller than the
container's content box, so the tab row rendered a scrollbar even when the
tabs fit comfortably.

Move the negative margin to a new inner scroll wrapper and keep the border
and padding on the outer element. The active underline still overlaps the
border, nothing overflows vertically, and the row can still scroll
horizontally on narrow phones (now without a visible scrollbar, matching
the sidenav).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…llbar

Picks up the system-test fix from #458 so CI runs against current main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@str1fe
str1fe merged commit 7687137 into main Sep 21, 2026
4 checks passed
@str1fe
str1fe deleted the fix/reports-tabs-scrollbar branch September 21, 2026 21:31
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