Skip to content

feat(tokens): UploadInput, FileInput, UploadDragger, UploadList and ImageUpload on the design tokens - #258

Merged
aktasmehmet merged 12 commits into
mainfrom
feat/design-tokens-batch-11
Dec 2, 2026
Merged

aktasmehmet merged 12 commits into
mainfrom
feat/design-tokens-batch-11

Conversation

@aktasmehmet

@aktasmehmet aktasmehmet commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Batch 11 of the design token migration: the Upload family (UploadInput, UploadDragger, UploadList, the shared file rows, ImageUpload) migrated in place, with the old styles kept as compare baselines.

What this PR does

  • Token migration: all Upload components take their colors, spacing and text styles from the tokens and work in dark mode.
  • Compare screens: Token Compare → Upload (UploadInput, UploadDragger, UploadList, ImageUpload), with sizes, states and file scenarios (value files, validation error, waiting, uploading, upload failed, max files reached); upload responses are mocked with MSW.
  • Lint: the stricter CSS rules cover src/lib/components/Upload.
  • Figma: new UploadInput, UploadDragger, UploadList and ImageUpload pages in the "Motif UI Components" library (the file row is an internal block, _UploadFileRow), with their notes in docs/figma/*.md. ProgressBar's Figma bars now hug their height.

UploadInput

  • The input family's field: inset border, 24/32/40/48 heights, field tokens, error/success, disabled and readOnly like InputText.
  • Browse and Upload buttons sit inside the border on neutral-soft; Upload turns primary-solid on hover; keyboard focus ring.
  • On hover the actions color like the file rows: delete danger, download and fileAction primary.

UploadDragger, UploadList

  • One solid frame for the drop zone and the file list; the drop target is a dashed line inside the zone (primary + primary-soft on hover and drag). Error/success color the whole frame.
  • A full zone (max files, uploading) only drops hover: UploadList disables Browse, UploadDragger fades its icon and texts. readOnly has its own look (border-soft frame, surface-subtle list), disabled is gray.
  • Actions: a disabled list shows none; a readOnly one only those that leave the files as they are (download, fileAction). The same goes for UploadInput.
  • File rows: text tokens, rows separated by a border-soft line, hover fills the row; on row hover delete turns danger and the other actions primary (IconButton variant).

ImageUpload

  • Same frame, dashed drop target while empty; the hover actions sit on a see-through tile and are one size up (18/22/24/26).
  • Preview: backdrop overlay on z-layer("modal"), on-media toolbar and close button.

Visible changes (to go into the change notes)

  • UploadInput heights and look follow the input family.
  • Drop zones: solid frame with an inner dashed target; a full zone is no longer gray.
  • File list: dividers between rows; ImageUpload action icons one size larger with padding.

Type of Change

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

Screenshots / Preview

image image 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. npm run storybook: Token Compare → Upload.
  2. UploadDragger / UploadList: hover a file row (delete red, other actions blue); fill to maxFile (zone stays normal).
  3. npm test, npm run lint, npm run check:type, npm run check:scss, npm run check:mtf-tokens: no errors.

Closes #EDKUI-1252

@claude

claude Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of PR #258 (Upload family on the design tokens)

I read the changed SCSS and TSX in src/lib/components/Upload against general.md, css.md and design-tokens.md. I skipped the frozen baselines. I did not run tests, lint or type checks, since CI does that.

Blocking (css.md §0): none. .Root is compiled in UploadInput, UploadList, UploadDragger, FileList and ImageUpload, and it is the first rule in each file.

No new issues. The earlier review points have been addressed in the latest commits:

  • The margin on the Browse and Upload buttons is now set once per button.
  • A readOnly row no longer gets a hover fill.
  • disabled, readOnly and inactive are one exclusive class on the drop zone.
  • The list now uses overflow-y: auto.
  • The hover and state-class tests are added.

Nits, optional:

  • UploadDragger.module.scss: &.disabled sets color: var(--mtf-color-text-disabled). The earlier &.readOnly, &.inactive block already sets the same color, so it could be a single &.readOnly, &.inactive, &.disabled rule (css.md §4).
  • FileList.module.scss .Root: border is set as a shorthand and then border-top: 0 overrides it. Writing border-width: 0 var(--mtf-sizing-1) var(--mtf-sizing-1) plus border-style: solid would avoid the override (css.md §4).

Kullanmadan önce yetkin bir kişi tarafından doğrulanmalıdır. Bu sohbet kurumsal denetime tabidir.

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Size Change: -137 B (-0.05%)

Total Size: 284 kB

📦 View Changed
Filename Size Change
dist/index.cjs 141 kB -61 B (-0.04%)
dist/index.es.js 140 kB -76 B (-0.05%)
ℹ️ 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

FileInput is not migrated here until #252 is settled; UploadProvider, helper, index and the defaultable props are back to main's, only largerIconSize stays.
- disabled lists show no actions, readOnly ones only download and fileAction
- readOnly has its own look (border-soft frame, surface-subtle list); drop zone state classes are exclusive (disabled, readOnly, inactive)
- a disabled row has no hover; UploadInput colors its actions on hover like the file rows
- the file list scrolls only when it overflows (no empty scrollbar gutter)
- UploadInput buttons set their margin once
- UploadList and UploadDragger: the readOnly zone fades its info texts; UploadDragger's full zone (maxFile reached) fades its icon and texts like readOnly
- docs/figma: UploadInput, UploadDragger, UploadList, ImageUpload and _UploadFileRow notes; ProgressBar hugs its height
A readOnly list is already surface-subtle, so the hover fill showed nothing; the rows now skip it as disabled ones do.

@hatesalp hatesalp left a comment

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.

🚀

@aktasmehmet
aktasmehmet merged commit 2e2baed into main Dec 2, 2026
16 checks passed
@aktasmehmet
aktasmehmet deleted the feat/design-tokens-batch-11 branch December 2, 2026 13:37

This branch was successfully deployed

1 active deployment
development — 757328d2 Deployed Dec 2, 2026 by aktasmehmet via Chromatic #588
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.

3 participants