Skip to content

Fix panel interactivity broken by floatingPanelState(_:) with delegate callbacks#681

Merged
scenee merged 5 commits intomasterfrom
iss-680
Feb 14, 2026
Merged

Fix panel interactivity broken by floatingPanelState(_:) with delegate callbacks#681
scenee merged 5 commits intomasterfrom
iss-680

Conversation

@scenee
Copy link
Owner

@scenee scenee commented Feb 12, 2026

Fixed

  • floatingPanelState(_:) breaking panel interactivity when used with FloatingPanelControllerDelegate methods that trigger SwiftUI re-renders (e.g. opacity changes). Delegate callbacks caused redundant move(to:animated:) calls during drag gestures, interrupting the interactive transition.

Added

  • lastKnownBindingState tracking in CoordinatorProxy.update(state:) to skip moves when the binding value hasn't actually changed, preventing stale state from reverting the panel position.
  • CoordinatorProxyTests and reorganize existing tests into a UIKit subfolder.

Improvement

  • Updated CI environment with Xcode 26.2

Closes #680

…e callbacks (#680)

When using `floatingPanelState(_:)` together with
`FloatingPanelControllerDelegate` methods that trigger SwiftUI view
updates (e.g. opacity changes), the delegate callbacks caused a SwiftUI
re-render which in turn called `update(state:)` with the current state.
This redundant `controller.move(to:state, animated: false)` call during
a drag gesture interrupted the panel's interactive transition.

Skip the `move(to:animated:)` call when the controller is already in the
requested state.
Add lastKnownBindingState tracking to CoordinatorProxy.update(state:)
to skip moves when the binding value hasn't actually changed, preventing
delegate callbacks from reverting the panel to a stale state.
@scenee scenee marked this pull request as ready for review February 13, 2026 23:53
@scenee scenee self-assigned this Feb 14, 2026
@scenee scenee merged commit 7efcc76 into master Feb 14, 2026
22 checks passed
@scenee scenee deleted the iss-680 branch February 14, 2026 00:17
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.

floatingPanelState(_:) modifier breaks panel interactivity when used with FloatingPanelControllerDelegate methods

1 participant

Comments