maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

InfoSheet Text Scroll Missing #41

Closed irvine752 closed 3 years ago

irvine752 commented 3 years ago

I'm using the latest version 2.0.0. Can we add a scroll view for the text content? or even better have an option for max height for the bottom sheet along with the scroll view. I'm using the InfoSheet to display Text and sometimes the content comes in different size. Let me know what you think.

maxkeppeler commented 3 years ago

You only want to make the text itself scrollable, or the whole layout container in which it is placed? I see that more of an improvement than a bug though. It is expected that the height of the sheet increases with the size of the content added.

irvine752 commented 3 years ago

I think having the whole component scrollable would be best for all the sheets. I can see instances where you have other components other than the Text being bigger than the screen size.

I marked it as a bug since I figured the default behaviour wasn't accounting for the excessive growth in Text. I think the enhancement portion would the ability to set the default height as a maybe a % of the screen height.

maxkeppeler commented 3 years ago

The sheet types that offer flexible content (e.g. InputSheet, OptionsSheet, ColorSheet) are scrollable. I will not add a universal support for scrolling. If someone wants to create a custom implementation, they should be able to control that as they want.

I was spending some thoughts on making the InfoSheet more flexible, or keep it simple and add images, animation, text and other components to the InputSheet (despite being more of a visual content builder than actual input).

No matter what I end up doing, it makes sense to limit the height of the view, though I would define a maximum height for the content container, not the whole bottom-sheet/ dialog, and make it scrollable. I will try to work on that on the weekend.

irvine752 commented 3 years ago

No worries, that works for me. If the other sheets that offer other components are scrollable that's perfect. That was a bad assumption on my part to assume it's the same behavior for the other sheets.