chain-studio/lib
flemming-it 5830198566
Some checks failed
Security / Security check (push) Failing after 1s
fix(studio): sidebar — fixed-width icon column eliminates icon shift
Previous "left-anchor everything via padding" approach made
the math work on paper but the perceived shift persisted. The
root cause was structural, not padding-based: ListView gave
each item a tight cross-axis constraint equal to the rail's
current width (48 collapsed, 196 expanded). Inside the item,
the AnimatedContainer filled that constraint and laid out a
mainAxisSize.min Row at the start of the AC's content area.
The icon's pixel-X depended on the AC's padding _and_ the
constraint; even with equal padding the rendered layout
shifted across the expand animation because Flutter
re-resolved alignment under a moving constraint.

Replace the entire pattern with a fixed-width icon column
that doesn't care about the parent constraint:

  ListView (padding 0) → Item Row
    SizedBox(width: 72) → Center → icon   ← anchored to literal x
    if expanded → Expanded → label text   ← grows into remaining space

Same pattern for the brand/connection/channel rows above. The
72 px matches the rail's collapsed width exactly, so collapsed
rail = one icon column + nothing; expanded rail = same icon
column + label slot. Icon's pixel-X is now provably constant.

Removes the AC's horizontal padding entirely — the icon
column owns the left anchor. The background highlight still
spans the full row width (typical nav-rail UX), and the rail
expand animation only moves the rail's right edge, never any
icon-bearing element.

Also passes an `iconColumnWidth: 72` to _SidebarItem instead
of hard-coding the magic number in two places.

Version 0.51.3 → 0.51.4.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-30 16:15:03 +02:00
..
data fix(security): atomic hub-auth-token writes (P1-5) 2026-05-29 17:47:29 +02:00
l10n feat(studio): pencil-into-editor + back button + collapsible rail 2026-05-30 12:04:05 +02:00
pages feat(studio): swap built-in flow editor for fai_studio_flow_editor package (v0.51.0) 2026-05-30 14:36:54 +02:00
theme feat(studio): surface provider + sourceKind + versionAdvisory on CapabilityInfo 2026-05-28 10:54:48 +02:00
widgets chore(deps): bump file_picker 8→11 + transitive lifts 2026-05-29 07:15:25 +02:00
main.dart fix(studio): sidebar — fixed-width icon column eliminates icon shift 2026-05-30 16:15:03 +02:00