Commit a93778b
Newsletter: replace Add subscribers CSV file selector with a drag-and-drop area (#49597)
* Newsletter: replace Add subscribers CSV file selector with a drag-and-drop area
The Upload CSV tab's bare file input is now a clickable drag-and-drop box,
matching Calypso's importer and adopting the VideoPress Library drag-over
highlight (recolored to WPDS tokens). Clicking opens the native picker; files
dragged onto the box are read the same way; a selected file shows its name with
a check icon.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Newsletter: use core DropZone for the Add subscribers CSV drag-and-drop
Per review, hand off the drag-and-drop to @wordpress/components' DropZone (the
same primitive the modernized VideoPress Library uses) instead of hand-rolled
drag handlers + isDraggingOver state. The visible Calypso-style box and
click-to-pick stay; DropZone overlays it and shows its accent "drop to upload"
overlay while dragging. The inactive DropZone is visibility:hidden, so it never
blocks the click target underneath.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Newsletter: reject non-CSV drops on the Add subscribers upload
Per review (enejb): the drag-and-drop accepted any file type. Validate the
dropped/picked file against the accepted extensions (.csv, .txt, .tsv) in the
shared handleFile path and surface a clear error for anything else, instead of
reading an arbitrary file as text. The picker's accept attribute and the
validation now derive from one extension list so they can't drift.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/27542169464
Upstream-Ref: Automattic/jetpack@2261b8d1 parent 5edb5b0 commit a93778b
2 files changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments