Skip to content

fix(upload): improve empty defaults and add customizable labels - #155

Merged
ladparth merged 4 commits into
mainfrom
fix/upload-field-improvements
Jun 3, 2026
Merged

fix(upload): improve empty defaults and add customizable labels#155
ladparth merged 4 commits into
mainfrom
fix/upload-field-improvements

Conversation

@ladparth

@ladparth ladparth commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

This PR improves the upload field by fixing default values for empty uploads (returning null for single files and [] for multiple files) and introducing customizable UI labels for translation and localization.

Key Changes

Core (form-core)

  • Updated extractDefaults to handle upload fields, mapping hasMany: true to [] and single file uploads to null instead of an empty string "".
  • Added unit tests in defaults.test.ts to verify correct default values.

Docs / Web (apps/web)

  • Defined the labels option on the UploadUi configuration interface in the upload registry component.
  • Integrated labels with all UI variants (avatar, dropzone, inline, gallery) in upload.tsx with English fallbacks.
  • Documented labels configuration in upload.mdx.
  • Regenerated the shadcn registry component JSON file upload.json.

Type of change

  • feat (New feature)
  • fix (Bug fix)
  • docs (Documentation changes)

Related Issues

@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
buzzform Ready Ready Preview, Comment Jun 3, 2026 12:53pm

@ladparth
ladparth merged commit bfe3121 into main Jun 3, 2026
3 checks passed
@ladparth
ladparth deleted the fix/upload-field-improvements branch June 3, 2026 12:55
@github-actions github-actions Bot mentioned this pull request Jun 3, 2026
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.

[FEAT] File / media upload field

1 participant