Open SporyTike opened 1 year ago
As far as I could notice and if I am not mistaken, any Popup message like this follow these 2 criteria:
Since "429 Too Many Requests" is a server error message, then, it fits on first case being a permanent one being stuck on top. Then, any other flash message that comes will keep the color regardless of the success of the operation.
On my case, this happened when I 5-starred a set after getting another server error or another exception message like "Invalid image size" and so. The "OK" message was shown in red instead of green color. I forgot to take a screenshot of it, but the behavior was exactly that one pointed by @SporyTike above.
If you reload the page, that exception message will be gone. So, the success message will appear normally.
Not sure if this can help, but worths to report.
I wish we had a way of building these client-side toast notifications that was not coupled in any way to the page layout. Something like https://react-hot-toast.com/.
https://github.com/RetroAchievements/RAWeb/pull/2624 adds Sonner to the project, which will ultimately resolve this issue.
Describe the bug It seems like that under certain criterias the command popup that informs the user that some action was done or not able to be done uses the wrong color. I noticed the error related to the "429 Too Many Requests" warning, I can't say for sure if others cause the same issue since I don't know how to create those.![image](https://github.com/RetroAchievements/RAWeb/assets/45672834/140d7702-2176-4101-b7c3-58e4f0848e57)
Wrong color when clicking the "Want to Play" button after getting error 429 popup:![image](https://github.com/RetroAchievements/RAWeb/assets/45672834/d702dd42-c4c5-4d79-9a75-2a4084fdcf9c)
Correct color when clicking the "Want to Play" button without getting error 429 popup:![image](https://github.com/RetroAchievements/RAWeb/assets/45672834/da0bd67b-d714-4a14-83d0-5be502fb7cb1)
To Reproduce Steps to reproduce the behavior:
Expected behavior Since the action was successfully completed, the popup should be green.