Files
pipelines/app/notes/tab-bar-edge-gaps.md
alan 44ea45150f Compact floating tab bars with circular selection and equal edge gaps
The floating tab bar is now sized to its icon tabs at the bottom right on
every width, the selected icon sits in a tinted circle on both hosts, and
the gap from each outer circle to the pill's sides equals the gap to its
top, bottom and neighbours.
2026-10-31 16:53:24 +00:00

1.6 KiB

Floating tab bars: compact everywhere, circular selection, equal gaps

Supersedes the "Sizes" bullets of notes/tab-bars-v2.md and its "at 560 the bars are full width".

  • FloatingDestinationBar is compact at every width: sized to its tabs at the bottom right (top start at FloatingBarEdge.top), on phones too. Taps beside it reach the content.
  • The selected icon sits in a tinted circle (Material 40 = 24 + 2x8 in secondaryContainer, the stock indicator made transparent with a CircleBorder ink; Cupertino 38 = 26 + 2x6 in the primary colour at 16%).
  • One gap everywhere: circle to pill top/bottom, outer circle to pill side, and between neighbours. Material 8 (pill 56 high, tab 48, 4 tabs = 200 wide); Cupertino 6 (pill 50, tab 44, 4 tabs = 182). The pill's round ends are concentric with the outer circles. FloatingDestinationBar.pillWidth gives the width; a squeezed pill keeps the edge gap and narrows the inner gaps.
  • Cupertino: the icon gets 4 top padding to cancel the host's 4 bottom inset, so the circle is vertically centred.

Tests: test/ui/adaptive/floating_bar_edge_gap_test.dart (both hosts; 1200/4, 390/3, 390/4, 560/5, 320/5 tabs; first and last selected: side gap = top gap = bottom gap = neighbour gap within 1px; concentric ends; phone taps beside the bar; 320 at 2x without overflow). Phone full-width assertions in shell, run, stage and pipeline tab tests were updated to the compact width.

Evidence: /tmp/tab-edge-evidence/ — {material,cupertino}-{light,dark}- {pipelines,search}-{560,1200}.png from tool/floating_tabs_probe_entry.dart in headless Chrome (first and last tab selected).