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

fix: use measured header height when exposing it #11917

Merged
merged 3 commits into from Mar 29, 2024

Conversation

satya164
Copy link
Member

@satya164 satya164 commented Mar 28, 2024

Motivation

Currently the useHeaderHeight hook returns a hardcoded value since previously we didn't have a way to measure the header height. But now there's a onHeaderHeightChange listener that we can use to measure the accurate height.

This PR makes sure that we use this event when measuring header height.

Test plan

Tested in the example app:

Simulator.Screen.Recording.-.iPhone.15.-.2024-03-28.at.12.31.23.mp4

@satya164 satya164 requested a review from tboba March 28, 2024 11:32
Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for react-navigation-example ready!

Name Link
🔨 Latest commit 8438e40
🔍 Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/66070fe6c93a1e00081cf24f
😎 Deploy Preview https://deploy-preview-11917--react-navigation-example.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@satya164 satya164 force-pushed the @satya164/use-measured-height branch from 6886bda to d38eac2 Compare March 29, 2024 16:14
@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 34.48276% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 77.05%. Comparing base (1d5ee6e) to head (78e7d29).

❗ Current head 78e7d29 differs from pull request most recent head 8438e40. Consider uploading reports for the commit 8438e40 to get more accurate results

Files Patch % Lines
.../native-stack/src/views/NativeStackView.native.tsx 33.33% 16 Missing ⚠️
packages/native-stack/src/utils/debounce.tsx 40.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11917      +/-   ##
==========================================
- Coverage   77.24%   77.05%   -0.20%     
==========================================
  Files         209      210       +1     
  Lines        6312     6336      +24     
  Branches     2496     2506      +10     
==========================================
+ Hits         4876     4882       +6     
- Misses       1382     1400      +18     
  Partials       54       54              

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

@satya164 satya164 force-pushed the @satya164/use-measured-height branch 2 times, most recently from e990409 to 78e7d29 Compare March 29, 2024 19:00
@satya164 satya164 force-pushed the @satya164/use-measured-height branch from 78e7d29 to 8438e40 Compare March 29, 2024 19:00
@satya164 satya164 marked this pull request as ready for review March 29, 2024 19:01
@satya164 satya164 merged commit d90ed76 into main Mar 29, 2024
8 checks passed
@satya164 satya164 deleted the @satya164/use-measured-height branch March 29, 2024 19:02
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.

None yet

2 participants