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

Only add top padding if there's actually a back button #254

Open
zsoltk opened this issue Oct 25, 2022 · 3 comments
Open

Only add top padding if there's actually a back button #254

zsoltk opened this issue Oct 25, 2022 · 3 comments
Labels
enhancement New feature or request samples

Comments

@zsoltk
Copy link
Contributor

zsoltk commented Oct 25, 2022

The current logic in SamplesContainerNode means there's always a 40.dp top padding – even on elements without a back button, and even on the samples list itself.

The padding should only be applied to the child which corresponds to the NavTarget with showBackButton == true.

@zsoltk zsoltk added enhancement New feature or request samples labels Oct 25, 2022
@LachlanMcKee
Copy link
Collaborator

LachlanMcKee commented Oct 25, 2022

I did that deliberately originally.

If you have different padding values the screen transitions don't look great. if you come up with a solution for that, please keep that in mind when switching between screens.

@zsoltk
Copy link
Contributor Author

zsoltk commented Oct 25, 2022

I think I know what you mean – there's a visual "jump" if we change the padding value. But if we only apply the padding on the needed element rather than the container, this shouldn't happen, no?

@LachlanMcKee
Copy link
Collaborator

yeah, a visual jump! that rings a bell. Yes, if we add it to the element it should hopefully fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request samples
Projects
None yet
Development

No branches or pull requests

2 participants