feat(panel): add PanelGroup to join form sections (PUI-10) #135
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/PUI-10-add-panelgroup-to-join-form-sections"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A form with several Panels showed them as separate floating cards. The chosen section treatment (prototype variant F) joins them:
PanelGroupwraps Panels in one bordered surface with a divider between visible sections, and titles stay above their fields. Fields keep today's look, and Panels outside a group are unchanged.For you
--space-2xsfrom its title. Gain: matches the criterion and standalone behaviour. Cost: possibly cramped inside a group. Alternative: give that Panel inline padding inside a group. No story or example puts a BlockEditor in a group../components/PanelGroup.vueexport). Then check CRM → contact edit (two joined Panels with one divider) and the StorybookLayout/PanelGroupstories (light, dark, narrow; the hidden middle Panel leaves no double or leading divider). No browser ran, and the story play functions (bun --cwd storybook test) did not run.Review guide
1. PanelGroup. A plain
<div class="pui-panel-group">with only a default slot, no props and no role (PanelGroup.vue).2. CSS. record-layout.css:38-55
.pui-panel-group: the group takes the Panel's surface (border, radius, background). Its direct child Panels drop theirs. The divider isborder-block-starton each visible Panel that follows another visible one.~rather than variant F's+, so a hidden tab panel neither swallows nor leads a divider.>), so a Panel nested inside a Panel keeps its chrome.@layer components..pui-panel-group > .pui-panel(0,2,0) beats.pui-paneland leaves padding,[hidden]and the 48em/56em rules alone. The editable-BlockEditor rule (0,3,0) still wins on padding. The divider (0,5,0) beats that rule'sborder: 0.3. Playground. ContactForm.vue:215-234: the two Panels are wrapped. The rest is re-indentation only.
Skim:
package.jsonexport,storybook/stories/Layout/PanelGroup.stories.ts(three Panels, the middle one hidden; light, Dark, Narrow; play assertions on borders and role),record-layout/AUDIT.md(PanelGroup section), CONVENTIONS row and sentence, README line, CHANGELOG## UnreleasedAdded.Choices made: the styles stay in
record-layout.csswith Panel (one visual family) rather than a new file; the story is its ownLayout/PanelGroupfile rather than an addition toRecordForm.stories.ts(fewer conflicts with the other open PRs); the group itself has no padding, so each divider follows Panel padding.Evidence
<section>and<h2>unchanged, withhiddenpassed through and no role (SSR test).bun run lint✓,bun run typecheck✓,bun run format:check✓,bun run build:vue✓,bun run build:storybook(the Catalog) ✓. Eachpackages/ui/testsfile passes run alone. The combinedbun test packages/uihas 32 failures that also occur onmain(a test-loader collision).Tests:
packages/ui/tests/panel-group.test.ts(new).Review
Reviewed:
b2b893f8e12ef091803335d64a4aff5859f8099fby workflow-autopilot review panel, changes + quality seats: 0 fixed, 1 declined, 0 openMerge Danger
Door: two-way. It adds a component and opt-in CSS.
Blast Radius: tiny. Only markup that uses
.pui-panel-groupchanges.