Skip to content

Conversation

@e-younan
Copy link
Member

@e-younan e-younan commented Jun 29, 2023

Description

This PR introduces two new properties, headerFadeInThreshold and disableLargeHeaderFadeAnim. The headerFadeInThreshold allows you to define a number between 0 and 1, which represents the percentage of the large header's height, to be used to animate the smaller header in and out. If you set a smaller headerFadeInThreshold, the LargeHeader will fade in earlier and may look weird (since the component essentially disappears in front of the user), hence why disableLargeHeaderFadeAnim was introduced.

Motivation and Context

The reason this was introduced is because the header will fade in once the scroll container has passed the LargeHeader. The issue is that if you have a big LargeHeader component, you may want to fade in the header at an earlier time. These new properties allow you to achieve that.

How Has This Been Tested?

There are 2 examples that make use of this in the example application - the Twitter example and the new ArbitraryYTransitionHeaderUsageScreen. See the attached video below for a showcase of the new feature.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have followed the guidelines in the README.md file.
  • I have updated the documentation as necessary.
  • My changes generate no new warnings.

Screenshots

Screen.Recording.2023-06-28.at.10.42.31.PM.mov

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