-
-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: restore backward compat for new & old architecture (#2730)
## Description Restoring backward compatibility for old architecture - now we require 76. 75 could work, but I've not tested this. On new architecture we require 77. It should compile on 76, however we need the fix for the removal of transitioning views that landed in 77. See here: #2596. ## Changes Described mostly down below 👇🏻 in review comments. ## Checklist I've tested this manually on fresh RN 76 & 78 app, new/old architecture, iOS/Android. - [ ] Ensured that CI passes
- Loading branch information
Showing
19 changed files
with
164 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
android/src/main/java/com/swmansion/rnscreens/bottomsheet/GestureTransparentViewGroup.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ned/pointerevents/77/com/swmansion/rnscreens/ScreensCoordinatorLayoutPointerEventsImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.swmansion.rnscreens | ||
|
||
import com.facebook.react.uimanager.PointerEvents | ||
import com.facebook.react.uimanager.ReactPointerEventsView | ||
|
||
internal class ScreensCoordinatorLayoutPointerEventsImpl : ReactPointerEventsView { | ||
// We set pointer events to BOX_NONE, because we don't want the ScreensCoordinatorLayout | ||
// to be target of react gestures and effectively prevent interaction with screens | ||
// underneath the current screen (useful in `modal` & `formSheet` presentation). | ||
override fun getPointerEvents(): PointerEvents = PointerEvents.BOX_NONE | ||
} |
15 changes: 15 additions & 0 deletions
15
...ersioned/pointerevents/77/com/swmansion/rnscreens/bottomsheet/DimmingViewPointerEvents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.swmansion.rnscreens.bottomsheet | ||
|
||
import com.facebook.react.uimanager.PointerEvents | ||
import com.facebook.react.uimanager.ReactPointerEventsView | ||
import com.swmansion.rnscreens.bottomsheet.DimmingView | ||
|
||
|
||
internal class DimmingViewPointerEventsImpl(val dimmingView: DimmingView) : ReactPointerEventsView { | ||
override fun getPointerEvents(): PointerEvents = if (dimmingView.blockGestures == false) PointerEvents.AUTO else PointerEvents.NONE | ||
} | ||
|
||
internal class DimmingViewPointerEventsProxy(var pointerEventsImpl: DimmingViewPointerEventsImpl?) : | ||
ReactPointerEventsView { | ||
override fun getPointerEvents(): PointerEvents = pointerEventsImpl?.pointerEvents ?: PointerEvents.NONE | ||
} |
11 changes: 11 additions & 0 deletions
11
...pointerevents/latest/com/swmansion/rnscreens/ScreensCoordinatorLayoutPointerEventsImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.swmansion.rnscreens | ||
|
||
import com.facebook.react.uimanager.PointerEvents | ||
import com.facebook.react.uimanager.ReactPointerEventsView | ||
|
||
internal class ScreensCoordinatorLayoutPointerEventsImpl() : ReactPointerEventsView { | ||
// We set pointer events to BOX_NONE, because we don't want the ScreensCoordinatorLayout | ||
// to be target of react gestures and effectively prevent interaction with screens | ||
// underneath the current screen (useful in `modal` & `formSheet` presentation). | ||
override val pointerEvents: PointerEvents = PointerEvents.BOX_NONE | ||
} |
16 changes: 16 additions & 0 deletions
16
...oned/pointerevents/latest/com/swmansion/rnscreens/bottomsheet/DimmingViewPointerEvents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.swmansion.rnscreens.bottomsheet | ||
|
||
import com.facebook.react.uimanager.PointerEvents | ||
import com.facebook.react.uimanager.ReactPointerEventsView | ||
|
||
|
||
internal class DimmingViewPointerEventsImpl(val dimmingView: DimmingView) : ReactPointerEventsView { | ||
override val pointerEvents: PointerEvents | ||
get() = if (dimmingView.blockGestures == false) PointerEvents.AUTO else PointerEvents.NONE | ||
} | ||
|
||
internal class DimmingViewPointerEventsProxy(var pointerEventsImpl: DimmingViewPointerEventsImpl?) : | ||
ReactPointerEventsView { | ||
override val pointerEvents: PointerEvents | ||
get() = pointerEventsImpl?.pointerEvents ?: PointerEvents.NONE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.