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

ASTextNode2 to consider both width and height when determining if it is calculating an intrinsic size #1196

Conversation

ernestmama
Copy link
Contributor

It was only considering the individual constraint width/height when calculating the intrinsic size. However, this will not work when textnode is in a vertical ASStackLayoutSpec which also try to set a flexShrink.

If it needs to calculate either height or width based on its own content where either of them is ambiguous, it needs to apply the proper line break mode and text alignment.

Related commit: a139d66

@ghost
Copy link

ghost commented Oct 27, 2018

1 Warning
⚠️ Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.

Generated by 🚫 Danger

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would have another look from @nguyenhuy or @Adlai-Holler though.

Also, @ernestmama could we add a test for this scenario and add an entry to the changelog. Thanks!

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this. I tested this manually, but would be great to have automated test later on. Not a blocker though.

@nguyenhuy
Copy link
Member

Adding a change log entry isn't required because it'd be the same with the one added for #1166.

@nguyenhuy nguyenhuy merged commit 055d27c into TextureGroup:master Nov 1, 2018
nguyenhuy pushed a commit that referenced this pull request Nov 1, 2018
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants