Skip to content

devex: Create and document file selection components #2654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 23, 2025

Conversation

SuaYoo
Copy link
Member

@SuaYoo SuaYoo commented Jun 10, 2025

In preparation for #2646

Changes

  • Adds new <btrix-file-input> component
  • Refactors file upload to use btrix-file-input

Manual testing

  1. Log in as crawler
  2. Go to "Archived Items"
  3. Click "Upload WACZ"
  4. Drag non-WACZ file into upload area. Verify file is not displayed
  5. Drag WACZ file into upload area. Verify file displays as expected
  6. Remove file
  7. Click "Browse Files"
  8. Choose WACZ file. Verify file displays as expected
  9. Continue to upload file. Verify file uploads as expected

Screenshots

Page Image/video
Archived Items Screenshot 2025-06-11 at 1 37 22 PM
Storybook / File Input Screenshot 2025-06-10 at 7 48 55 PM

@SuaYoo SuaYoo force-pushed the frontend-file-input-component branch 2 times, most recently from f7a6777 to 53cf327 Compare June 11, 2025 01:46
@SuaYoo SuaYoo requested a review from emma-sg June 11, 2025 02:51
@SuaYoo

This comment was marked as resolved.

@SuaYoo SuaYoo marked this pull request as ready for review June 11, 2025 20:36
Copy link
Member

@emma-sg emma-sg left a comment

Choose a reason for hiding this comment

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

Looks mostly good, but seeing a bug with file selection in Storybook — looking into it currently.

Oh, and a thought about FileListItem.file — should it maybe accept Pick<File, "name" | "size"> instead of just File?

@SuaYoo SuaYoo requested a review from emma-sg June 12, 2025 17:46
@SuaYoo SuaYoo force-pushed the frontend-file-input-component branch from 8e08223 to 7f73cb7 Compare June 23, 2025 18:08
@SuaYoo SuaYoo requested review from tw4l and ikreymer June 23, 2025 18:09
@SuaYoo SuaYoo requested a review from emma-sg June 23, 2025 18:54
Copy link
Member

@emma-sg emma-sg left a comment

Choose a reason for hiding this comment

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

Nice, looks good!

@SuaYoo SuaYoo merged commit f9aa5a8 into main Jun 23, 2025
27 checks passed
@SuaYoo SuaYoo deleted the frontend-file-input-component branch June 23, 2025 22:38
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.

2 participants