ASTextNode2 should take a size range for layout
ASTextNode2's rendering of centered and right aligned text is not consistent with ASTextNode, UILabel, or itself. When rendering, ASTextNode2 is given a CGSize to render in. For left aligned text, if the size is larger than the text, ASTextNode2 will only use the size needed to fit the text. This is consistent with ASTextNode and UILabel -- and what I consider "correct". Here is an example where ASTextNode2 is purple, ASTextNode is green, and UILabel is blue:
However, if we align the text to the right, ASTextNode2 starts to use the entirety of the given size. This is both inconsistent with what UILabel and ASTextNode do, as well as inconsistent with what ASTextNode2 does for left alignment:
Finally, centering text is also inconsistent. UILabel and ASTextNode continue to only use the size that the text needs. ASTextNode2, however, ends up with a strange result:
What is going on here is that ASTextNode2 takes 2 passes to center the text. The first pass determines how large the text node should be to center the text and only to center the text. The result of that pass ends up looking like the text is right aligned in the text node (sorry the background is green this time):

In the next pass, we should be able to reuse the last layout. However, since the text node ended up being a different size than the size passed in, we run the second pass with the text node's computed size:
// We need to update the container size here to what our actual bounds are. We have already
// determined the size of the text at our constrained size (in calculateLayoutThatFits), but we need to
// make sure our final size ended up in that constrained size. If not our layout won't work. If it did,
// then we should be able to use the cached layout and not actually have to relayout the text.
copiedContainer.size = self.bounds.size;
This leads to us centering the text in the size of the text node after the first pass:

To be consistent with itself, it should probably render as (though I don't think this is the best solution either):
All this is to say that ASTextNode2's desire to greedily use all of its size (except in left aligned cases), it inconsistent with both UILabel and ASTextNode. Possible solutions would be clip the "white space" of center and right aligned text when the text is less than size (though this would require making sure we are at least using the min constrained size for the current layout), or better yet changing ASTextNode2 to support ASSizeRange.
@rcancro is this on master or google_pr?
We had to make a fix for this but thought it was yoga-specific: See ASTextNode2 intrinsic calculateSizeThatFits:
Ashley documented a lot of the problem cases and we have a thorough test however it is on top of our layer ("Elements") so some of the values aren't from Texture but I think they are fortunately self-explanatory:
(Before)

(After)

We should create analogous tests for the FBSnapshot tests in Texture, and evaluate if a similar change would be helpful for non-yoga builds.