Skip to content

feat(studio): stack flat inspector headers as sticky top/bottom rails#2129

Closed
vanceingalls wants to merge 1 commit into
studio-flat-08-style-grade-parityfrom
studio-flat-09-sticky-header-stack
Closed

feat(studio): stack flat inspector headers as sticky top/bottom rails#2129
vanceingalls wants to merge 1 commit into
studio-flat-08-style-grade-parityfrom
studio-flat-09-sticky-header-stack

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Ninth PR in the flat inspector stack (see #2120 for the foundation and full stack list). Makes group headers sticky: collapsed headers above the currently-open group stack at the top of the panel in order, collapsed headers below it stack at the bottom in order, and the open group's own header stays pinned right below the top stack — so no header ever scrolls out of view.

Stack: #2120 → ... → #2127#2128#2129 (this).

Why

The flat accordion previously had zero sticky positioning on any header — confirmed live in the browser before starting (collapsed headers and the open group's title bar both scrolled away with the content). Requested directly from live testing of the parity fixes in #2127/#2128.

How

  • PropertyPanelFlat.tsx computes a stackSide/stackOffsetPx for each unpinned group based on its position relative to the open group: groups before it get top: index * 40px, the open group itself gets top: (count of groups before it) * 40px, groups after it get bottom: (distance from the last group) * 40px. When nothing is open, everything falls back to top-stacking in order.
  • FlatGroup applies position: sticky with the computed offset via inline style (not a static class, since the offset is per-instance) to both its collapsed-button and open-title-bar variants, with matching z-10/bg-panel-bg so a stuck header renders opaquely above scrolling content, and min-h-10 on both variants so the 40px-per-header stacking math is pixel-accurate.
  • Pinned groups (PinnedGroupRow) and the pinned/unpinned divider are untouched — this only affects the one-open accordion's own headers.

Test plan

  • New tests assert the actual computed inline style values (position/top/bottom) rather than class-name matching, covering the full worked example (a middle group open, headers before and after it) and the "nothing open" fallback.
  • Manually verified live in the browser after the automated tests passed: opened Style (near the top) and separately Motion (a middle group) with a demo composition exercising all 6 groups, scrolled through the full range in both cases — confirmed headers stack cleanly on both the top and bottom sides simultaneously with no overlap, exactly 40px apart, at every scroll position tested.
  • Full monorepo suite green (1587 tests, 0 failures); oxlint/oxfmt/fallow clean.
  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (not applicable — internal Studio UI behind an off-by-default flag)

Collapsed group headers above the open group stick to the top of the panel
in order, collapsed headers below stick to the bottom in order, and the open
group's own header sticks just below the top stack, so headers never scroll
out of view or overlap.
@vanceingalls

Copy link
Copy Markdown
Collaborator Author

Superseded — reworked into a simpler fixed-headers/scrollable-open-section-only design per user feedback, collapsed into a single clean PR instead of shipping this sticky-positioning approach and then reverting it in a follow-up. See the replacement PR in this same stack.

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