Skip to content

Conversation

@perclasson
Copy link
Contributor

@perclasson perclasson commented Sep 27, 2019

Description

For chips with background color set the ripple is not in the foreground, but behind the chip.
Reason for this bug is described here:
https://api.flutter.dev/flutter/material/InkResponse-class.html#the-ink-splashes-arent-visible

Screenshot before:
before the ink response was behind the chip

Screenshot after:
after the ink response is now shown

Related Issues

#41461 [Chip] Delete icon ripple not visible for Chip when background color is set

Tests

I added the following tests:
packages/flutter/test/material/chip_test.dart
'Chips should use Ink instead of Container for delete icon ripple'

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.

@perclasson perclasson self-assigned this Sep 27, 2019
@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 27, 2019
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to test that the ink renders in the foreground without testing the implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a test for this now.

@perclasson perclasson force-pushed the fix_material_chip_bug branch from fb6ca90 to 3319984 Compare October 2, 2019 08:23
@perclasson perclasson force-pushed the fix_material_chip_bug branch from 3319984 to 14c1e57 Compare October 2, 2019 08:23
@perclasson perclasson force-pushed the fix_material_chip_bug branch from 14c1e57 to 300a0ed Compare October 2, 2019 08:24
Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

LGTM

@willlarche willlarche force-pushed the fix_material_chip_bug branch from 741dd65 to 428e1d8 Compare October 11, 2019 16:17
@perclasson perclasson requested review from HansMuller and removed request for Piinks and jmagman October 11, 2019 16:17
@Piinks Piinks added the a: fidelity Matching the OEM platforms better label Oct 17, 2019
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM with a few small suggestions.

@perclasson perclasson requested a review from clocksmith October 23, 2019 17:30
@perclasson perclasson merged commit 588275e into flutter:master Oct 24, 2019
jonahwilliams pushed a commit that referenced this pull request Oct 24, 2019
…or chips with background color (#41463)"

This reverts commit 588275e.
jonahwilliams pushed a commit that referenced this pull request Oct 24, 2019
…or chips with background color (#41463)" (#43391)

This reverts commit 588275e.
@perclasson
Copy link
Contributor Author

This PR was conflicting with the following PR and thus a test for this branch failed on master:
#42779

Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
… with background color (flutter#41463)

* Make sure InkResponse is visible on delete for chips with background color set

* Override computeDistanceToActualBaseline in layout builder
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: fidelity Matching the OEM platforms better f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants