Skip to content

Conversation

@juliusmarminge
Copy link
Member

@juliusmarminge juliusmarminge commented May 12, 2024

More changes brought over from #746 but in a non-breaking, less chaotic manner.

Goal to make #802 easier

@vercel
Copy link

vercel bot commented May 12, 2024

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 May 12, 2024 8:40pm

@changeset-bot
Copy link

changeset-bot bot commented May 12, 2024

⚠️ No Changeset found

Latest commit: 4e30034

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Member Author

juliusmarminge commented May 12, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @juliusmarminge and the rest of your teammates on Graphite Graphite

@juliusmarminge juliusmarminge marked this pull request as ready for review May 12, 2024 20:13
@juliusmarminge juliusmarminge changed the title refactor UploadButton refactor: UploadButton May 12, 2024
```

<UploadButton
endpoint="mockRoute"
Copy link
Member Author

Choose a reason for hiding this comment

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

having these actually load instead of fetch failing helped reduce some impossible states we had weird paths for just to display in here


return "uploading";
})();
if (state === "readying") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: inline return

return `Choose File${inputProps.multiple ? `(s)` : ``}`;
}

if (uploadProgress === 100) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: inline return

>
{contentFieldToContent($props.content?.allowedContent, styleFieldArg) ??
allowedContentTextLabelGenerator(permittedFileInfo?.config)}
allowedContentTextLabelGenerator(routeConfig)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is so much cleaner than permittedFileInfo 😅

Copy link
Member Author

juliusmarminge commented May 16, 2024

Merge activity

@juliusmarminge juliusmarminge changed the base branch from with-novel to main May 16, 2024 20:10
@juliusmarminge juliusmarminge merged commit 8887bdc into main May 16, 2024
juliusmarminge added a commit that referenced this pull request May 16, 2024
More changes brought over from #746 but in a non-breaking, less chaotic manner.

Goal to make #802 easier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants