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

Close bottom sheet on scroll #262

Closed
josebejao opened this issue Jul 15, 2024 · 16 comments
Closed

Close bottom sheet on scroll #262

josebejao opened this issue Jul 15, 2024 · 16 comments
Labels
enhancement New feature or request wolt priority

Comments

@josebejao
Copy link

Hi,

It's any possibility to close bottom sheet when you are on top of scroll and swipe down ? Like if we touch in title with drag enabled, but on the scroll widget.

Thank you

@josebejao josebejao added the enhancement New feature or request label Jul 15, 2024
@ulusoyca
Copy link
Collaborator

@MbIXjkee This is a good use case. Do you think that this would work in the new scroll view?

@ulusoyca
Copy link
Collaborator

We are working on this.

@AcarFurkan
Copy link
Collaborator

Hey @ulusoyca @josebejao ,
I made a demo, is this what we want?
https://github.com/user-attachments/assets/954a541f-21d9-48bf-8f82-9bb0045d15f4

@ulusoyca
Copy link
Collaborator

Hey @ulusoyca @josebejao ,

I made a demo, is this what we want?

wolt.mp4

Yes 🤩 if only this is the behaviour when scroll position is 0. What happens in scrolled case?

@AcarFurkan
Copy link
Collaborator

Hey @ulusoyca @josebejao ,
I made a demo, is this what we want?

1.00<<

wolt.mp4

Yes 🤩 if only this is the behaviour when scroll position is 0. What happens in scrolled case?

This is up to us. If we want, we can use drag properties like the one used by WoltModalSheetContentGestureDetector right now. Or we can define another behavior :)

@ulusoyca
Copy link
Collaborator

The default behavior should be enable drag to dismiss gesture on list view area when main content scroll position is 0.

@AcarFurkan
Copy link
Collaborator

On it

The default behavior should be enable drag to dismiss gesture on list view area when main content scroll position is 0.

@ulusoyca
Copy link
Collaborator

On it

The default behavior should be enable drag to dismiss gesture on list view area when main content scroll position is 0.

This is the default behaviour:

trim.5AD7E686-B874-4606-85A7-FB7E04D53612.MOV

@josebejao
Copy link
Author

That's it, thank you so much.

@ulusoyca
Copy link
Collaborator

That's it, thank you so much.

@durannumit and @AcarFurkan are working on this feature. I am also looking forward to see how they will address this 👀

@AcarFurkan
Copy link
Collaborator

On it

The default behavior should be enable drag to dismiss gesture on list view area when main content scroll position is 0.

This is the default behaviour:

trim.5AD7E686-B874-4606-85A7-FB7E04D53612.MOV

wolt2.mp4

@ulusoyca
Copy link
Collaborator

On it

The default behavior should be enable drag to dismiss gesture on list view area when main content scroll position is 0.

This is the default behaviour:
trim.5AD7E686-B874-4606-85A7-FB7E04D53612.MOV

wolt2.mp4

@AcarFurkan amazing work! This is indeed what we are after. When is the PR coming? We can release this before the big day.

@AcarFurkan
Copy link
Collaborator

Thank youu :) I wrote some bad code to make a quick demo. If I don't have any extra work today or tomorrow, I want to clean it up and open a PR :) coming soon

@ulusoyca
Copy link
Collaborator

I am gonna be honest. I spent around 30 mins to fix this, and couldn't do it. Really looking forward to it. 🙇

@ulusoyca
Copy link
Collaborator

ulusoyca commented Aug 1, 2024

@AcarFurkan I improved your solution. It does not have to be a bottom sheet. Our generic solution also does the same for custom modal types and handles all the edge positions considering selected dismiss direction.

drag_to_close_bottom_sheet.mov

@ulusoyca
Copy link
Collaborator

ulusoyca commented Aug 5, 2024

@josebejao This is released with 0.9.0

@ulusoyca ulusoyca closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wolt priority
Projects
None yet
Development

No branches or pull requests

3 participants