Folo icon indicating copy to clipboard operation
Folo copied to clipboard

refactor: optimize ui of error toast

Open xc2 opened this issue 1 year ago • 1 comments

Description

This PR introduces:

  1. Move all use of toast.error on react-query's onError to use toastFetchError
  2. UI optimization for error toast
Before After
1 Screenshot 2024-10-05 at 20 57 33 Screenshot 2024-10-05 at 20 57 25
2 Screenshot 2024-10-05 at 20 48 30 Screenshot 2024-10-05 at 20 54 57

Linked Issues

Additional context

xc2 avatar Oct 05 '24 12:10 xc2

@xc2 is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 05 '24 12:10 vercel[bot]

@Innei here're icon only and outline design

I prefer the icon only button.

light icon Screenshot 2024-10-05 at 23 01 01
light icon hover Screenshot 2024-10-05 at 23 01 05
light outline Screenshot 2024-10-05 at 22 50 08
light outline hover Screenshot 2024-10-05 at 22 50 02
dark icon Screenshot 2024-10-05 at 23 01 22
dark icon hover Screenshot 2024-10-05 at 23 01 26
dark outline Screenshot 2024-10-05 at 22 50 27
dark outline hover Screenshot 2024-10-05 at 22 50 36

btw an accent button here is fine imo as accent buttons are everywhere in the Follow app

xc2 avatar Oct 05 '24 15:10 xc2

Prefer the icon-only button too. But with some background color at hover time? It should be the ghost specification of the button.

Innei avatar Oct 05 '24 15:10 Innei

Linting and formatting issues were automatically fixed. Please review the changes.

github-actions[bot] avatar Oct 05 '24 15:10 github-actions[bot]

@Innei Two changes are just applied:

  1. Applied the icon only ghost variant like button
  2. Move the position of <Toaster /> to ensure the theme of sonner will change immediately after app theme change

https://github.com/user-attachments/assets/bf62bdbd-4237-44d4-89d0-78ea5a0e7293

xc2 avatar Oct 05 '24 15:10 xc2

Awesome!

Innei avatar Oct 05 '24 16:10 Innei