Skip to content

feat: refactor: share the Date field shell and calendar frame (jscpd: ~600 duplicated lines) - #624

Merged
mvilacad merged 2 commits into
mainfrom
feat/623-refactor-share-the-date-field-shell
Oct 25, 2026
Merged

mvilacad merged 2 commits into
mainfrom
feat/623-refactor-share-the-date-field-shell

Conversation

@mvilacad

@mvilacad mvilacad commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #623

Change

DateField, TimeField, DatePicker and DateRangePicker repeated the same chrome (label, bordered segment group, hidden form input, error/description line) and Calendar/RangeCalendar the same frame. Both now live in DateFieldShell.svelte and CalendarFrame.svelte (internal, not exported); date-utils.ts gains the shared helper. Net -180 lines (120 added, 300 removed). Behaviour and markup are unchanged: no test was edited.

Evidence

  • bun run test:browser -- src/lib/components/Date: 6 files, 46 tests passed (axe in every state, keyboard flows, pt-BR segments).
  • The land gate also renders the Date screenshots against the committed baselines (markup must be pixel-identical).

Checklist

  • bun run validate passes (pre-push)
  • No public API change (internal components), so no changeset

@mvilacad
mvilacad force-pushed the feat/623-refactor-share-the-date-field-shell branch from 789aa59 to 84489c1 Compare October 25, 2026 21:28
@mvilacad
mvilacad marked this pull request as ready for review October 25, 2026 21:28
@mvilacad
mvilacad merged commit 95124cb into main Oct 25, 2026
@mvilacad
mvilacad deleted the feat/623-refactor-share-the-date-field-shell branch October 25, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: share the Date field shell and calendar frame (jscpd: ~600 duplicated lines)

1 participant