@@ -6,7 +6,7 @@ import type { PropertyPanelProps } from "./propertyPanelHelpers";
66import { formatPxMetricValue } from "./propertyPanelHelpers" ;
77import { PropertyPanelFlatHeader } from "./PropertyPanelFlatHeader" ;
88import { PropertyPanelFlatFooter } from "./PropertyPanelFlatFooter" ;
9- import { FlatGroupHeader , PinnedGroupRow , PinnedZoneDivider } from "./propertyPanelFlatPrimitives" ;
9+ import { FlatGroupHeader } from "./propertyPanelFlatPrimitives" ;
1010import { FlatTextSection } from "./propertyPanelFlatTextSection" ;
1111import { FlatStyleSection } from "./propertyPanelFlatStyleSections" ;
1212import { FlatLayoutSection } from "./propertyPanelFlatLayoutSection" ;
@@ -17,7 +17,6 @@ import { createGsapLivePreview } from "./gsapLivePreview";
1717import { formatTextFieldPreview } from "./propertyPanelSections" ;
1818import { STUDIO_GSAP_PANEL_ENABLED } from "./manualEditingAvailability" ;
1919import { useColorGradingController } from "./useColorGradingController" ;
20- import { usePersistedPinnedGroups } from "../../hooks/usePersistedPinnedGroups" ;
2120import {
2221 FlatColorGradingAccessory ,
2322 FlatColorGradingSection ,
@@ -52,7 +51,7 @@ const EMPTY_GSAP_EFFECT_HANDLERS = {
5251 *
5352 * Extracted from PropertyPanel so that file stays under the 600-LOC gate
5453 * (same one-directional-import precedent as FlatTextSection). Rendered only
55- * when STUDIO_FLAT_INSPECTOR_ENABLED is on; owns the one-open/pin group state.
54+ * when STUDIO_FLAT_INSPECTOR_ENABLED is on; owns the one-open group state.
5655 *
5756 * The Text/Style/Layout/Motion/Media/Grade groups share the one-open accordion.
5857 */
@@ -252,7 +251,6 @@ export function PropertyPanelFlat({
252251
253252 const isTextEditable = isTextEditableSelection ( element ) ;
254253 const elementKind = sections . media ? "media" : element . textFields . length > 0 ? "text" : "other" ;
255- const { pinnedGroupIds, togglePin } = usePersistedPinnedGroups ( elementKind ) ;
256254 const toggleOpen = ( groupId : string ) =>
257255 setOpenGroupId ( ( current ) => ( current === groupId ? "" : groupId ) ) ;
258256 // Basis for the Layout keyframe gutter (X/Y/W/H/Angle + 3D Transform) —
@@ -311,9 +309,8 @@ export function PropertyPanelFlat({
311309 const showMotionGroup = showMotionTiming || showMotionEffects ;
312310
313311 // Ordered group descriptors — one per FlatGroup this panel renders, gated by
314- // the same conditions the inline JSX used. Partitioned into pinned/unpinned
315- // below so pinned groups render first (always open, no accordion) above the
316- // PinnedZoneDivider, with the rest in the one-open accordion beneath it.
312+ // the same conditions the inline JSX used. Split below into before-open/
313+ // open/after-open regions for the one-open accordion.
317314 const groups : FlatGroupDescriptor [ ] = [ ] ;
318315 if ( isTextEditable ) {
319316 groups . push ( {
@@ -453,20 +450,17 @@ export function PropertyPanelFlat({
453450 } ) ;
454451 }
455452
456- const pinned = groups . filter ( ( g ) => pinnedGroupIds . includes ( g . id ) ) ;
457- const unpinned = groups . filter ( ( g ) => ! pinnedGroupIds . includes ( g . id ) ) ;
458-
459453 // Fixed-headers + scrollable-open-section layout (design_handoff
460454 // scrollable-open-section, replaces the prior sticky-stacking mechanism):
461455 // collapsed headers before/after the open group render in normal document
462456 // flow and never move. Only the open group's own body content scrolls, in
463457 // a dedicated region between the two fixed header stacks. When no group is
464458 // open, every group is just a collapsed header — there's no scrollable
465459 // middle region at all, since nothing is expanded.
466- const openIndex = unpinned . findIndex ( ( g ) => g . id === openGroupId ) ;
467- const beforeOpen = openIndex === - 1 ? unpinned : unpinned . slice ( 0 , openIndex ) ;
468- const openGroup = openIndex === - 1 ? null : unpinned [ openIndex ] ;
469- const afterOpen = openIndex === - 1 ? [ ] : unpinned . slice ( openIndex + 1 ) ;
460+ const openIndex = groups . findIndex ( ( g ) => g . id === openGroupId ) ;
461+ const beforeOpen = openIndex === - 1 ? groups : groups . slice ( 0 , openIndex ) ;
462+ const openGroup = openIndex === - 1 ? null : groups [ openIndex ] ;
463+ const afterOpen = openIndex === - 1 ? [ ] : groups . slice ( openIndex + 1 ) ;
470464
471465 return (
472466 < div className = "flex h-full min-h-0 flex-col overflow-hidden bg-panel-bg text-panel-text-1" >
@@ -487,25 +481,12 @@ export function PropertyPanelFlat({
487481 showUngroup = { Boolean ( onUngroup && element . dataAttributes [ "hf-group" ] != null ) }
488482 />
489483 < div data-flat-panel-body = "true" className = "flex min-h-0 flex-1 flex-col overflow-hidden" >
490- { pinned . map ( ( g ) => (
491- < PinnedGroupRow
492- key = { g . id }
493- title = { g . title }
494- accessory = { g . accessory }
495- onUnpin = { ( ) => togglePin ( g . id ) }
496- >
497- { g . content }
498- </ PinnedGroupRow >
499- ) ) }
500- { pinned . length > 0 && unpinned . length > 0 && < PinnedZoneDivider /> }
501484 { beforeOpen . map ( ( g ) => (
502485 < FlatGroupHeader
503486 key = { g . id }
504487 title = { g . title }
505488 isOpen = { false }
506- isPinned = { false }
507489 onToggleOpen = { ( ) => toggleOpen ( g . id ) }
508- onTogglePin = { ( ) => togglePin ( g . id ) }
509490 summary = { g . summary }
510491 />
511492 ) ) }
@@ -514,9 +495,7 @@ export function PropertyPanelFlat({
514495 < FlatGroupHeader
515496 title = { openGroup . title }
516497 isOpen
517- isPinned = { false }
518498 onToggleOpen = { ( ) => toggleOpen ( openGroup . id ) }
519- onTogglePin = { ( ) => togglePin ( openGroup . id ) }
520499 accessory = { openGroup . accessory }
521500 />
522501 < div className = "min-h-0 flex-1 overflow-y-auto border-b border-panel-hairline px-4 py-3" >
@@ -529,9 +508,7 @@ export function PropertyPanelFlat({
529508 key = { g . id }
530509 title = { g . title }
531510 isOpen = { false }
532- isPinned = { false }
533511 onToggleOpen = { ( ) => toggleOpen ( g . id ) }
534- onTogglePin = { ( ) => togglePin ( g . id ) }
535512 summary = { g . summary }
536513 />
537514 ) ) }
0 commit comments