[RenderEditable] report real height when maxLines == 1. #112029
[RenderEditable] report real height when maxLines == 1. #112029auto-submit[bot] merged 17 commits intoflutter:masterfrom
RenderEditable] report real height when maxLines == 1. #112029Conversation
11e22ae to
8725a6b
Compare
8725a6b to
cfab6de
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
e54fad9 to
0d15d46
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
c33fd3b to
a72723b
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #112029 at sha a72723bfb607a2e9747327cf0a882515ce3a63d5 |
a72723b to
933b32c
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
justinmc
left a comment
There was a problem hiding this comment.
LGTM 👍 but take a look at your TODO below that you might want to still handle in this PR.
Thanks for fixing this and for splitting it out of your other PR.
| List<ui.LineMetrics> computeLineMetrics() { | ||
| assert(_debugAssertTextLayoutIsValid); | ||
| return _lineMetricsCache ??= _paragraph!.computeLineMetrics(); | ||
| return _lineMetricsCache ??= _paragraph!.computeLineMetrics(); |
| int count = 0; | ||
| for (int index = 0; index < text.length; index += 1) { | ||
| // TODO(LongCatIsLooong): account for other line terminators, or get it | ||
| // from ui.Paragraph. |
There was a problem hiding this comment.
Did you mean to handle this in this PR?
There was a problem hiding this comment.
Added other line breakers in. But still it would be better to let skparagraph handle that.
| for (int index = 0; index < text.length; index += 1) { | ||
| // TODO(LongCatIsLooong): account for other line terminators, or get it | ||
| // from ui.Paragraph. | ||
| count += text.codeUnitAt(index) == 0x0A ? 1 : 0; |
There was a problem hiding this comment.
Nit: Maybe make 0x0A a constant for clarity about what it is, depending on your TODO above.
| return child!.getMaxIntrinsicHeight(width); | ||
| } | ||
| return 0.0; | ||
| return child?.getMaxIntrinsicHeight(width) ?? 0.0; |
0c2fae6 to
8faf248
Compare
8faf248 to
b07ef1e
Compare
|
auto label is removed for flutter/flutter, pr: 112029, due to - The status or check suite ci.yaml validation has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Another one extracted from #110966.
When
maxLines == 1RenderEditablecan't be scrolled vertically to reveal clipped contents so it must report its real height (instead of the estimated heightpreferredLineHeight). I'll try to fix #112123 after this and removes the hack in a later pull request.Running TGP.TGP passed with no scuba changes.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.