Skip to content

Conversation

@SimonIT
Copy link
Contributor

@SimonIT SimonIT commented May 18, 2019

Description

This PR fixes that a disabled CupertinoTextField has a gray container which overlaps the parent container which his rounded corners.

Before:
CupertinoTextField_enabled_before
CupertinoTextField_disabled_before

After:
CupertinoTextField_enabled_after
CupertinoTextField_disabled_after

(Screenshots from Gallery)

Related Issues

no existing issues

Tests

I added the following tests:

Added a golden test. Thanks to @LongCatIsLooong . The golden file is here: https://github.com/LongCatIsLooong/goldens/blob/dee106cde3112f48ddf236c53a9b602c9f288d71/packages/flutter/test/cupertino/text_field_test.disabled.0.png

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@LongCatIsLooong LongCatIsLooong added a: text input Entering text in a text field or keyboard related problems f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels May 18, 2019
@LongCatIsLooong
Copy link
Contributor

LongCatIsLooong commented May 27, 2019

LGTM. Thank you for reporting and fixing this bug!

@SimonIT Could you fix the merge conflicts and add tests to this PR, so it can be merged?

FWIW, verifying the RRect of the disabled background with a mock canvas (#33380 (comment)) or adding a golden image test (https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter) seem to be promising approaches.

@SimonIT
Copy link
Contributor Author

SimonIT commented May 31, 2019

I never wrote any test for widgets in flutter, so it might take some time

@LongCatIsLooong
Copy link
Contributor

No worries, thank you for taking this on! Writing widget tests should be fairly straightforward. Or if you prefer I can open a new PR on top of c49ed8b and add tests to it.

@SimonIT
Copy link
Contributor Author

SimonIT commented May 31, 2019

That would be very nice if you can do it. For a golden test I have no Linux machine running... Do you want access to my fork? So you can push directly....

LongCatIsLooong added a commit to flutter/goldens that referenced this pull request Jun 1, 2019
@LongCatIsLooong
Copy link
Contributor

Could you update the content of bin/internal/goldens.version to 2eea0c710c4fca4c6655b4efc15b68d4b44cd404?

@SimonIT
Copy link
Contributor Author

SimonIT commented Jun 2, 2019

Anything else that has to be done to get this merged?

@LongCatIsLooong LongCatIsLooong merged commit 683238e into flutter:master Jun 3, 2019
@SimonIT SimonIT deleted the CupertinoTextField branch June 3, 2019 17:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: text input Entering text in a text field or keyboard related problems f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants