Skip to content

[WC-3666]: update react-dropzone to v20.1.4 - #2515

Open
gjulivan wants to merge 1 commit into
mainfrom
chore/bump-react-dropzone
Open

gjulivan wants to merge 1 commit into
mainfrom
chore/bump-react-dropzone

Conversation

@gjulivan

@gjulivan gjulivan commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Pull request type

Dependency changes (any modification to dependencies in package.json)


Description

Updates react-dropzone from 14.4.1 to 20.1.4 in file-uploader-web and rich-text-web. This also brings in attr-accept 4.0.1 and file-selector 5.0.2, and drops prop-types.

The local patch patches/react-dropzone.patch (stricter isExt extension check) is still needed, because 20.1.4 has the same regex. v16 removed dist/es/ and the UMD build, so the patch now targets dist/index.js, dist/index.cjs and src/utils/index.ts.

Breaking changes from 15 to 20, checked against our code:

  • v15, isDragReject cleared after drop: no impact. Both widgets read it only together with isDragActive.
  • v17, React >= 18 required, prop-types removed: no impact.
  • v18, full extension-to-MIME table no longer bundled: File Uploader's predefined formats (PDF, Office, CSV, ZIP, TXT, images, audio, video) are matched by MIME type only. file-selector 5 still includes a default table that covers all of them, so files the browser leaves without a type are still accepted. Only a custom format with an uncommon MIME type and no extensions loses that fallback.
  • v19, files up to the limit are accepted instead of the whole batch being rejected: Rich Text's image dialog uses multiple: false. When several images are dropped at once, the first one is now used; before, nothing happened. This is in the changelog. File Uploader sets no file limit, so it is not affected.
  • v20, Node >= 22 required: no impact. The repo requires Node 26.

Unit tests pass (File Uploader 137/137, Rich Text 605/605), lint has no errors, and both widgets build with the patched regex in the bundle.

What should be covered while testing?

  • File Uploader: drag and drop, and file picking, for each predefined format. Check that a disallowed file type is rejected.
  • File Uploader (WC-3675): on Windows with classic Outlook, in Chrome and Edge, with the app on HTTPS, drag an email attachment directly into the drop zone. It should upload without a SecurityError from FileSystemFileHandle.getFile in the console. If possible, also try the new web-based Outlook.
  • Rich Text: in the image dialog, upload one image, drop a file that is not an image, and drop several images at once (the first image is used).

🤖 Generated with Claude Code

@gjulivan
gjulivan requested a review from a team as a code owner November 4, 2026 15:08
@github-actions

This comment has been minimized.

@gjulivan gjulivan changed the title chore: update react-dropzone to v20.1.4 [WC-3666]: update react-dropzone to v20.1.4 Nov 4, 2026
@gjulivan
gjulivan force-pushed the chore/bump-react-dropzone branch from 6ed85d6 to 3a6ebd1 Compare November 16, 2026 23:08
@github-actions

This comment has been minimized.

Bump react-dropzone from 14.4.1 to 20.1.4 in file-uploader-web and
rich-text-web. Regenerate the isExt patch for the new dist layout
(dist/index.js, dist/index.cjs), since the upstream regex is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gjulivan
gjulivan force-pushed the chore/bump-react-dropzone branch from 3a6ebd1 to 1ac6a13 Compare November 18, 2026 10:30
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

⚠️ Approved with suggestions — low-severity items only, safe to merge


What was reviewed

File Change
packages/pluggableWidgets/file-uploader-web/package.json react-dropzone ^14.2.3 → ^20.1.4
packages/pluggableWidgets/rich-text-web/package.json react-dropzone → ^20.1.4
patches/react-dropzone.patch Re-targeted to dist/index.js, dist/index.cjs and src/utils/index.ts. The stricter isExt regex is unchanged.
packages/pluggableWidgets/*/CHANGELOG.md Entries under [Unreleased] for both widgets

Skipped (out of scope): pnpm-lock.yaml

CI: pending: Run code quality check, Plan E2E matrix, sigridci · unrelated failures: security/snyk (external scanner, "16 tests have failed"; the code and license Snyk checks pass)


Findings

⚠️ Low — Changelog entry describes the library, not behavior

File: packages/pluggableWidgets/file-uploader-web/CHANGELOG.md line 11 (same wording in rich-text-web/CHANGELOG.md)
Problem: "We updated the react-dropzone library to version 20." is an implementation detail. AGENTS.md says changelogs should cover widget behavior only. For File Uploader the update changes nothing a user can see, so the entry says nothing useful. If WC-3675 (the Outlook SecurityError on dropped email attachments) is fixed by this upgrade, say so in a "Fixed" entry, for example "We fixed an issue where dragging an email attachment from classic Outlook into the drop zone failed."
Fix: Remove the library-version line from both changelogs. Keep the Rich Text entry about dropping several images, which does describe a behavior change. Add a user-facing File Uploader entry only if the upgrade fixes WC-3675.


Questions

  • The PR description lists a manual check for WC-3675 (Outlook drag-and-drop). Has it been run, and does this upgrade fix it? That decides whether File Uploader needs a "Fixed" changelog entry.

Positives

  • The PR description goes through each breaking change from v15 to v20 and says how it affects both widgets.
  • The patch was re-targeted to the new dist/ layout, and the PR notes that the patched regex was confirmed in the built bundles.
  • The Rich Text behavior change (the first image is now used when several are dropped) is in the changelog.

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.

2 participants