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: radix image upload #468

Open
wants to merge 12 commits into
base: feature/a11ymap
Choose a base branch
from
Open

Conversation

kriskbx
Copy link
Member

@kriskbx kriskbx commented Dec 18, 2024

This PR is a rewrite of the image upload UI using the radix-ui library.

before testing

Make sure to run npm install and install newly added dependencies.

known issues

There's a bug that causes some flickering when opening the actual dialog. I still suspect that something higher up in the component tree gets rerendered and causes this. In this particular case, this behaviour is even more frustrating as the entire state of the upload dialog gets reset when this happens, effectively removing the selecting image and jumping back to step one. It seems to be related to clicking/interacting with the Browser. Sometimes it also just works... 😄 Keep this in mind, when testing the PR. I will hunt down the rerender bug next and create a separate PR for this.

@kriskbx kriskbx requested review from opyh and Mayaryin December 18, 2024 16:09
@kriskbx kriskbx force-pushed the feat/radix-image-upload branch from 81abedc to 1ea36c8 Compare January 2, 2025 16:21
Copy link
Member

@opyh opyh left a comment

Choose a reason for hiding this comment

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

Very straightforward and approachable code! ✨

The only issue I found is that the "Review" step shows a cropped version of my uploaded test image:

image

I expected the complete image to be shown here.

If you agree, feel free to implement the other style-related suggestions – they're not blocking though IMO.

And btw: The new UI looks fabulous!

@kriskbx kriskbx force-pushed the feat/radix-image-upload branch from f29ee7d to d5f514c Compare January 6, 2025 14:32
@opyh
Copy link
Member

opyh commented Jan 6, 2025

Thanks for the refactoring effort!

I've tested uploading photos on its branch deployment.

  • Seems our branch deployment Ingresses are not configured for allowing big JPG uploads yet
  • the image server isn't correctly wired yet

Both looks like a todo for me or both of us together (tomorrow?) :)

Good news: There IS error handling, and it handles errors correctly! 👌😊

Almost good news: When uploading a too-big image, the error message could be more readable:
Unreadable upload error message

  • errors are readable in dark/bright mode

@kriskbx
Copy link
Member Author

kriskbx commented Jan 6, 2025

Thanks for the refactoring effort!

I've tested uploading photos on its branch deployment.

* [ ]  Seems our branch deployment Ingresses are not configured for allowing big JPG uploads yet

* [ ]  the image server isn't correctly wired yet

Both looks like a todo for me or both of us together (tomorrow?) :)

Good news: There IS error handling, and it handles errors correctly! 👌😊

Almost good news: When uploading a too-big image, the error message could be more readable:

* [ ]  errors are readable in dark/bright mode

Good catch. I fixed the error message in light mode. I would love to work on the rest together, but maybe on Wednesday? 🙂

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