Skip to content

feat(file-upload,file-dropzone): rename reject prop and switch max size to bytes #889 - #949

Open
airikej wants to merge 2 commits into
rcfrom
fix/889-fileupload-filedropzone-rename-validateindividually-and-change-maxsize-to-bytes
Open

airikej wants to merge 2 commits into
rcfrom
fix/889-fileupload-filedropzone-rename-validateindividually-and-change-maxsize-to-bytes

Conversation

@airikej

@airikej airikej commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: validateIndividually renamed to keepRejectedFiles; maxSize is now in bytes.

Summary by CodeRabbit

  • Features
    • File upload and dropzone size limits are now specified in bytes.
    • When multiple files are allowed, keepRejectedFiles can retain rejected files in the list with an invalid state. When disabled, only valid files are added.
  • Documentation
    • Updated file upload and dropzone examples to use byte-based size limits and reflect rejected-file handling.

…ze to bytes #889

BREAKING CHANGE: validateIndividually renamed to keepRejectedFiles; maxSize is now in bytes.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: TEDI-Design-System/react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: bd927782-edb6-4377-90af-ddb85b3644db

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TEDI-Design-System/react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 45db38dd-580e-4d0e-a1b3-cd19124fa7fd

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef9535 and c3c77f5.

📒 Files selected for processing (9)
  • component.manifest.json
  • skills/tedi-react/references/forms.md
  • src/tedi/components/form/file-dropzone/file-dropzone.spec.tsx
  • src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx
  • src/tedi/components/form/file-dropzone/file-dropzone.tsx
  • src/tedi/components/form/file-upload/file-upload.spec.tsx
  • src/tedi/components/form/file-upload/file-upload.stories.tsx
  • src/tedi/components/form/file-upload/file-upload.tsx
  • src/tedi/helpers/hooks/use-file-upload.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

File upload size limits now use bytes. The validateIndividually option is replaced by keepRejectedFiles, which controls whether rejected files remain in multiple-file uploads. The TableOfContents manifest status also includes breakpointSupport.

Changes

File upload behavior

Layer / File(s) Summary
Upload options and validation
src/tedi/components/form/file-upload/file-upload.tsx, src/tedi/helpers/hooks/use-file-upload.ts
The upload API and hook use byte-based size limits. The hook uses keepRejectedFiles to control whether invalid files remain in multiple-file uploads.
Upload component integration
src/tedi/components/form/file-upload/file-upload.tsx, src/tedi/components/form/file-dropzone/file-dropzone.tsx
Both components pass keepRejectedFiles to the shared hook. FileDropzone passes maxSize unchanged to useDropzone and suppresses automatic error feedback when multiple files are enabled and rejected files are retained.
Upload examples and validation
src/tedi/components/form/file-upload/file-upload.spec.tsx, src/tedi/components/form/file-upload/file-upload.stories.tsx, src/tedi/components/form/file-dropzone/file-dropzone.spec.tsx, src/tedi/components/form/file-dropzone/file-dropzone.stories.tsx, skills/tedi-react/references/forms.md
Tests, stories, and reference examples use byte-based size limits and the keepRejectedFiles option.

TableOfContents manifest

Layer / File(s) Summary
TableOfContents status metadata
component.manifest.json
The TableOfContents manifest status now includes breakpointSupport.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Suggested reviewers: mart-sessman

Merge Risk: ⚪ Minimal · up to c3c77

The change renames a prop and switches the size unit to bytes, with the tests, stories and docs updated to match. No concrete merge-blocking risk was found. Because this is a breaking public API change, mention it in the release notes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes both primary changes: renaming the rejection-related prop and changing max-size units to bytes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 7…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

♿ Accessibility — ✅ no blocking violations

No accessibility violations in the components changed by this PR.

⚠️ Pre-existing — 2 violations in components not changed here (warn only)

Component Rules Stories
TEDI-Ready/Components/Buttons/ButtonGroup unknown 1
TEDI-Ready/Components/Navigation/Tabs unknown 1
Stories
  • TEDI-Ready/Components/Buttons/ButtonGroup — Stretched
  • TEDI-Ready/Components/Navigation/Tabs — With Sub Tabs

@airikej
airikej requested review from intermetric, ly-tempel-bitweb and mart-sessman and removed request for ly-tempel-bitweb October 1, 2026 05:45
multiple?: boolean;
/**
* If true, each file is validated separately instead of rejecting all at once.
* Only applies when `multiple` is set. When `true`, files that fail validation (wrong type

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.

I think multiple shouldn't be needed to show a failing file under the dropzone?
But let's discuss it today during the meeting.

Image

This branch was successfully deployed

1 active deployment
github-pages — fcff4dad Deployed Oct 2, 2026 by airikej via Deploy #1811
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.

[FileUpload, FileDropzone]: rename validateIndividually and change maxSize to bytes

2 participants