Commit cb56862
fix(spec): make page
Two required-but-unauthorable fields made it impossible to create
record/home/app pages in the Studio metadata editor:
- `PageSchema.regions` was required, but the New Page form has no region
editor and list/interface pages don't use regions at all — forcing
`regions: []` boilerplate on every page and a hard dead-end for the rest.
- `PageComponentSchema.properties` was required, but the create-form seeds a
record page's layout from the object's synthesized default page
(buildDefaultPageSchema), whose nodes carry props at the top level — so
every seeded block failed with
"regions.N.components.M.properties: expected record". Many components
(record:activity, element:divider, …) also legitimately carry no props.
Both become `.optional().default(...)`; an empty full page falls back to the
synthesized default layout, slotted pages compose via `slots`, and list pages
ignore regions. Also drops the now-unneeded `required` flag on the page form's
regions repeater and updates the three tests that asserted the old contract.
Verified end-to-end: a record page now creates successfully through the
Studio form. 802 spec UI tests + spec/platform-objects typechecks green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>regions and component properties optional1 parent c121d73 commit cb56862
3 files changed
Lines changed: 44 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
410 | 409 | | |
411 | 410 | | |
412 | 411 | | |
| |||
1169 | 1168 | | |
1170 | 1169 | | |
1171 | 1170 | | |
1172 | | - | |
1173 | | - | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1174 | 1178 | | |
1175 | 1179 | | |
1176 | | - | |
| 1180 | + | |
| 1181 | + | |
1177 | 1182 | | |
1178 | 1183 | | |
1179 | 1184 | | |
| |||
1201 | 1206 | | |
1202 | 1207 | | |
1203 | 1208 | | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1208 | 1217 | | |
1209 | 1218 | | |
1210 | 1219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
335 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
336 | 353 | | |
337 | 354 | | |
338 | 355 | | |
| |||
0 commit comments