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

Option for queries to pause polling when unfocused #4055

Merged
merged 11 commits into from
Jan 24, 2024

Commits on Jan 24, 2024

  1. Updated middleware to handle poll skipping

    Changes made to the polling middleware to handle the situation when the page is out of focus. The code now includes a check to see whether to skip polling if the page is out of focus. Restructured the return from 'findLowestPollingInterval' function to include 'skipPollOnFocusLost' flag.
    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    2fe5915 View commit details
    Browse the repository at this point in the history
  2. Add 'skipPollOnFocusLost' flag to query hooks

    The query hooks in 'buildHooks.ts' and 'apiState.ts' files now include the 'skipPollOnFocusLost' flag.
    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    bbb89b6 View commit details
    Browse the repository at this point in the history
  3. yarn format changes

    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    d1b9971 View commit details
    Browse the repository at this point in the history
  4. Add tests for 'skipPollOnFocusLost' option

    New test cases have been added for the 'skipPollOnFocusLost' option in query polling. Specifically, these tests verify the correct behaviour when this option is toggled, when it's reset on mount, and when it's changed via subscription options update.
    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    e7fce61 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    65a6ae3 View commit details
    Browse the repository at this point in the history
  6. Format skipPollOnFocusLost test

    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    823c3b7 View commit details
    Browse the repository at this point in the history
  7. Update skipPollOnFocusLost to use listenerMiddleware

    Added documentation to apiState, tests to support listenerMiddleware usage and polling.ts updated to match
    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    65b448f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b9d37c3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e676ee8 View commit details
    Browse the repository at this point in the history
  10. Polling skipPollOnFocusLost behavior changed to skip if any subscript…

    …ion has the setting and tests changed to better reflect this behavior and intent
    riqts committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    4ae5a9b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8cbf2a1 View commit details
    Browse the repository at this point in the history