parametrics: add display: 'segmented' enum hint + drop fence color

User pointed out two regressions in the auto-derived fence inspector:

- A `color` field rendered for fence — but the legacy `FencePanel`
  hid it (fence's color is a leftover schema field that isn't part of
  the inspector UX). Dropped from `fenceParametrics`.

- Style + base-style enums rendered as a dropdown, but the legacy
  used the inline segmented switcher (Slat/Rail/Privacy +
  Grounded/Floating). Added a `display?: 'select' | 'segmented'` hint
  to the enum field kind. ParametricInspector renders SegmentedControl
  when set; defaults to dropdown otherwise.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-18 10:21:56 -04:00
co-authored by Claude Opus 4.7
parent e7cb976b9b
commit 80199dc890
3 changed files with 31 additions and 4 deletions
+12 -3
View File
@@ -32,10 +32,19 @@ export const fenceParametrics: ParametricDescriptor<FenceNode> = {
{
label: 'Style',
fields: [
{ key: 'style', kind: 'enum', options: ['slat', 'rail', 'privacy'] },
{ key: 'baseStyle', kind: 'enum', options: ['floating', 'grounded'] },
{
key: 'style',
kind: 'enum',
options: ['slat', 'rail', 'privacy'],
display: 'segmented',
},
{
key: 'baseStyle',
kind: 'enum',
options: ['grounded', 'floating'],
display: 'segmented',
},
{ key: 'showInfill', kind: 'boolean' },
{ key: 'color', kind: 'color' },
],
},
],