-
Notifications
You must be signed in to change notification settings - Fork 22
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
Scaffold: Properly handle action's height being larger than available content height #505
Conversation
e8cbbba
to
5c3ec10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some visual glitches as can be seen here:
Also, practically, the action slot should be probably limited to something like 50% of the available space to keep the content practically accessible. Covering the "content" by another "content" should be done differently - instead of misusing the action slot.
I'll double-check the actual changes on Monday.
@hrach The changes applied are only fixing the underlying issues in height calculation when the action is too big. The space given to the content is deliberately not capped at the moment (similar to the original state), however the nature of the action slot is that it leaves 8.dp for content in form of gradient. "The glitches" are actually parts of content, that is being shrunk to 8.dp, which is imo a little bit unexpected (tha action appears to the user as if it is above the content, not sharing/ taking away space from it. ) A fix size/ratio/weight could be applied as suggested, however it might not be so obvious, what would be a good value there. Also the problem will not be fixed by this completely. We will need to either disallow placing custom content into action slot or make sure that scrolling is applied in usage sites. TL;DR: Making the action slot smaller needs to be coupled with fixes on the usage sites to ensure they fits, while this fix alone preserves the status quo of the component, it just does not allow to crash in those situations. Updating the max height is trivial though, just apply the factor to maxActionHeight to get the desired outcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so let's do it this way. Please fix a few things
ui/src/androidMain/kotlin/kiwi/orbit/compose/ui/controls/Scaffold.kt
Outdated
Show resolved
Hide resolved
ui/src/androidMain/kotlin/kiwi/orbit/compose/ui/controls/Scaffold.kt
Outdated
Show resolved
Hide resolved
5c3ec10
to
f169ef6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, screenshots have to be updated
f169ef6
to
4551003
Compare
Fixed. |
#504