Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Apr 11, 2024

Description

This PRs fixes the active indicator vertical position for a filled text field.
Before this PR, the active indicator overflowed of container bounds, After this PR the active indicator is painted inside the container bounds.

Screenshot of filled text field with active indicator width sets to 4.0dp:

Before After
image image

Related Issue

Fixes #146507

Tests

Adds 1 tests, updates 3 tests.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Apr 11, 2024
@bleroux bleroux requested a review from justinmc April 11, 2024 15:02
@flutter-dashboard
Copy link

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 package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #146637 at sha b6d191b

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Apr 11, 2024
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM as long as the Google tests pass 👍

@justinmc
Copy link
Contributor

justinmc commented Apr 12, 2024

The failing Google tests were expected image diff tests, which I've approved. This PR seems to be affecting the antialiasing of the border sometimes, for the record. I especially notice it in unfocused fields. I think it either looks a little more crisp or a little more blurry depending on where the border falls in between pixels I guess. Nothing that should change in this PR, though.

I'm interested to see if this affects #145087 (comment).

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 15, 2024
@auto-submit auto-submit bot merged commit 63634c2 into flutter:master Apr 15, 2024
@bleroux bleroux deleted the fix_filled_text_field_active_indicator_overflows branch April 15, 2024 07:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 15, 2024
Manual roll requested by tarrinneal@google.com

flutter/flutter@53cba24...2e748e8

2024-04-15 nate.w5687@gmail.com Implementing control flow collections (flutter/flutter#146601)
2024-04-15 engine-flutter-autoroll@skia.org Roll Packages from 78f684c to 6698b2d (3 revisions) (flutter/flutter#146761)
2024-04-15 32538273+ValentinVignal@users.noreply.github.com test: Fix memory leak in transitions test (flutter/flutter#146747)
2024-04-15 leroux_bruno@yahoo.fr Fix filled text field active indicator overflows container bounds (flutter/flutter#146637)
2024-04-14 102401667+Dimilkalathiya@users.noreply.github.com - Fixes _DropdownMenuState leaking text controller (flutter/flutter#146571)
2024-04-13 32538273+ValentinVignal@users.noreply.github.com Fix memory leaks in `FloatingActionButton` (flutter/flutter#146711)
2024-04-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0e56e3dffe43 to 1a13c7d1f40e (2 revisions) (flutter/flutter#146703)
2024-04-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146704)
2024-04-12 49699333+dependabot[bot]@users.noreply.github.com Bump peter-evans/create-pull-request from 6.0.2 to 6.0.3 (flutter/flutter#146702)
2024-04-12 chingjun@google.com Avoid forwarding the data after socket is disconnected. (flutter/flutter#146665)
2024-04-12 christopherfujino@gmail.com [flutter_tools] Fix conductor for package args roll (flutter/flutter#146646)
2024-04-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b37b170998e to 0e56e3dffe43 (4 revisions) (flutter/flutter#146698)
2024-04-12 katelovett@google.com Light sliver clean up before SliverTree (flutter/flutter#146696)
2024-04-12 leroux_bruno@yahoo.fr Fix label text color is wrong for a focused and hovered TextField (flutter/flutter#146572)
2024-04-12 31859944+LongCatIsLooong@users.noreply.github.com Fix `getOffsetForCaret` crash (flutter/flutter#146669)
2024-04-12 magder@google.com Update gen_keycodes templates (flutter/flutter#146481)
2024-04-12 jacksongardner@google.com Support `flutter run --wasm` and `flutter drive --wasm`. (flutter/flutter#146231)
2024-04-12 32538273+ValentinVignal@users.noreply.github.com Fix curved animation memory leak for scrollbar (flutter/flutter#146670)
2024-04-12 engine-flutter-autoroll@skia.org Roll Packages from e98839a to 78f684c (6 revisions) (flutter/flutter#146691)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gilnobrega pushed a commit to gilnobrega/flutter that referenced this pull request Apr 22, 2024
…utter#146637)

## Description

This PRs fixes the active indicator vertical position for a filled text field.
Before this PR, the active indicator overflowed of container bounds, After this PR the active indicator is painted inside the container bounds.

Screenshot of filled text field with active indicator width sets to 4.0dp:

| Before | After |
|--------|--------|
| ![image](https://github.com/flutter/flutter/assets/840911/ed2878ba-130a-4410-b170-423d00a8893d) | ![image](https://github.com/flutter/flutter/assets/840911/f78d06c0-a161-4ab6-b01f-dae297939956) | 

</details> 

## Related Issue

Fixes flutter#146507

## Tests

Adds 1 tests, updates 3 tests.
auto-submit bot pushed a commit that referenced this pull request May 16, 2024
This is a reland of #145087 which was reverted in #145168.

#146637 was merged and might help here.

## Description

`InputDecorator` adds a 8.0 gap beetween the container and the helper text.
From the Material 3 specification, this gap should be 4.0.
See https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57.

This PR sets the correct values for M3 without changing the value for M2.

| Before | After | M3 Spec |
|--------|--------|--------|
| ![image](https://github.com/flutter/flutter/assets/840911/9947f334-d98f-4f7e-9da7-ca6d5c0770ac) | ![image](https://github.com/flutter/flutter/assets/840911/081dec4b-eb9f-4eee-a7dc-2538e7110ff0)| ![image](https://github.com/flutter/flutter/assets/840911/c8c8f045-3b79-43a5-a1a3-cc6d5460644f) |

If this change is accepted, a future step will be to make this value configurable, probably by `InputDecorationTheme`.

## Related Issue

Fixes #144984

## Tests

Updates a value used by several existing tests.
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
)

Manual roll requested by tarrinneal@google.com

flutter/flutter@53cba24...2e748e8

2024-04-15 nate.w5687@gmail.com Implementing control flow collections (flutter/flutter#146601)
2024-04-15 engine-flutter-autoroll@skia.org Roll Packages from 78f684c to 6698b2d (3 revisions) (flutter/flutter#146761)
2024-04-15 32538273+ValentinVignal@users.noreply.github.com test: Fix memory leak in transitions test (flutter/flutter#146747)
2024-04-15 leroux_bruno@yahoo.fr Fix filled text field active indicator overflows container bounds (flutter/flutter#146637)
2024-04-14 102401667+Dimilkalathiya@users.noreply.github.com - Fixes _DropdownMenuState leaking text controller (flutter/flutter#146571)
2024-04-13 32538273+ValentinVignal@users.noreply.github.com Fix memory leaks in `FloatingActionButton` (flutter/flutter#146711)
2024-04-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0e56e3dffe43 to 1a13c7d1f40e (2 revisions) (flutter/flutter#146703)
2024-04-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#146704)
2024-04-12 49699333+dependabot[bot]@users.noreply.github.com Bump peter-evans/create-pull-request from 6.0.2 to 6.0.3 (flutter/flutter#146702)
2024-04-12 chingjun@google.com Avoid forwarding the data after socket is disconnected. (flutter/flutter#146665)
2024-04-12 christopherfujino@gmail.com [flutter_tools] Fix conductor for package args roll (flutter/flutter#146646)
2024-04-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b37b170998e to 0e56e3dffe43 (4 revisions) (flutter/flutter#146698)
2024-04-12 katelovett@google.com Light sliver clean up before SliverTree (flutter/flutter#146696)
2024-04-12 leroux_bruno@yahoo.fr Fix label text color is wrong for a focused and hovered TextField (flutter/flutter#146572)
2024-04-12 31859944+LongCatIsLooong@users.noreply.github.com Fix `getOffsetForCaret` crash (flutter/flutter#146669)
2024-04-12 magder@google.com Update gen_keycodes templates (flutter/flutter#146481)
2024-04-12 jacksongardner@google.com Support `flutter run --wasm` and `flutter drive --wasm`. (flutter/flutter#146231)
2024-04-12 32538273+ValentinVignal@users.noreply.github.com Fix curved animation memory leak for scrollbar (flutter/flutter#146670)
2024-04-12 engine-flutter-autoroll@skia.org Roll Packages from e98839a to 78f684c (6 revisions) (flutter/flutter#146691)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filled text field active indicator overflows container bounds

2 participants