Skip to content

Sliding two-pane scene unexpectedly shows blank white pane on pop transition #254

Description

@marcardar

Describe the bug

This is a follow-up to the closed recipe-request #248

It was recommended to use these transition specs to achieve the sliding transition:

transitionSpec = {
    slideInHorizontally { it / 2 } togetherWith slideOutHorizontally { -it / 2 }
},
popTransitionSpec = {
    slideInHorizontally { -it / 2 } togetherWith slideOutHorizontally { it / 2 }
},
predictivePopTransitionSpec = {
    slideInHorizontally { -it / 2 } togetherWith slideOutHorizontally { it / 2 }
},

While this mostly works, there is a problem when performing a quick back gesture: instead of the right pane (for the exiting entry) sliding out to the right, it just disappears instantly leaving a blank white space. There is no such problem when using a full predictive back gesture, nor when using the 3-button back navigation button.

So, curiously, it only happens when flicking the back gesture as shown in the video.

Steps to reproduce

First, ensure that the above specs are in place in TwoPaneActivity.kt

  1. Enable gesture navigation on device
  2. Launch nav3-recipes and go to Two Pane recipe
  3. Ensure device in landscape
  4. Click on View first product / view the next product / view the next product so that the right pane is Product 2
  5. Do a flick of the back gesture from left edge of screen

Expected behavior

Right pane (Product 2) should gradually slide out to the right, just like it does when performing normal back or slow predictive back.

Actual behavior

The right pane goes white instantly before the left pane gradually slides over it

Screenshots

Image
Screen_recording_20260317_101603.mp4

Additional context

Curiously, there are no issues when going back from Product 1. It only happens when the left pane is a Product pane.

There are other issues with the transitions in single-pane (portrait orientation) scene because it / 2 (which should only apply to a balance two column scene) is applied at NavDisplay level rather than scene level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low PrioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions