Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sheets] [Pt. 1] Root PR #5557

Merged
merged 69 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
64c9d86
remove
haileyok Oct 1, 2024
a2e8f3c
[Sheets] [Pt. 2] Remove a bunch of now-unnecessary things (#5560)
haileyok Oct 2, 2024
5b08aad
[Sheets] [Pt. 3] Get new sheet working with `ScrollableInner` (#5561)
haileyok Oct 2, 2024
0037353
[Sheets] [Pt. 4] Convert Pressable in Menu (WIP) (#5562)
haileyok Oct 2, 2024
ede5d01
[Sheets] [Pt. 5] Update types and props (#5563)
haileyok Oct 2, 2024
0ed5d48
[Sheets] [Pt. 6] Update `Inner` and `InnerFlatList` and their uses (#…
haileyok Oct 2, 2024
ecf7215
[Sheets] [Pt. 7] Part seven rework, much simplier! (#5582)
haileyok Oct 3, 2024
c491820
[Sheets] [Pt. 8] Allow nesting in other sheets or native modals (#5567)
haileyok Oct 3, 2024
4466f68
[Sheets] [Pt. 10] (#5581)
haileyok Oct 3, 2024
79996ac
[Sheets] [Pt. 11] Move native code into repo (#5583)
haileyok Oct 3, 2024
14e3567
[Sheets] [Pt. 12] Add event for selected snap point change (#5584)
haileyok Oct 3, 2024
52a8e4d
[Sheets] [Pt. 13] Keyboard handling (#5586)
haileyok Oct 3, 2024
058ddb0
[Sheets] [Pt. 14] Portaling behaviors for nested dialogs (#5588)
haileyok Oct 3, 2024
89ac125
[Sheets] [Pt. 15] Fix up dialogs inside the composer (#5589)
haileyok Oct 3, 2024
f51d42e
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 3, 2024
a32f587
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 3, 2024
cc81342
add dismiss all
haileyok Oct 3, 2024
1b7e66f
bring some android stuff back up to date
haileyok Oct 3, 2024
5e41b50
fix jest
haileyok Oct 3, 2024
f5b2fe7
fix incorrect snap point
haileyok Oct 3, 2024
9c309bb
fix web export of BottomSheetInlineLinkText
mozzius Oct 3, 2024
fba3cce
add sheet manager
haileyok Oct 3, 2024
54ebc40
tweak
haileyok Oct 3, 2024
7620b51
spread
haileyok Oct 3, 2024
584c296
Rm BottomSheetLink
estrattonbailey Oct 3, 2024
fe4c157
android stuff
haileyok Oct 3, 2024
959060b
fix scrolling in some dialogs
haileyok Oct 3, 2024
3af81a6
auto sizing
haileyok Oct 3, 2024
346897d
more autosize stuff
haileyok Oct 3, 2024
91ea486
tweak inset stuff
haileyok Oct 3, 2024
c389f4f
remove inset
haileyok Oct 3, 2024
ec2f66c
organize
haileyok Oct 3, 2024
d8c822a
fix
haileyok Oct 3, 2024
78554a3
?
haileyok Oct 3, 2024
3f2450f
hack for keyboard android
haileyok Oct 3, 2024
8dfc9a6
tweaks/fixes
haileyok Oct 3, 2024
dd64645
fix translate
haileyok Oct 3, 2024
308b197
fix link
haileyok Oct 3, 2024
1e9d792
add back period
haileyok Oct 3, 2024
38d8b17
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 3, 2024
d3d2918
touch handler ios
haileyok Oct 4, 2024
045abf2
forward touches android
haileyok Oct 4, 2024
bcccd88
remove all the pressable hacks
haileyok Oct 4, 2024
7b2bf91
remove more unnecessary
haileyok Oct 4, 2024
b56e9d8
log
haileyok Oct 4, 2024
0b9a427
clean
haileyok Oct 4, 2024
459edba
Use new sheets for GIF select (delete platform branching) (#5592)
mozzius Oct 4, 2024
d2a3582
fix sizes
haileyok Oct 4, 2024
d6cc131
disable native grabber
haileyok Oct 4, 2024
385628f
Handles
estrattonbailey Oct 4, 2024
73f41b4
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 4, 2024
8eb5847
fix handle
haileyok Oct 4, 2024
dd71172
fix event not firing
haileyok Oct 4, 2024
aabaf7d
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 4, 2024
775ea2e
possible fix
haileyok Oct 4, 2024
658a352
fix event not firing (#5603)
haileyok Oct 4, 2024
6a3b1aa
Handle needs to be absolute
estrattonbailey Oct 4, 2024
4c6cb95
Remove space above Flatlist and apply to usages
estrattonbailey Oct 4, 2024
8e119f3
Add a little padding to bottom of menu
estrattonbailey Oct 4, 2024
dfa1e5c
Fix padding on ScrollableInner
estrattonbailey Oct 4, 2024
597ecb3
Fix todo
estrattonbailey Oct 4, 2024
e8f1a73
rm log
haileyok Oct 4, 2024
6b81ebe
more inset tweaks
haileyok Oct 4, 2024
6ae75c8
disable drag android when needed
haileyok Oct 4, 2024
2d13212
be sure to fire detent event
haileyok Oct 4, 2024
992a5e8
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 4, 2024
84cc00f
types
haileyok Oct 4, 2024
144f587
oops
haileyok Oct 4, 2024
3f51721
Merge remote-tracking branch 'origin/main' into hailey/dialogs-pt1
haileyok Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ jest.mock('expo-modules-core', () => ({
getIsReducedMotionEnabled: () => false,
}
}
if (moduleName === 'BottomSheet') {
return {
dismissAll: () => {},
}
}
}),
requireNativeViewManager: jest.fn().mockImplementation(moduleName => {
return () => null
Expand Down
49 changes: 49 additions & 0 deletions modules/bottom-sheet/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apply plugin: 'com.android.library'

group = 'expo.modules.bottomsheet'
version = '0.1.0'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useExpoPublishing()

// If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
// Most of the time, you may like to manage the Android SDK versions yourself.
def useManagedAndroidSdkVersions = false
if (useManagedAndroidSdkVersions) {
useDefaultAndroidSdkVersions()
} else {
buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
}
project.android {
compileSdkVersion safeExtGet("compileSdkVersion", 34)
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 34)
}
}
}

android {
namespace "expo.modules.bottomsheet"
defaultConfig {
versionCode 1
versionName "0.1.0"
}
lintOptions {
abortOnError false
}
}

dependencies {
implementation project(':expo-modules-core')
implementation 'com.google.android.material:material:1.12.0'
implementation "com.facebook.react:react-native:+"
}
2 changes: 2 additions & 0 deletions modules/bottom-sheet/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package expo.modules.bottomsheet

import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition

class BottomSheetModule : Module() {
override fun definition() =
ModuleDefinition {
Name("BottomSheet")

AsyncFunction("dismissAll") {
SheetManager.dismissAll()
}

View(BottomSheetView::class) {
Events(
arrayOf(
"onAttemptDismiss",
"onSnapPointChange",
"onStateChange",
),
)

AsyncFunction("dismiss") { view: BottomSheetView ->
view.dismiss()
}

AsyncFunction("updateLayout") { view: BottomSheetView ->
view.updateLayout()
}

Prop("disableDrag") { view: BottomSheetView, prop: Boolean ->
view.disableDrag = prop
}

Prop("minHeight") { view: BottomSheetView, prop: Float ->
view.minHeight = prop
}

Prop("maxHeight") { view: BottomSheetView, prop: Float ->
view.maxHeight = prop
}

Prop("preventDismiss") { view: BottomSheetView, prop: Boolean ->
view.preventDismiss = prop
}

Prop("preventExpansion") { view: BottomSheetView, prop: Boolean ->
view.preventExpansion = prop
}
}
}
}
Loading
Loading