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

Unified Toasting Error / Notification scheme across gateway and guardian #496

Open
Kodylow opened this issue Aug 16, 2024 · 7 comments
Open

Comments

@Kodylow
Copy link
Member

Kodylow commented Aug 16, 2024

Currently we don't give errors or notifications in a unified way, we should use chakra's toasting system for it. I want the toasts to come up in the top right and we should do that for everything where there's an error at first but then eventually with transaction monitoring and such add those incoming and outgoing updates to it https://v2.chakra-ui.com/docs/components/toast

@Kodylow
Copy link
Member Author

Kodylow commented Aug 16, 2024

@kleyberthsantos

@kleyberthsantos
Copy link

Hi @Kodylow, I may have encountered a little bug when using SharedChakraProvider.
I noticed that the Toast component does not display correctly when using SharedChakraProvider, but when switched to ChakraProvide, the Toast works as expected and display correctly.

To replicate this:

  1. I added a button on a component that, when pressed, attempts to display a Toast using useToast.
  2. I noticed that the toast does not appear when the button is clicked with SharedChakraProvider.
  3. I switched to ChakraProvider and repeated the test.
  4. After this change, the Toast is displayed correctly.

I hope this information is useful, also if there are any suggestions I will be grateful.

@Kodylow
Copy link
Member Author

Kodylow commented Sep 6, 2024

Can you post code for where that's happening? not sure what you mean here

@kleyberthsantos
Copy link

kleyberthsantos commented Oct 28, 2024

Can you post code for where that's happening? not sure what you mean here

Hi @Kodylow,

After some testing, I found that SharedChakraProvider wasn’t configuring ToastProvider, which is essential for toasts. I resolved this by wrapping SharedChakraProvider inside ChakraProvider in the main structure, ensuring ToastProvider is accessible across components using useToast.

If needed, I could add ToastProvider directly within SharedChakraProvider for a more modular setup.

I've attached a quick video showing the toasts in action, and you can check the latest commit branch "notification-toast" for details.

Thanks in advance for any feedback!

@kleyberthsantos
Copy link

ChakraProvide.mp4

@Kodylow
Copy link
Member Author

Kodylow commented Oct 30, 2024

oh awesome! yeah if you could stick it in the shared one or refactor it to just have it be a clean add then that'll be great, would love to get this landed so we can redo a bunch of these errors to make them nicer

@kleyberthsantos
Copy link

kleyberthsantos commented Nov 5, 2024

Great. WIP👌

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

No branches or pull requests

2 participants