-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
Increase TextField's minimum height from 40 to 48 #42449
Increase TextField's minimum height from 40 to 48 #42449
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Some things I need to check on:
|
56fed8d
to
bf0aca1
Compare
bf0aca1
to
7d53515
Compare
@@ -7249,11 +7250,11 @@ void main() { | |||
|
|||
// Tap the TextField to put the cursor into it and bring it into view. | |||
expect(scrollController.offset, 0.0); | |||
await tester.tap(find.byType(TextField)); | |||
await tester.tapAt(tester.getTopLeft(find.byType(TextField))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems weird... I don't know why it isn't receiving a tap with the previous line now. If anyone has a hunch please let me know.
Goldens are being updated here: flutter/goldens#58 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and its nice to see that such a big change can be accomplished with such a small change.
I think we might want to make isDense:true an exception to the min height = 48; just restore the original behavior in that case
This should probably utilize https://api.flutter.dev/flutter/material/MaterialTapTargetSize-class.html in some way to avoid extra padding where it doesn't matter, like desktop |
…ug for 0.0 constrained inputs
I discussed the MaterialTapTargetSize offline and we decided to leave it out of this PR in anticipation of some upcoming work for Material. |
Draft breaking change email:
|
@Piinks If I still see goldens failures after merging my goldens PR, does that mean it's my fault and the goldens I added don't match? Sorry, I'm forgetting if there's anything else I need to do to update the goldens here. |
Have the version numbers been incremented to match the golden file changes? |
That's it, I knew I forgot something. Thank you! |
#43371 has changed golden file testing, which will need a few minor adjustments here. When you resolve the merge conflicts, the
Take a look at the updated Writing a golden file test for package:flutter, and let me know if I can help migrate this change to the new system. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can we wait to land this until tomorrow?
Also, there are performance improvements that should land by tomorrow AM that will make for a much better experience landing this: |
Yeah that's fine with me! This PR has a breaking change so I don't want to rush it anyway. I will hold off until tomorrow. I've updated the expiration to 2 days. |
Gold updates have landed, and I renewed the ignore on the dashboard. :) |
This is being done to match the Material spec. It will likely break many visual diff tests.
Description
Here are some screenshots for comparison. The red square is just a Container of size 48x48 as a reference. The green is the background of the TextField.
Related Issues
Closes #41200
Tests
I added two tests to verify the minimum height is preserved for the default case and the case where text is very small. I also updated the numbers in tons of tests to reflect the new dimensions.
Breaking Change
This will break many visual diff tests due to the change in size of default TextFields and the change in the location of the baseline. I will follow the breaking changes guildelines after getting code review.