Skip to content

chore: Include viewport visibility in performance marks #3412

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

connorlanigan
Copy link
Member

Description

This PR updates our performance marks to include information about whether the component is inside the viewport or not.

Related links, issue #, if available: n/a

How has this been tested?

Tested manually in the dev pages, added unit tests.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@connorlanigan connorlanigan requested a review from a team as a code owner April 9, 2025 12:02
@connorlanigan connorlanigan requested review from dpitcock and removed request for a team April 9, 2025 12:02
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 69.69697% with 10 lines in your changes missing coverage. Please review.

Project coverage is 96.47%. Comparing base (8fe8792) to head (f4e2c2b).

Files with missing lines Patch % Lines
src/internal/hooks/use-performance-marks/index.ts 11.11% 8 Missing ⚠️
...rnal/hooks/use-performance-marks/is-in-viewport.ts 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3412      +/-   ##
==========================================
- Coverage   96.50%   96.47%   -0.03%     
==========================================
  Files         804      805       +1     
  Lines       23006    23035      +29     
  Branches     7543     7966     +423     
==========================================
+ Hits        22201    22224      +23     
+ Misses        798      757      -41     
- Partials        7       54      +47     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@dpitcock dpitcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the changes made to the integ tests

@connorlanigan connorlanigan added this pull request to the merge queue Apr 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 17, 2025
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