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

Jumpy behaviour when setting sheetInitialDetentIndex to other then 0. #2543

Open
blytung opened this issue Nov 27, 2024 · 3 comments
Open

Jumpy behaviour when setting sheetInitialDetentIndex to other then 0. #2543

blytung opened this issue Nov 27, 2024 · 3 comments
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@blytung
Copy link

blytung commented Nov 27, 2024

Description

When im using sheetInitialDetentIndex and set it to another value then 1, the formSheet is behave jumpy, it hard to stick to the anchor.

Here how it is
https://github.com/user-attachments/assets/c79b61cd-22e3-406d-8139-e485fa01f18e

`
<RootStack.Screen
name="Favorites"
component={Favorites}
options={{
presentation: 'formSheet',
headerShown: true,
title: '',
sheetAllowedDetents: [0.2, 0.5, 0.99],
gestureEnabled: true,
sheetInitialDetentIndex: 2,
sheetLargestUndimmedDetentIndex: 'last',
sheetCornerRadius: 24,

          contentStyle: {
            backgroundColor: COLORS.primaryBackground,
          },
          unstable_screenStyle: {
            backgroundColor: COLORS.primaryBackground,
          },
        }}
      />

`

Expected behaviour:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-27.at.12.04.21.mp4

`
<RootStack.Screen
name="Favorites"
component={Favorites}
options={{
presentation: 'formSheet',
headerShown: true,
title: '',
sheetAllowedDetents: [0.2, 0.5, 0.99],
gestureEnabled: true,
sheetInitialDetentIndex: 0,
sheetLargestUndimmedDetentIndex: 'last',
sheetCornerRadius: 24,

          contentStyle: {
            backgroundColor: COLORS.primaryBackground,
          },
          unstable_screenStyle: {
            backgroundColor: COLORS.primaryBackground,
          },
        }}
      />

`

Steps to reproduce

  1. set the sheetInitialDetentIndex to a value other then 0.
  2. using formSheet

Snack or a link to a repository

snack

Screens version

4.0.0

React Native version

0.75.0

Platforms

iOS

JavaScript runtime

None

Workflow

Expo bare workflow

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Real device

Device model

iPhone 14 Pro

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario Repro provided A reproduction with a snack or repo is provided and removed Missing repro This issue need minimum repro scenario labels Nov 27, 2024
@blytung
Copy link
Author

blytung commented Dec 6, 2024

Do you need any more info about this or do you understand the issue? :)

@kkafar
Copy link
Member

kkafar commented Dec 11, 2024

Hey, thanks for reporting. I clearly see the issue and must admit I'm surprised by it as I remember fixing the exactly same one few months back. Some regression must have happened, will look into this.

@blytung
Copy link
Author

blytung commented Dec 20, 2024

Hey, thanks for reporting. I clearly see the issue and must admit I'm surprised by it as I remember fixing the exactly same one few months back. Some regression must have happened, will look into this.

Thats fantastic. We appreciate all the work you guys put into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants