Skip to content
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

File select #37

Merged
merged 7 commits into from
Jan 31, 2025
Merged

File select #37

merged 7 commits into from
Jan 31, 2025

Conversation

bakerac4
Copy link
Member

@bakerac4 bakerac4 commented Jan 28, 2025

This PR adds the ability to select files and defaults the functionality across our apps.

@bakerac4 bakerac4 self-assigned this Jan 28, 2025

const FileListImage = styled.img`
width: 40px;
height: 40px;
Copy link
Member

Choose a reason for hiding this comment

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

nit: ideally we'd use theme sizing values for stuff like this, for easier customization across projects, but if we cant, imo arbitrary exact values should use rem units except for precision pixel placements, so we get screen zooming/scaling support for free.


interface FileListProps {
files: FileWithProgress[];
onRemove: (file: File) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Some nit items,

I'd think we'd want an onComplete callback, or something to talk back to a given parent. Some sort of established outward communication. Also perhaps a file count or something? Perhaps some kind a pub/sub progress even...though that seems a bit too specifi as that only makes a ton of sense for something of any meaningful size.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking about some kind of flow where something happens on upload, or something happens after someone uploads a set of files (like...I dunno. "Please upload your license front and back" and then we'd know if 2 images were uploaded)

Copy link
Member Author

Choose a reason for hiding this comment

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

FileList is just a list and doesn't have any completion. I was specific about trying to not include any actual file upload stuff in this one, as its just for selecting files. Providing the progress is a way to just update the progress indicator for the specific file and whatever is passing it in will know when its complete or not

@bakerac4 bakerac4 requested a review from billdami January 30, 2025 18:22
// (height: SizingArgument): string;
// (width: SizingArgument, height: SizingArgument): string;
// }
// export type SizingArgument = number | string;
Copy link
Member

Choose a reason for hiding this comment

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

do you want this commented out code left in?

@bakerac4 bakerac4 merged commit 9b71e9d into main Jan 31, 2025
1 check passed
@bakerac4 bakerac4 deleted the file-select branch January 31, 2025 12:45
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