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

Add a useReload hook to make the Reload component obsolete #4063

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

bjoernricks
Copy link
Contributor

What

Add a useReload hook to make the Reload component obsolete

Why

The new useReload hook is based in useTiming. It calls a timing function before every reload to calculate the timeout before the reload. This timing function gets a isVisible argument passed. Using the argument the timing function can decide to extend the timeout when the current browser window is not visible.

References

Part of creating HOCless list page implementations

Checklist

  • Tests

The new useReload hook is based in useTiming. It calls a timing
function before every reload to calculate the timeout before the reload.
This timing function gets a isVisible argument passed. Using the
argument the timing function can decide to extend the timeout when the
current browser window is not visible.
@bjoernricks bjoernricks requested a review from a team as a code owner June 13, 2024 08:36
@bjoernricks bjoernricks enabled auto-merge (rebase) June 13, 2024 08:36
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 904f92d.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link

Conventional Commits Report

Type Number
Added 1

🚀 Conventional commits found.

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 80.85106% with 9 lines in your changes missing coverage. Please review.

Project coverage is 72.62%. Comparing base (4ef0714) to head (904f92d).

Files Patch % Lines
src/web/hooks/useReload.js 80.85% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4063   +/-   ##
=======================================
  Coverage   72.62%   72.62%           
=======================================
  Files        1059     1060    +1     
  Lines      120762   120809   +47     
  Branches     5974     5979    +5     
=======================================
+ Hits        87699    87740   +41     
- Misses      33034    33040    +6     
  Partials       29       29           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bjoernricks bjoernricks merged commit 2bf49dc into main Jun 13, 2024
13 checks passed
@bjoernricks bjoernricks deleted the use-reload branch June 13, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants