Skip to content

Comments

Add support for configurable end edge gesture behaviors in UIKit navigation logic#2519

Merged
terrakok merged 4 commits intojb-mainfrom
CMP-7180
Oct 24, 2025
Merged

Add support for configurable end edge gesture behaviors in UIKit navigation logic#2519
terrakok merged 4 commits intojb-mainfrom
CMP-7180

Conversation

@terrakok
Copy link
Member

@terrakok terrakok commented Oct 23, 2025

Added support for configurable end edge gesture behaviors in UIKit navigation logic.

fun MainViewController(): UIViewController = ComposeUIViewController(
    configure = {
        endEdgePanGestureBehavior = EndEdgePanGestureBehavior.Disabled //default
    }
) {
    App()
}

Fixes CMP-9004

End edge gesture is disabled by default:

1.mp4

There is EndEdgeGestureBehavior.Back option:

2.mp4

And there is EndEdgeGestureBehavior.Forward.

Release Notes

Features - Navigation

  • Add a new configuration option in ComposeUIViewController to set end-edge gestures behavior.

* Default value is [EndEdgeGestureBehavior.Disabled].
*/
@ExperimentalComposeUiApi
var endEdgeGestureBehavior: EndEdgeGestureBehavior = EndEdgeGestureBehavior.Disabled
Copy link
Member Author

Choose a reason for hiding this comment

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

In the compose it is called start/end. (e.g. paddings)

* Default value is [EndEdgeGestureBehavior.Disabled].
*/
@ExperimentalComposeUiApi
var endEdgeGestureBehavior: EndEdgeGestureBehavior = EndEdgeGestureBehavior.Disabled

Choose a reason for hiding this comment

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

EndEdgeGestureBehavior -> EndEdgePanGestureBehavior

var parallelRendering: Boolean = false

/**
* Determines how the end edge gestures will be handled.

Choose a reason for hiding this comment

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

"edge gestures" -> "edge pan gestures".
Please also fix in other places.

Copy link
Member

@MatkovIvan MatkovIvan left a comment

Choose a reason for hiding this comment

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

New public API LGTM.

For implementation - please wait review from iOS folks.
Also, I'd love to see a test for that. Our infra should be ready for such thing. (right? cc @ASalavei)

@terrakok terrakok merged commit 72b4dda into jb-main Oct 24, 2025
40 of 42 checks passed
@terrakok terrakok deleted the CMP-7180 branch October 24, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants