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

Use ToastifyJs to replace alerts #496

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Use ToastifyJs to replace alerts #496

merged 4 commits into from
Nov 6, 2024

Conversation

timobraz
Copy link
Contributor

Description

All alerts are replaced with a toast popup in bottom left with the signature peterportal color.

Screenshots

image

Steps to verify/test this change:

  • Verify changes work as expected on staging instance

Final Checks:

  • Verify successful deployment

(optional)

  • Write tests
  • Write documentation

Issues

Closes #

@timobraz timobraz temporarily deployed to staging-496 October 30, 2024 19:28 — with GitHub Actions Inactive
@timobraz timobraz temporarily deployed to staging-496 October 30, 2024 19:30 — with GitHub Actions Inactive
Copy link
Member

@js0mmer js0mmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the name of the hook function/calls to be consistent? For a hook, useToastify would be a preferred name over toaster.

Also, I think having the error toasts in red would be better, blue for only the info toasts. The hook could take an argument where we specify the type of toast as 'info' or 'error' and the color is adjusted accordingly. Thoughts @Awesome-E?

@timobraz
Copy link
Contributor Author

I did that originally and the linter complains because it's used in cotext files.

@timobraz
Copy link
Contributor Author

I think I'll instead just move it out of the hooks folder and into lib.

@js0mmer
Copy link
Member

js0mmer commented Nov 2, 2024

I think I'll instead just move it out of the hooks folder and into lib.

Ok, that sounds fine. I guess it's not really a hook? You can move it out and just call it toaster.

@Awesome-E
Copy link
Member

Also, I think having the error toasts in red would be better, blue for only the info toasts. The hook could take an argument where we specify the type of toast as 'info' or 'error' and the color is adjusted accordingly. Thoughts @Awesome-E?

I think that makes sense yeah.

I guess it's not really a hook?

Yeah it should be treated more like a helper function, not really a hook

@js0mmer js0mmer linked an issue Nov 4, 2024 that may be closed by this pull request
@timobraz timobraz temporarily deployed to staging-496 November 6, 2024 20:29 — with GitHub Actions Inactive
@timobraz timobraz requested a review from js0mmer November 6, 2024 20:32
@js0mmer js0mmer merged commit 0724e64 into master Nov 6, 2024
2 checks passed
@js0mmer js0mmer deleted the tim/toastify-alerts branch November 6, 2024 20:43
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

Successfully merging this pull request may close these issues.

Use toasts instead of alerts for most messages
3 participants