question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[NavigationExperimental] Render overlay first in NavigationAnimatedView

See original GitHub issue

At the moment, the overlay is the last element rendered in the AnimationAnimatedView: https://github.com/facebook/react-native/blob/master/Libraries/NavigationExperimental/NavigationAnimatedView.js#L165

The drawback of this approach is you have to position the overlay in absolute to get it on top and then you have to manually add a marginTop to your scene if the overlay is not a true overlay, like the navigation header.

Given RN flexbox implementation does not support order property, we cannot re arrange it to be first. I dont think there is any drawback to actually renderer it first so that we can naturally leverage flexbox if needed.

@ericvicenti any though ?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (20 by maintainers)

github_iconTop GitHub Comments

3reactions
ericvicenticommented, Jun 21, 2016

Yeah I think we can close this issue now, as we are about to deprecate NavigationAnimatedView.

NavigationTransitioner isn’t just a better name for NavigationAnimatedView, its a simpler implementation that avoids issues like this entirely. As @jmurzy said, you are now responsible for rendering all of the scenes as well as the header/footer/underlay. Instead of renderScene, renderOverlay and renderUnderlay, you just have render.

Instead of this:

<NavigationAnimatedView
  renderScene={this._renderScene}
  renderOverlay={this._renderOverlay}
  navigationState={ns}
/>

We have this:

<NavigationTransitioner
  render={(props) => (
    <View>
      {props.scenes.map(scene => this._renderScene({ scene }))}
      {this._renderOverlay(props)}
    </View>
  )}
  navigationState={ns}
/>

So hopefully this will enable people to make more creative views that allow crazy integrations between the header and scenes. We can also build better tools and abstractions by having a more flexible interface and allowing the transitioner to do what it does best.

2reactions
idecommented, Jun 21, 2016

Closing this based on @jmurzy’s comment. Thanks for helping out with all the Navigation diffs & issues btw 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stack Navigator | React Navigation
By default, there is one floating header which renders headers for multiple screens on iOS for non-modals. These headers include animations to smoothly...
Read more >
React Native Animations Using the Animated API - Medium
The first animation we will be creating is this spinning animation using ... Finally, we render a main View with three Animated.Views:
Read more >
Coupling Animation and Navigation - Unity - Manual
The goal of this document is to guide you to setup navigating humanoid characters to move using the navigation system. We'll be using...
Read more >
Jetpack Component screens overlaps, or partially rendered ...
It looks like screens are partially rendered, or overlapped, when being navigated with Jetpack Compose navigation controller. I try to find an ...
Read more >
Smooth and simple transitions with the View Transitions API
The View Transition API makes it easy to change the DOM in a single step, while creating an animated transition between the two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found