Skip to content

fix(tab-navigation): overflow menu for route-backed tabs without ids - #171

Merged
roncodes merged 1 commit into
release/v0.4.0from
fix/tab-navigation-route-tab-identity
Sep 9, 2026
Merged

fix(tab-navigation): overflow menu for route-backed tabs without ids#171
roncodes merged 1 commit into
release/v0.4.0from
fix/tab-navigation-route-tab-identity

Conversation

@roncodes

@roncodes roncodes commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

TabNavigation moves tabs that do not fit into a "More" dropdown, but the overflow bookkeeping keyed everything on tab.id. Route-backed tabs (the common shape in Fleet-Ops detail panels: { route, label }) have no id, so:

  • visibleTabIds and overflowTabIds were arrays of undefined, which made both the visible filter and the overflow filter match every tab;
  • the tab list rendered all tabs inline (clipped by .tab-items { overflow: hidden }), so trailing tabs were unreachable and the More menu never appeared.

This change derives a tab's identity from id, then route, then key, and uses it consistently for the active-tab state, overflow calculation and keyboard navigation. Tabs that already pass id are unaffected.

Tests

  • Added an integration test covering route-only tabs overflowing into the More menu (the dummy router gains three routes as link targets).
  • eslint and prettier pass on the touched files.
  • The browser test suite was not run locally for this change (no headless browser session was started on the development machine); CI should run it.

… no id

Route-backed tabs are usually declared with only a route and label. The overflow
calculation compared tab ids, so every tab collapsed onto undefined: the visible
and overflow sets both matched all tabs and the More menu never worked while the
tab list clipped the trailing tabs. Derive the identity from id, route or key
and cover the route-only case in the integration test.
@roncodes
roncodes changed the base branch from main to release/v0.4.0 September 9, 2026 04:43
This was referenced Sep 9, 2026
@roncodes
roncodes merged commit 024e3d2 into release/v0.4.0 Sep 9, 2026
7 checks passed
@roncodes
roncodes deleted the fix/tab-navigation-route-tab-identity branch September 9, 2026 04:45
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