-
Notifications
You must be signed in to change notification settings - Fork 75
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
[DRAFT] Refactor NotificationsPage and NotificationSection #6815
base: master
Are you sure you want to change the base?
Conversation
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.
The React
global was removed from React in 16.14. Importing it won't break anything but won't do anything either.
https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
The updated page is very slow for me (I have a lot of notifications.) Maybe update state incrementally as each request resolves? |
This is a great suggestion, thanks! I will attempt to refactor accordingly. I also want to try a more substantive UX change where there's an unread (any/all projects/zooniverse) section and a contextual section (i.e. within project, then that all of project's notifications paginated, within zoonvierse, then zooniverse section of all zooniverse notifications paginated). I'm going to change this to draft for now, refactor, and eventually open the other UX option as well, to compare. |
Staging branch URL: https://pr-6815.pfe-preview.zooniverse.org
Closes #6793 . Issue summary - the NotificationsPage is requesting 50 notifications then grouping into project/Zooniverse sections. If a user has a notification from a project not included in the 50 notification response, then that project and related notification(s) will not show.
Describe your changes.
DMed user that noted issue in Talk, confirmed with staged branch that issue is resolved.
Let me know if you'd like me to mention your username in Talk somewhere or comment on a Discussion your subscribed to, so you have unread (
delivered: false
) notifications.Note: initially refactored as functional component, but had issues with tests, ended up keeping as class component to maintain (ended up increasing) test coverage. Not ideal and open to suggestion, but I think ok based on limited time to refactor PFE.
Based on my notifications (127 Zooniverse, 1 NfN Big Bee Bonanza, 1 test project)
Comparison of
https://talk.zooniverse.org/notifications?
requests from NotificationsPage and NotificationSection:CURRENT:
PR/CHANGES
Required Manual Testing
Review Checklist
npm ci
and app works as expected?Optional
ChangeListener
orPromiseRenderer
components with code that updates component state?