Skip to content

refactor: 💡 reconcile file and multiple file upload#804

Open
punkbit wants to merge 8 commits intomainfrom
refactor/file-multiple-upload-use-file-upload
Open

refactor: 💡 reconcile file and multiple file upload#804
punkbit wants to merge 8 commits intomainfrom
refactor/file-multiple-upload-use-file-upload

Conversation

@punkbit
Copy link
Collaborator

@punkbit punkbit commented Feb 3, 2026

Why?

Reconcile FileUpload and FileMultiUpload to prevent and reduce concurrent implementations, e.g. behaviour, features, styles, etc.

In the previous version, the multiple-file-upload component recreated the file upload in its file context, which was prone to errors.

How?

  • Split shared features to separate files, e.g. file upload area, drag and drop hook
  • Create reusable types

Preview?

demo-shared-file-upload-multi-upload.mov

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
click-ui Ready Ready Preview, Comment Feb 3, 2026 5:29pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 9a79822

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@punkbit punkbit marked this pull request as ready for review February 3, 2026 17:29
@@ -0,0 +1,5 @@
---
'@clickhouse/click-ui': minor
Copy link
Collaborator

Choose a reason for hiding this comment

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

can all the existing components still be used the same way? Or is this a breaking change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gjones gjones requested a review from vineethasok February 3, 2026 20:02

const ProgressBarWrapper = styled.div`
margin-top: ${({ theme }) => theme.click.fileUpload.md.space.gap};
margin-bottom: 9px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a lot of custom sizing in here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gjones that's the original author's source code, see latest/main (at time of writing), e.g. here

const FileContentContainer = styled.div<{ $size: 'sm' | 'md' }>`

The task here is just the reconciliation; it's not attempting to change any styles unless moved or necessary tweaks are made to migrate to shared parts.

That can be modified, but that's separate from the goal in this PR.

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