Skip to content

feat(tokens): Slider, SliderRange, Drawer and Table on the design tokens - #261

Open
aktasmehmet wants to merge 4 commits into
mainfrom
feat/design-tokens-batch-13
Open

aktasmehmet wants to merge 4 commits into
mainfrom
feat/design-tokens-batch-13

Conversation

@aktasmehmet

@aktasmehmet aktasmehmet commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Moves Slider, SliderRange, Drawer and Table to the --mtf-* design tokens.

  • Slider, SliderRange: variant is VariantV2 (secondary is the brand color, the old gray is neutral, accent is new). Thumb surface-raised + elevation-1, keyboard focus ring, value tooltip as Tooltip.
  • Disabled fills and marks take text-disabled-soft (Slider, Checkbox, Radio, Switch); rule added to docs/review/design-tokens.md.
  • Drawer: as Modal (surface-raised, elevation-4, radius lg on the inner edges, backdrop), title heading-h5.
  • Table: tokens for head/foot backgrounds, rows, borders and text. RowColor is VariantV2 (light → neutral, accent added). The SCSS keeps its structure and stays out of the strict stylelint list for now.
  • Sizing tokens 600 and 760 added (additive).
  • Token compare stories: Slider, Drawer, Table. Figma pages and notes in docs/figma.

Breaking: Slider/SliderRange secondary look, Table RowColor light removed.

Type of Change

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

Screenshots / Preview

Drawer

image

Slider/Range

image

Table

image image 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 / Slider, Drawer, Table: current and new side by side, light and dark.
  2. Disabled Checkbox, Radio, Switch and Slider: the fill and mark are lighter.

Closes #EDKUI-1252

@claude

claude Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #261: Slider, SliderRange, Drawer and Table on the design tokens

No blocking issues. Every touched module keeps its .Root rule. In Slider.module.scss, .Root comes after the mixins and variables, which the file-order rule allows.

I checked the changed SCSS lines against docs/review/css.md and docs/review/design-tokens.md. The tokens look right for each role: text, surface, elevation-4, radius lg on the Drawer's inner edges, heading-h5, text-disabled-soft for disabled fills and marks, and spacing vs. sizing. VariantV2 is used on both Sliders and on RowColor. Everything else changed in the PR is the baseline and compare files, which I didn't review. Stories and docs weren't in the diff.

  • Read the review rules
  • Reviewed SCSS, types, tests and the token generator changes

Findings

  1. Tests were not updated for the new variants (tests.md).
    • Slider.test.tsx:52-56 and SliderRange.test.tsx:64-70 still type the list as the old Variant, with secondary, success, warning, danger, info. neutral and accent (the new values) are not covered.
    • Use VariantV2 and cover all eight variants.
    • The only test file in the diff is Table.test.tsx.
  2. Slider.module.scss bottom: auto (css.md §4). It's set on .tooltip and overridden for the same element in the size loop. The base value is never used on its own. See the inline comment.
  3. Table is outside the strict stylelint list (design-tokens.md). It now uses --mtf-* variables, so lint won't catch the deep selectors. The new hover rules add to that depth. See the inline comment. Please track it as a follow-up.
  4. Visible and breaking changes to include in the change log (design-tokens.md §9).
    • Slider and SliderRange secondary is now the brand color. The old gray is neutral.
    • Table RowColor light is removed. Table.mdx, line 237, says the callback returns "a string" defined in RowColor. Please check that it lists the new values.
    • Slider and SliderRange still default to primary, so that part is unchanged.
  5. Figma sync.
    • The PR adds docs/figma notes and mentions Figma pages.
    • The generated token files changed (sizing 600 and 760) together with the generator. Please confirm npm run figma:mtf-tokens was run and imported into the library.

Per docs/review/general.md, accessibility was not reviewed.

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Size Change: -418 B (-0.15%)

Total Size: 283 kB

📦 View Changed
Filename Size Change
dist/index.cjs 141 kB -221 B (-0.16%)
dist/index.es.js 140 kB -197 B (-0.14%)
ℹ️ 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

border-width: var(--base-sizing-6x);
border-style: solid;
border-color: var(--theme-color-text-secondary-active) transparent transparent;
border: var(--mtf-sizing-6) solid transparent;

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: bottom: auto here is set on .tooltip and then overridden for the same element in the size loop (.#{$size} .tooltip { bottom: calc(...) }). The base value is never used on its own, so drop it from the base rule and keep only the size-specific bottom.

@@ -1,6 +1,6 @@
@use "@styles" as *;

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.

This file now uses --mtf-* variables, so it is a migrated component under design-tokens.md. It is kept out of the strict stylelint list, as the PR description says, so the lint will not catch nested type-qualified selectors (thead tr.trColumnFilters th, tbody tr.#{$rowColor}:hover td:not([rowspan])) or specificity above 0,3,0. The new hover rules add to that depth. Please note it as a follow-up, and keep the added selectors as flat as the existing structure allows (css.md §1).

This branch is waiting to be deployed

1 waiting deployment
development — 0510b596 Waiting Dec 3, 2026 by aktasmehmet via Chromatic #595
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