FlexibleBottomSheet icon indicating copy to clipboard operation
FlexibleBottomSheet copied to clipboard

Bottom Sheet visibility bug when dismissing

Open nilufer32 opened this issue 1 year ago • 12 comments

Please complete the following information:

  • Library Version [e.g. v1.0.0] : latest commit 1c0e68f041df83fad2a2a957ebb00f0d90ae6762
  • Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0] OppoCPH1803 , Samsung A510F, Iphone Describe the Bug:

Add a clear description about the problem. When dismissing the sheet using a drag gesture, the bottom sheet disappears for a split second then just before completely hiding it reappears again and hides fully. Also, in this state of the sheet "disappearing" if I drag the sheet up instead of down it reappears again. Expected Behavior:

A clear description of what you expected to happen.

The sheet should always be visible on screen as long as I'm dragging it and it should only fully disappear when I fully drag it downwards.

nilufer32 avatar May 13 '24 10:05 nilufer32

+1

H4kt avatar May 30 '24 13:05 H4kt

Hey guys, would you provide a video for this behavior? Thank you!

skydoves avatar Jun 06 '24 05:06 skydoves

This happens when you swipe to dismiss (while still holding your finger down) for me at least.

Kev1000000 avatar Jun 16 '24 22:06 Kev1000000

+1

This exactly happens when you try to swipe to dismiss from anywhere else than DragHandle

sevbanBayir avatar Aug 02 '24 10:08 sevbanBayir

Hey everyone, thanks for checking out this issue. I just confirmed that it occurs when using LazyColumn or any scrollable component inside the flexible bottom sheet. Fixing this bug is a high priority for me.

skydoves avatar Aug 02 '24 10:08 skydoves

Hey guys, 0.1.4 has been released, and I hope this new release resolves this issue.

skydoves avatar Aug 04 '24 08:08 skydoves

Hey there, this unfortunately didn't solve the issue for me. On some scrolls it is fixed, but it still happens about 80% of the time =(

Kev1000000 avatar Aug 04 '24 17:08 Kev1000000

Hey @Kev1000000, do you have any screenshots? and I'm wondering if it happens on dragging or snapping (flinging) behavior?

skydoves avatar Aug 05 '24 00:08 skydoves

Screen_recording_20240805_002126.webm

Note, I am holding during this bottom sheet drag. It is disappearing while dragging down. As I drag up, it returns.

Kev1000000 avatar Aug 05 '24 04:08 Kev1000000

Same here, issue still persists with 0.1.4 . Im using a Column with a verticalScroll() modifier in FlexibleBottomSheet.

sevbanBayir avatar Aug 05 '24 06:08 sevbanBayir

Same here, issue still persists with 0.1.4 . Im using a Column wit

I also have a problem that has not been solved.

Maandraj avatar Aug 07 '24 15:08 Maandraj

@sevbanBayir @skydoves I found a solution, although it looks crutchy.

var scrollEnabled by remember { mutableStateOf(false) }
scrollEnabled = when (it) {
                FlexibleSheetValue.Hidden -> {
                    false
                }
                FlexibleSheetValue.FullyExpanded -> {
                    true
                }
                FlexibleSheetValue.IntermediatelyExpanded -> {
                    true
                }
                FlexibleSheetValue.SlightlyExpanded -> {
                    false
                }
            }
Column(modifier= Modifier.verticalScroll(rememberScrollState(), enabled = scrollEnabled))

Maandraj avatar Aug 07 '24 15:08 Maandraj

I've noticed that it happens only for non-modal sheets like rememberFlexibleBottomSheetState(isModal = false)

TemMax avatar Aug 19 '24 10:08 TemMax

UPD: nope, it happens for modal sheets as well. But when the sheet is modal, there is no padding glitch, only disappearing happens.

TemMax avatar Aug 19 '24 11:08 TemMax

Hi everyone, the new release 0.1.5 has been released, and it fixes for the modal case.

skydoves avatar Sep 01 '24 10:09 skydoves