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

GiphyDialog does not work with formSheet modal #166

Closed
timothyerwin opened this issue Feb 15, 2024 · 4 comments
Closed

GiphyDialog does not work with formSheet modal #166

timothyerwin opened this issue Feb 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@timothyerwin
Copy link

🐛 Bug Report

(A clear and concise description of what the bug is)

Using react-navigation and presentation: 'formSheet' means the dialog will not show. It only seems to work with 'card' type.

To Reproduce

(Write your steps here:)

  1. Use react-navigation with StackNavigator and presentation: 'formSheet'
  2. Call GiphyDialog.show();

Expected behavior

(Write what you thought would happen.)

...should show the Giphy dialog

Actual Behavior

(Write what happened. Add screenshots, if applicable.)

Shows nothing.

Your Environment

  • Giphy React Native SDK version: 3.2.2
  • React Native version: 0.73
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): iPhone 15 Pro

Reproducible Demo

@timothyerwin timothyerwin added the bug Something isn't working label Feb 15, 2024
@ALexanderLonsky
Copy link
Contributor

ALexanderLonsky commented Feb 16, 2024

Hey @timothyerwin,

Indeed, that is strange. When using the native-stack + modal/formSheet, the dialog does not appear on iOS. Since you mentioned using an iPhone device, I believe you actually need a modal rather than a formSheet, as the last one is more suitable for larger screens. I'm not sure of the root cause of the issue, I'll need to investigate how the native-stack works under the hood. By the way, I've checked: on Android, the native-stack + modal also does not open up as a modal.
However, react-navigation/stack behaves as expected. You can switch to it for now:

import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
<NavigationContainer>
    <Stack.Navigator>
        <Stack.Screen name="Home" component={Home} />
        <Stack.Screen name="NewScreen" component={NewScreen} options={{ presentation: 'modal' }} />
    </Stack.Navigator>
</NavigationContainer>

Please let me know if that works for you.

P.S. Just found this.

@ALexanderLonsky
Copy link
Contributor

Okay, it seems I've found a solution to fix the issue on iOS for thenative-stack.
I'll release a new version next week.

@ALexanderLonsky
Copy link
Contributor

@timothyerwin,
The issue should be resolved in version 3.2.3.

@timothyerwin
Copy link
Author

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-22.at.16.08.35.mp4

It's working awesome. Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants