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

Discussion: reconsider from where we dispatch toast events #663

Closed
florian-sanders-cc opened this issue Dec 6, 2022 · 0 comments · Fixed by #668 or #666
Closed

Discussion: reconsider from where we dispatch toast events #663

florian-sanders-cc opened this issue Dec 6, 2022 · 0 comments · Fixed by #668 or #666
Assignees
Labels
RFC Request for comments, discussion about some parts of the project...

Comments

@florian-sanders-cc
Copy link
Contributor

florian-sanders-cc commented Dec 6, 2022

Context

Currently, we dispatch events from our components to generate new toasts.
We do it using helpers and it looks like this:

  notifyError(component, i18n('...'));

When testing cc-orga-member, we realised that people leaving their org wouldn't get the success notification because they are redirected to another page upon leaving: the component from which the toast event is supposed to be dispatched is removed.

This led us to think that any user switching page while an API call is pending (slow network conditions mostly) may not get error / success notifications.
Screencast from 2022-12-06 12-03-33.webm

To be discussed

Should we dispatch these events from window instead ?

@florian-sanders-cc florian-sanders-cc added the RFC Request for comments, discussion about some parts of the project... label Dec 6, 2022
@florian-sanders-cc florian-sanders-cc added this to Discuss in Project board - Clever Components via automation Dec 6, 2022
@florian-sanders-cc florian-sanders-cc self-assigned this Dec 13, 2022
Project board - Clever Components automation moved this from Review to Unreleased Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments, discussion about some parts of the project...
Projects
No open projects
1 participant