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

refactor: simplify the image uploader #1561

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

dominik-stumpf
Copy link
Contributor

Replaced form error message on image uploader with toast as it's also a request like form submit. We could also remove the FormErrorMessage and use the toast inside the ControlledImageUploader. Let me know your thoughts on this one.

  • fix: address typo in request pathname
  • feat: add option for toast instead of form message

Copy link

vercel bot commented Nov 25, 2024

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

Name Status Preview Comments Updated (UTC)
guild-xyz ❌ Failed (Inspect) Nov 25, 2024 5:07pm

@BrickheadJohnny BrickheadJohnny changed the title create guild page adjustments refactor: simplify the image uploader Nov 25, 2024
Copy link
Collaborator

@BrickheadJohnny BrickheadJohnny 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 PR, I liked the toast so much that I actually just completely removed the controlled image uploader and added the toast inside the simple uploader's error handler - let's just use this one until we don't need a more complex solution!

@BrickheadJohnny BrickheadJohnny merged commit 1a28933 into create-guild-page Nov 25, 2024
3 of 4 checks passed
@BrickheadJohnny BrickheadJohnny deleted the create-guild-page-adjustments branch November 25, 2024 17:06
BrickheadJohnny added a commit that referenced this pull request Nov 25, 2024
* feat: simple guild page

* feat: simple create guild page

* fix: better schema names

* fix(CreateGuildButton): stringify body only once

* fix: use `onTouched` form mode

* feat: implement image uploader, improve fetcher and error messages

* feat: add background image

* feat: add success and error toasts

* feat(ImageUploader): `onFileInputChange` prop

* fix: add `aria-required` attributes

* refactor: simplify the image uploader (#1561)

* fix: address typo in request pathname

* feat: add option for toast instead of form message

* refactor: simplify the image uploader

---------

Co-authored-by: BrickheadJohnny <[email protected]>

---------

Co-authored-by: Dominik Stumpf <[email protected]>
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