-
Notifications
You must be signed in to change notification settings - Fork 36
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
Adjust notification timing for development mode #5090
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.
This looks good, but if you are interested in an even better solution, there are some more sophisticated web APIs we can use to make notifications fetching more efficient and to reduce the noise in the network panel. See:
#2606
(that issue is marked as fixed because a basic improvement was done, but more improvements are still possible)
specifyweb/frontend/js_src/lib/components/Notifications/hooks.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Max Patiiuk <[email protected]>
@maxpatiiuk that sounds like it would be good to implement but for now putting this in as-is to make things a bit nicer will be alright. I'll look into it though! |
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.
Testing instructions
- Check that production mode still has requests about every 5 seconds.
- Check that development mode has requests about every minute.
Looks good! 👍👍 The network logs definitely slow down in dev mode.
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.
Testing instructions
- Check that production mode still has requests about every 5 seconds.
- Check that development mode has requests about every minute.
Everything looks good, awesome job Anya! 👏
🎉 😄 |
This PR adjusts the interval for when notifications are fetched in development mode, to make it easier to filter through requests in the debug console while testing/debugging/etc.
I set the development time interval to 1 minute, but that can be adjusted easily if needed.
Checklist
and self-explanatory (or properly documented)
Testing instructions