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

Add padding to multiline modifier #29

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

bluesource
Copy link

Goals ⚽

SkeletonUI uses GeometryReader to read the views size. GeometryReader is greedy and tacks all the size it gets.
If I have a typical Layout like:
HStack { Text("a") VStack { Text("a") Text("a") }.skeleton(true).multiline(...) }

This causes VStack to take the complete height of the container. Also the multiline is "blown" up. You can work around by applying extra constraints when the skeleton is there, but that increases the complexity of the layout a lout.

A simple solution is to add a padding option to the multiline modifier, this enables more flexibility when adding the skeleton.

Testing Details 🔍

Added a new snapshot testtestCustomTextWithPadding

@CSolanaM CSolanaM added the enhancement New feature or request label Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants