OED icon indicating copy to clipboard operation
OED copied to clipboard

Alerts need to be switched

Open sparakala21 opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Currently, our application relies on generic alerts for error and success notifications. While these have served their purpose, it's become evident that we need a more robust and consistent solution, especially when dealing with React components. The current approach lacks the flexibility and reliability required for a modern React application.

Describe the solution you'd like

Introducing showErrorNotification and showSuccessNotification functions which will enhance the user experience and provide better control over the presentation of notifications.

Additional context

check out PR #1065 for some ideas

sparakala21 avatar Nov 29 '23 19:11 sparakala21

Let me clarify that in some places we do Window.alert() that is not React friendly. These should be switched to the new methods in src/client/app/utils/notifications.ts that use a React way. Care should be taken to set the time (autoDismiss) if the desire is that the notice stay up for a very long time (or indefinitely in some cases). It is also important to choose the right one (success or failure). Anyone doing this that has questions is welcome to reach out to me.

huss avatar Nov 30 '23 15:11 huss

After PR #1113, the only ones left are Window.confirm. It would be good to find a confirmation dialog that is compatible with the toast notifications that are used.

huss avatar Feb 17 '24 14:02 huss