Repository navigation
fix(components): ui:calendar designer stops offering mode default (objectui#10377) - #10420
Conversation
…objectui#10377) The registration inputs enum offered 'default' beside single/multiple/range. CalendarSchema.mode and the UiCalendarSchema mirror both refuse it, and react-day-picker 10 has no such mode: measured, it drops the authored selection and clicks select nothing. The enum now lists the contract's modes, pinned enum-subset-of-mirror by a safeParse test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01877XiBYSaRCk2CU7cMSg3S
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
PM ACCEPT — objectui#10420 (Closes #10377)Head-sha: Clause-②: no. The branch taken only drops Measurement. The runtime measurement came before the edit, as the triage plan asked.
Pin. Changeset. A patch for Dev's open question: option A. No display-only mode for now. No document authors one, and adding it would widen Ready and enqueued once CI is green. |
Fixes #10377
Clause-②: conditional.
The branch taken is the first one: only the designer enum drops
'default';CalendarSchema.mode(TS) and theUiCalendarSchemamirror are byte-unchanged.What changed
packages/components/src/renderers/form/calendar.tsx: theui:calendarregistrationinputsenum formodeis now['single', 'multiple', 'range'], exactly whatCalendarSchema.modeandUiCalendarSchemaadmit.'default'is gone.packages/components/src/renderers/form/__tests__/calendar.designerModeEnum-10377.test.ts: every value in theui:calendardesignermodeenum passesUiCalendarSchema.safeParse(enum is a subset of the contract). The list of modes is not restated; the mirror is the judge. It also has a non-vacuity row and a control row showing the mirror still refusesdefault, so the pin can fail..changeset/10377-calendar-designer-mode-enum.md: patch for@object-ui/components.Measurement (step 1, before any edit)
A throwaway probe rendered the real
ui:calendarrenderer (realComponentRegistry, react-day-picker 10.0.1, clock frozen inside 2026-09) and comparedmodeomitted,mode: 'single'andmode: 'default', each with no value, withvalueand withdefaultValue, then clicked two days:data-modesinglemode: 'single'single(DOM byte-identical to omitted)mode: 'default'defaultvalue: '2026-09-15'single'default'+value: '2026-09-15'default'default'+defaultValue: '2026-09-15'defaultSo
'default'is distinct from omittingmode, but it is not a meaningful mode. react-day-picker 10'sModeunion is onlysingle | multiple | range, and itsuseSelectionswitch sends any other string to the no-selection branch.isInteractiveismode !== undefined, so all 35 day cells still render as buttons, but clicking them does nothing, and the authoredvalue/defaultValueis silently dropped. That is a value falling through an unrecognised string, not a designed mode. That is why this PR takes the drop-from-the-enum branch. A read-only calendar is a separate question, raised in the report as an open question for the PM rather than widened here.The corpus check found no document authoring
mode: 'default'. The only hit in the tree was the registration itself.Ablation (after the fix commit)
The fix was committed first (
3d90a1259). Then'default'was put back into the enum on disk. The anchor count went from 0 to 1 for the old spelling and from 1 to 0 for the new one. The new pin went red:Tests 1 failed | 2 passed (3), and the diff showed+ "default"as the refused value. The restore usedgit checkout HEAD --;git diff HEADwas empty and the disk hash matched the HEAD blobb9a6e73df. After the restore the pin was green:Tests 3 passed (3).Checks, run on
3d90a1259pnpm --filter @object-ui/components type-check(afterturbo run build --filter='@object-ui/components^...', 7/7 tasks): exit 0. The--listFilesoutput oftsconfig.test.jsonincludes the new test.pnpm exec vitest run packages/components/:Test Files 295 passed | 1 skipped (296),Tests 2845 passed | 17 skipped (2862).no-explicit-anyon unchanged lines (the base file has the same 3). Type-aware linting is not enabled ineslint.config.js, so this diff cannot move the verdict of any untouched file.check:designer-field-key-parityOK ·check:control-bytesOK ·check:new-line-citations0 new ·check:changeset-claimspass ·check:pending-changeset-literalspass ·check:component-surface-parityreport-only, exit 0 (itsui:calendarrows are the pre-existingminDate/maxDaterows and are unchanged) ·scripts/check-changeset-presence.mjspass.check:sdui-registration-pins. Reason: it reads the console bundle and refuses to run withoutpnpm --filter @object-ui/console build. Left to CI.Acceptance notes
apps/console/src/__tests__/registry-inputs-spec-parity.test.tsjudges enum arms against@objectstack/specComponentPropsMap, which does not carry the objectui-ownui:calendar. The existing enum-vs-mirror pins are per-component (text-variant-align-6942,toast-sonner-button-variant-inputs-7316). So the pin is per-component too.Generated by Claude Code