Skip to content

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

Closed

Description

@mvilacad

jscpd reports the Date components as the largest duplication: DatePicker/TimeField 188 lines, DateField/TimeField 147, Calendar/RangeCalendar 122, DatePicker/DateRangePicker 13.

Extract, internal only (no public API change):

  • a field shell (label, description, error, hidden input, group wrapper, trigger button) used by DateField, TimeField, DatePicker, DateRangePicker;
  • a calendar frame (application root, sr-only heading, CalendarBody) used by Calendar, RangeCalendar and the two picker popovers;
  • the shared popover helpers (focusOwnDay, close).

Proof: the existing Date browser tests stay green (no new behavior, so no new test).

Activity

  1. added
    enhancementNew feature or request
    area:componentsSvelte components and primitives
    in progressSomeone is working on it (see the linked draft PR)
    on Oct 25, 2026
  2. self-assigned this
    on Oct 25, 2026
  3. mvilacad commented on Oct 25, 2026

    @mvilacad
    ContributorAuthor

    Working on this in #624 (draft). Branch feat/623-refactor-share-the-date-field-shell. Regression test first, then the fix.

  4. removed
    in progressSomeone is working on it (see the linked draft PR)
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:componentsSvelte components and primitivesenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions