-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add notifications; render as pop-ups ("toasts") #226
Merged
skydread1
merged 15 commits into
skydread1:master
from
flybot-nam-nguyenhoai:207-ui-notifications
Jul 31, 2023
Merged
Add notifications; render as pop-ups ("toasts") #226
skydread1
merged 15 commits into
skydread1:master
from
flybot-nam-nguyenhoai:207-ui-notifications
Jul 31, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces a new field, `:app/notification`, for generic notifications that can be rendered in different ways, e.g., as pop-ups or console print output. Notifications are now sent for HTTP failures and validation errors.
This commit attaches a UUID to each app notification, so that subscriptions to `:app/notification` can process successive identical notifications (e.g., repeated HTTP failures) correctly.
skydread1
requested changes
Jul 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
We need to add a cljs test for the notification.
This commit makes the React components for pop-up notifications common across all pages, similar to the header and footer components.
Tests have been added for generic notifications (i.e., notifications that are in plain Clojure map form and stored in |
skydread1
approved these changes
Jul 31, 2023
skydread1
requested changes
Jul 31, 2023
skydread1
approved these changes
Jul 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #207
This pull request introduces pop-up ("toast") notifications and implements them for website errors (validation and HTTP).
Add generic notifications (as simple data maps).
These notify users when their actions succeed or fail, and can be delivered in different ways (e.g., as pop-ups or printed to console output).
Notify when encountering errors.
Only validation errors and HTTP failures are notified to users.
Render notifications as pop-up banners ("toasts").
Suggestions for future development
Notify on successful actions.
Make notification content user friendly.
For example, error notifications in this PR contain plain Clojure maps of error details—they should instead contain helpful messages in natural language.