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

feat: added File Upload Component #512

Merged
merged 10 commits into from
Nov 3, 2024

Conversation

Swappea
Copy link
Contributor

@Swappea Swappea commented Nov 1, 2024

  • Added new file upload components which is accessible in nature.
  • Components are present to show list of uploaded files, show an image preview if needed, show file size, and ability to remove those files.

Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for kobalte ready!

Name Link
🔨 Latest commit cd82657
🔍 Latest deploy log https://app.netlify.com/sites/kobalte/deploys/67266c482dfa3900086f1605
😎 Deploy Preview https://deploy-preview-512--kobalte.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 84 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 82 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Swappea Swappea changed the title Feat new components File Upload Component Nov 1, 2024
@Swappea Swappea changed the title File Upload Component feat: added File Upload Component Nov 1, 2024
@Swappea
Copy link
Contributor Author

Swappea commented Nov 2, 2024

@jer3m01 - I have fixed the formatting issues, could you please approve the workflow so I can check if formatting is as expected?

Also could you please review the PR?

.mdx formatting is very weird in terms of DX.

@jer3m01
Copy link
Member

jer3m01 commented Nov 2, 2024

.mdx formatting is very weird in terms of DX.

Yeah the docs aren't the nicest to write, this is being worked on 👀.

@Swappea
Copy link
Contributor Author

Swappea commented Nov 2, 2024

.mdx formatting is very weird in terms of DX.

Yeah the docs aren't the nicest to write, this is being worked on 👀.

@jer3m01 - any idea on how to fix the formatting issue I am getting? Within VSCode, if I format using prettier I don't see any issues.

Is there any command that I am probably missing?

@jer3m01
Copy link
Member

jer3m01 commented Nov 2, 2024

Is there any command that I am probably missing?

You can run pnpm -w format to run both formatters.

@Swappea
Copy link
Contributor Author

Swappea commented Nov 2, 2024

Is there any command that I am probably missing?

You can run pnpm -w format to run both formatters.

Wow for some reason after running this command, over 500 files were changed as per git but there were no visible changes.
Need to check what happened.

I have pushed the 2 files which were showing issues.

Copy link
Member

@jer3m01 jer3m01 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 interest and the work!

I've noted a few issues but it mostly looks good.

Could another example be added to the docs for HTML form submissions, like there is for TextField but instead maybe only write the submitted file names in the alert().

Thanks again for the PR!

packages/core/src/file-upload/file-upload-dropzone.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-hidden-input.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-hidden-input.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-hidden-input.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-item.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-label.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-root.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-trigger.tsx Outdated Show resolved Hide resolved
packages/core/src/file-upload/file-upload-trigger.tsx Outdated Show resolved Hide resolved
@Swappea
Copy link
Contributor Author

Swappea commented Nov 2, 2024

@jer3m01 - updated please check..
Thank you

@jer3m01
Copy link
Member

jer3m01 commented Nov 2, 2024

Thanks for the changes! A few classes haven't been removed yet, I unresolved the cases.

@Swappea
Copy link
Contributor Author

Swappea commented Nov 2, 2024

Sorry, missed removing those, not sure how. All the classes have now been removed.

Copy link
Member

@jer3m01 jer3m01 left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the PR and changes!

Will merge soon.

@jer3m01 jer3m01 merged commit 9abd5d0 into kobaltedev:main Nov 3, 2024
8 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.

2 participants