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

Scaffold: Properly handle action's height being larger than available content height #505

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

shanio
Copy link
Contributor

@shanio shanio commented Aug 16, 2023

@shanio shanio requested a review from a team as a code owner August 16, 2023 10:31
@shanio shanio self-assigned this Aug 16, 2023
@shanio shanio changed the title Properly handle action's height being larger than available content height Scaffold: Properly handle action's height being larger than available content height Aug 16, 2023
@shanio shanio force-pushed the bugfix/action_bigger_than_available_content_space branch from e8cbbba to 5c3ec10 Compare August 16, 2023 11:18
Copy link
Contributor

@hrach hrach left a 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:
obrazek

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.

@shanio
Copy link
Contributor Author

shanio commented Aug 21, 2023

@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.

Copy link
Contributor

@hrach hrach left a 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

@shanio shanio force-pushed the bugfix/action_bigger_than_available_content_space branch from 5c3ec10 to f169ef6 Compare August 22, 2023 09:28
Copy link
Contributor

@hrach hrach left a 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

@shanio shanio force-pushed the bugfix/action_bigger_than_available_content_space branch from f169ef6 to 4551003 Compare August 22, 2023 09:57
@shanio
Copy link
Contributor Author

shanio commented Aug 22, 2023

LGTM, screenshots have to be updated

Fixed.

@hrach hrach added bug Something isn't working semver:patch PRs marker as patch will force next release to bump PATCH version labels Aug 22, 2023
@hrach hrach merged commit 9619a84 into main Aug 23, 2023
@hrach hrach deleted the bugfix/action_bigger_than_available_content_space branch August 23, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver:patch PRs marker as patch will force next release to bump PATCH version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Scaffold crashes when action is bigger that the content available space
3 participants