Commit 9232e40
committed
fix(test-setup): stop shadowing ten real registrations, and declare page:header's inputs
vitest.setup.dom.tsx re-registered text, email, password, textarea, image,
html, avatar, select, slider and grid by hand — ~380 lines of renderer copied
out of @object-ui/components — to undo bare-name fallbacks that
@object-ui/fields and the plugins claimed by loading after it.
Both sides now register under their own namespace with skipFallback: true, so
nothing overwrites the ui: originals and the workaround is obsolete. It was not
free: the copies carried no `inputs` and no `defaultProps`, so inside the test
environment four curated public blocks reported an empty configuration surface
while the real registrations declare one. apps/console's contract test reads
that registry, so its picture of the contract was fiction for those tags — a
guard measuring a fixture instead of the product.
Deleting the block restores what the app actually boots with. Verified: the ten
tags keep their namespace and canonical type, and their declared surface comes
back — text 1 input, email 6, password 6, textarea 6, image 3, html 1,
avatar 4, select 6, slider 5, grid 7, plus defaultProps. The heavy DOM setup
also got roughly twice as fast (~545s to ~235s of setup time across the suite),
since every file in that project was paying to evaluate the duplicated
renderers.
With the shadowing gone, page:header was left as a genuine gap: a curated
public block whose renderer reads title, subtitle, actions, breadcrumb,
recordChrome, showStar and showCopyId, with none of them declared. Now
declared.
element:divider keeps zero inputs on purpose — its renderer reads only
className, so there is nothing to author.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp1 parent 4e11db8 commit 9232e40
3 files changed
Lines changed: 69 additions & 392 deletions
File tree
- .changeset
- packages/components/src/renderers/layout
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1309 | 1323 | | |
1310 | 1324 | | |
1311 | 1325 | | |
| |||
0 commit comments