-
Notifications
You must be signed in to change notification settings - Fork 963
Manage HTTP connections based on tab visibility #9202
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
Conversation
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
Do we plan to add tests for this change? |
Yes we will be adding the unit test cases for everything in the upcoming PR. |
* added the api-definition, interfaces, realtime connection and backoffLogic * Added TODO and comments * resolved the comment about the spacing problem * Fix check failures * Fix yarn failures * Convert backoff time from seconds to minutes * Manage HTTP connections based on tab visibility (#9202) * Added the visibilityMonitor * minor changes * resolving the spacing problem
This PR is a follow-up to #9199.
It introduces the logic for managing connections based on tab visibility. Specifically, it opens or closes a connection when a tab moves to the foreground or background. To achieve this, the existing VisibilityMonitor from the packages/database is being consolidated into a shared utility function in firebase/util. This change allows both the database and remote-config packages to use the same visibility monitoring API.
Future PRs will include the implementation of the AutoFetch logic and corresponding unit tests.