Skip to content

Lazy containers: Clear contentPadding from environment as we apply it#335

Merged
marcprux merged 1 commit intoskiptools:mainfrom
dfabulich:lazyhstack-double-content-padding
Feb 14, 2026
Merged

Lazy containers: Clear contentPadding from environment as we apply it#335
marcprux merged 1 commit intoskiptools:mainfrom
dfabulich:lazyhstack-double-content-padding

Conversation

@dfabulich
Copy link
Contributor

PaddingModifier doesn't apply normal padding to lazy containers (which apply their own scroll container), but instead it adds the padding to a contentPadding environment variable, which the lazy containers pass to their Android implementations.

But, when we do that, we then need to set the contentPadding to 0,0,0,0, or else any lazy container nested inside a lazy container will find contentPadding in the environment and incorrectly apply it again.

Fixes #334

Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes in the Showcase sample app

`PaddingModifier` doesn't apply normal padding to lazy containers (which apply their own scroll container), but instead it adds the padding to a `contentPadding` environment variable, which the lazy containers pass to their Android implementations.

But, when we do that, we then need to set the contentPadding to 0,0,0,0, or else any lazy container nested inside a lazy container will find `contentPadding` in the environment and incorrectly apply it again.

Fixes skiptools#334
@cla-bot cla-bot bot added the cla-signed label Feb 12, 2026
@marcprux marcprux merged commit e3348e3 into skiptools:main Feb 14, 2026
2 checks passed
@marcprux
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Padded lazy containers pass their padding on to lazy subcontainers

2 participants