Skip to content

Conversation

@peter-gy
Copy link
Contributor

📝 Summary

These changes ensure that FileUploadPlugin displays singularized label when uploading multiple files is disallowed.

That is: mo.ui.file(kind="area", multiple=False) will render with label "Drag and drop a file here, or click to open file browser" instead of "Drag and drop files here, or click to open file browser".

🔍 Description of Changes

  • Extended default label construction logic in frontend/src/plugins/impl/FileUploadPlugin.tsx
  • Added dedicated stories for single file inputs via area and button variants
  • Added E2E test case

📋 Checklist

  • I have read the contributor guidelines.
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

Adds stories showcasing the file upload component when configured to accept only a single file, in both area and button modes.
@vercel
Copy link

vercel bot commented Apr 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 1:17pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 1:17pm

@peter-gy peter-gy changed the title feat: use singular wording when not multi fileupload feat: display singular label in FileUploadPlugin for single files Apr 17, 2025
Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the improvement!

@akshayka akshayka merged commit bbbaf49 into marimo-team:main Apr 17, 2025
34 checks passed
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.

3 participants