pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
3.97k stars 290 forks source link

fix: dropzone form submit #734

Closed juliusmarminge closed 5 months ago

juliusmarminge commented 5 months ago

Closes #730

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: e1e86b1aaf03e2f683d6307acc33cbcce2067b37

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

This PR includes changesets to release 2 packages | Name | Type | | ------------------ | ----- | | @uploadthing/react | Patch | | @uploadthing/solid | Patch |

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

vercel[bot] commented 5 months ago

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

Name Status Preview Comments Updated (UTC)
docs-uploadthing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 5:22pm
juliusmarminge commented 5 months ago

The same time as this, can you make sure the <label />s are using the correct htmlFor values? I think I remember seeing that they were invalid

Do we even need htmlFor when the <input/> tag is a child of the <label/>?

markflorkowski commented 5 months ago

Do we even need htmlFor when the tag is a child of the

Technically, no, it is following guidelines to not use the htmlFor as long as the first element within the label is the input being labelled. I prefer to always use it though, since it doesn't hurt, and wont be forgotten if we were to refactor the component.

That said, it definitely should not be incorrect (pointing to an id that does not exist) as it currently is: image

juliusmarminge commented 5 months ago

I prefer to always use it though, since it doesn't hurt, and wont be forgotten if we were to refactor the component.

Just that it can conflict with a different id the user has set in their form.

Could use useId maybe? Only available in React though. I think leaving it out is fine?

markflorkowski commented 5 months ago

Could use useId maybe? Only available in React though. I think leaving it out is fine?

Fair enough, just make sure to remove existing references 👍