Skip to content

Conversation

@b0nsun9
Copy link

@b0nsun9 b0nsun9 commented Dec 20, 2023

Hello!

First of all, I appreciate about this repository a lot. It's my life saver.

I found two things that can be improve when I use it.

Firstly, there is no hidden(close) option. So, I used .fraction(0) instead, but I'm not the only one who wanted hidden option(who my colleague).
Although, Perhaps your purpose was make exactly the same thing of SwiftUI's sheet, but I thought it isn't intuitive.

Secondly, the @State(or @Published) var isPresented that is outside of BottomSheet, isn't change to false by swipe down action.
When close BottonSheet, isPresented is still true, and never open again next time.

So, I added the hidden property and changed few lines.

Please consider merging my PR if you don't mind.

Thank you once again.

ps. As my english writing skill, I have attached images that what's changed.

Before

before.MP4

After

after.MP4

Add Detents annotations
@Wouter125
Copy link
Owner

Hi thank you for your PR! I will check it out in more detail this weekend.

I fully understand what you mean, but I think we can have a boolean with SwipeToDismiss instead of a .hidden property to trigger this. This also allows for adding a custom callback on this.

It will move a bit away from the native Apple implementation indeed. I do think the comments to my PresentationDetent Enum are a perfect addition.

I will see what I can do. I have a couple of other fixes locally as well, but since work has been busy I haven't had time to implement it yet. Thank you for contributing, and I think I can make it work for you! 🙏

@Wouter125
Copy link
Owner

Closing this PR in favor of #31 .

@Wouter125 Wouter125 closed this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants