Skip to content

Commit a93778b

Browse files
dhasilvamatticbot
authored andcommitted
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@2261b8d
1 parent 5edb5b0 commit a93778b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '59ccaf0f8f3a7c272d30');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'cfda882e007788f7b7fa');

build/routes/dashboard/content.min.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)