Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set max lines to 1 if we've exhausted all lines in an attempt to fit …
…text Summary: After D54698703 landed, I was looking through the screenshots and saw regressions like the below: {F1468068992} The edge case here is that we keep the `linesWithinConstrainedBounds` as zero if we were never able to fit within the constraints and we've exhausted all the available lines in the layout. Setting the `linesWithinConstrainedBounds` to zero will cause the text to be drawn unbounded and overflow the constraints which is not what we want. In this diff, we'll set the number of lines that can fit to 1 if we've exhausted all lines and were not able to fit within the constraints. NOTE: This may still end up in the text being cut height wise if the height at 1 line still exceeds the constraints. Think of this mitigation as a last hail mary to show the ellipsis. Better to try than never Reviewed By: rooju Differential Revision: D54836935 fbshipit-source-id: f5dbfdc0a913c4ec80208ff0e84db5dce7167523
- Loading branch information