Skip to content

Rework file uploader dropzone and import feedback - #287

Merged
NathanVss merged 11 commits into
mainfrom
fix/upload-patch
Jul 31, 2026
Merged

Rework file uploader dropzone and import feedback#287
NathanVss merged 11 commits into
mainfrom
fix/upload-patch

Conversation

@NathanVss

@NathanVss NathanVss commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What

  • Reworks the FileUploader dropzone to match the new design: SVG illustrations (gray idle, colored while dragging), dedicated error icon, new description / descriptionMode props, and a fix for the hover flicker while dragging over the zone.
  • Replaces the Alerts of the import flow: parsed-row counts and import failures are now shown as the uploader description. ShareModal gets an importErrorMessage prop to customize the failure message; importModalChildren is unchanged.
  • Completes de-DE, es-ES and nl-NL translations for the upload and share import sections; all locales now match en-US key parity.
  • Stories for the dragging state, description and error description; e2e specs updated accordingly (81 passing).
CleanShot 2026-07-30 at 17 31 46

How to test

  • Storybook: Components/Forms/FileUploader (Dragging, SingleWithDescription, SingleWithErrorDescription) and Components/Share (ImportContacts, ImportContactsFailure).
  • yarn playwright test e2e/share-import-modal e2e/share-modal/share-modal-import-integration.spec.tsx

The dropzone now follows the new design: static SVG illustrations
replace the icon composite (colored variant while dragging a file),
and the error state uses a dedicated interrupted-progress icon.
A description prop (with a default and an error tone) lets consumers
display contextual feedback under the selected file.
Dragging over children of the dropzone no longer makes the hover
state flicker: dragleave events are ignored while the pointer stays
inside the zone.
@NathanVss
NathanVss requested a review from jbpenrath July 30, 2026 15:33
Comment thread src/components/form/file-uploader/assets/progress.svg Outdated
Comment thread src/components/share/import-modal/assets/contacts.csv
Comment thread src/components/form/file-uploader/FileUploader.tsx Outdated
NathanVss added 10 commits July 31, 2026 11:44
Parsed-row counts and import failures were displayed in Alerts below
the uploader while parse errors already appeared on the file itself.
Both now go through the uploader description so all import feedback
lives in one place. ShareModal reports a failed onImportContacts with
a message consumers can override via importErrorMessage, cleared when
a new file is selected or the modal closes. importModalChildren is
kept for extra custom content.
The sample rows should show the full role wording expected by the
products consuming the import.
de-DE and es-ES were missing the whole upload section and every
locale but en-US and fr-FR was missing the share import section, so
the new components fell back to English. Also adds the failed-import
message introduced on this branch. All locales now have full key
parity with en-US.
Keep the unreleased section in sync with the branch content before
opening the review.
The dragging state doubled the border width, growing the dropzone by
2px and shifting the surrounding layout. The inset box-shadow already
renders the thicker border, so the border-width override is dropped.
The dropzone height is content-driven, so box-sizing cannot absorb a
wider border and the box grew by 2px while dragging. An outline with
a negative offset paints the same 2px border on top of the box
without ever affecting layout.
Review feedback: the error state now renders an inline icon, leaving
progress.svg, the old error badge mark and its styles unreferenced.
Review feedback: the bundled template now says administrator but the
share modal stories still used admin as role value, so importing the
template into the story flow produced rows matching no role.
Hardcoded hex values in the inline icon bypassed theming. The icon
now inherits its color, set on the icon slot with the neutral
secondary design token.
Minor Changes

- ✨(front) rework file uploader dropzone states
- ♻️(front) surface import feedback through the uploader description

Patch Changes

- 🌐(front) complete upload and import translations
- 🐛(front) keep dropzone size stable while dragging
@NathanVss
NathanVss merged commit 240067f into main Jul 31, 2026
12 checks passed
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.

2 participants