Skip to content

feat(tokens): DatePicker, DateRangePicker, TimePicker, DateTimePicker and their inputs on the design tokens - #259

Open
aktasmehmet wants to merge 2 commits into
mainfrom
feat/design-tokens-batch-12
Open

aktasmehmet wants to merge 2 commits into
mainfrom
feat/design-tokens-batch-12

Conversation

@aktasmehmet

@aktasmehmet aktasmehmet commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Moves the pickers to the --mtf-* design tokens: the shared picker box (Motif/Pickers), DatePicker, DateRangePicker, TimePicker, DateTimePicker, and InputDate, InputDateRange, InputTime and InputDateTime.

  • Day cells: today ring, selected primary-solid, hover neutral-soft, a 2px inset focus ring. Header arrows are ghost buttons.
  • DateRangePicker: the selected range is one seamless strip at every size.
  • DateRangePicker: below md, the xs range inputs stack (the dates did not fit side by side).
  • TimePicker: stripes and AM / PM on tokens.
  • DateTimePicker: the tabs use Tab's underline look.
  • variant="shadow": raised like Select's list (surface-raised, elevation-2), no border.
  • All the picker folders are in the strict stylelint scope.
  • Token compare story: Token Compare/Pickers.
  • Figma: pages for every picker and input, plus the shared _DatePickerDayView and _TimePickerContent; notes in docs/figma.
  • docs/review/figma.md: a single-line field rule and a page audit script (.claude/skills/figma-sync/scripts/audit-page.js).

No prop, default or behavior changes.

Type of Change

  • 🆕 New Component
  • ✨ Feature / Enhancement
  • 🐛 Bug Fix
  • 💥 Breaking Change
  • 📦 Build / Dependency / Docs Update
  • 🧹 Code Refactoring

Screenshots / Preview

DatePicker

image

TimePicker

image

DateTimePicker

image

DateRangePicker

image

Checklist

  • Self-reviewed, no leftover logs or debug code
  • Uses design tokens — no hardcoded style values
  • Accessible (keyboard nav, ARIA, contrast)
  • Tests added/updated and passing
  • Storybook story added/updated

How to Test

  1. Storybook → Token Compare / Pickers: each picker, current and new side by side, in light and dark.
  2. DateRangePicker: pick a range, hover a second day (preview strip), and narrow the window below md at xs.
  3. Open each input (InputDate, InputDateRange, InputTime, InputDateTime): the picker opens bordered, one size down.

Closes #EDKUI-1252

@claude

claude Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @aktasmehmet's task in 48s —— View job


Review: pickers on the design tokens

  • Read the review rules (general, css, design-tokens, figma, tests)
  • Reviewed the SCSS, TSX and test changes (the frozen compare/baseline/** copies were not reviewed, per design-tokens §1)
  • Posted inline comments

No blocking issues.

  • .Root (css.md §0): Picker.module.scss is the only picker module used with sanitizeModuleRootClasses, and it still compiles .Root. The other picker modules are not used with it, and no .Root was removed in this diff.
  • Tokens (design-tokens §2–§6): no raw values and no --theme-* or --base-sizing-* left in the changed files. Spacing uses sizing-space-N, element sizes use sizing-N, and text uses typography() with text steps for the size tables. I checked that every --mtf-* token used exists in generated/themes/basic.css. Colors are semantic and shadows use elevation-2. The old --base-sizing-2x margins on the four inputs are now sizing-space-2.
  • Custom property: --mtf-date-picker-day-gap is justified by css.md §4. It carries the size's column gap into the range-strip rules, which would otherwise exceed the specificity limit.
  • Tests: no prop defaults changed, so no assertDefaults change is needed. The findAllByText change waits for the slide animation to finish.
  • Figma: the PR adds Figma notes and the page audit script.

Inline comments (minor):

  • DateRangePicker.module.scss:154: the gap in the below md loop repeats the one in the main size loop (css.md §4).
  • TimePicker.module.scss:88: stray blank line.
  • Header.tsx:33: class names are joined by hand with a template string and a ternary. A shared class-list helper would avoid it, if the repo has one.

Kullanmadan önce yetkin bir kişi tarafından doğrulanmalıdır.

Bu sohbet kurumsal denetime tabidir.

transform: translateX(0);
}
.#{$size} .datePickers {
gap: var(--mtf-sizing-space-#{$pickerGap});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css.md §4 (declare a value once). gap: var(--mtf-sizing-space-#{$pickerGap}) here is identical to the one in the size loop above (line 111), so the below md loop only needs the transform rules. Dropping it also avoids a second per-size loop that re-sets the same property.

&.selected {
background-color: var(--theme-color-surface-primary-default);
color: var(--theme-color-text-base-global-light);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: stray blank line before the closing brace of button.

{onNextClick && (
<button className={styles.arrowButton} onClick={onNextClick} type="button">
<button
className={nextButtonClassName ? `${styles.arrowButton} ${nextButtonClassName}` : styles.arrowButton}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: nextButtonClassName ? \${styles.arrowButton} ${nextButtonClassName}` : styles.arrowButtonjoins class names by hand. Check whether the repo has a shared class-list helper (assanitizeModuleRootClasses` does for roots) and use it, so a falsy value needs no ternary.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Size Change: -1.1 kB (-0.39%)

Total Size: 283 kB

📦 View Changed
Filename Size Change
dist/index.cjs 141 kB -585 B (-0.41%)
dist/index.es.js 140 kB -517 B (-0.37%)
ℹ️ View Unchanged
Filename Size
dist/chunks/useToggle-1pe2WRaw.js 800 B
dist/chunks/useToggle-B6kbi656.cjs 769 B
dist/hooks.cjs 225 B
dist/hooks.es.js 219 B

compressed-size-action

This branch is waiting to be deployed

1 waiting deployment
development — 208822ef Waiting Dec 2, 2026 by aktasmehmet via Chromatic #589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant