Skip to content

Fixed an issue with FilterChips changing size when selected.#111916

Merged
darrenaustin merged 1 commit intoflutter:masterfrom
darrenaustin:m3_chip_size_issue
Sep 19, 2022
Merged

Fixed an issue with FilterChips changing size when selected.#111916
darrenaustin merged 1 commit intoflutter:masterfrom
darrenaustin:m3_chip_size_issue

Conversation

@darrenaustin
Copy link
Contributor

As pointed out in #111038, the size of the FilterChip would change if it was selected or not. This made it hard to line up these chips in a row as they would bounce around as selection changed.

This was due to the fact that we were not adding a border for the selected case. This meant that the size would be off by the size of the border. To fix this we are just using a transparent border of the same size to ensure it will be the same size as the unselected which do have a border.

Fixes: #111038

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Sep 19, 2022
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

@darrenaustin darrenaustin merged commit ba48960 into flutter:master Sep 19, 2022
@darrenaustin darrenaustin deleted the m3_chip_size_issue branch September 19, 2022 22:29
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. 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.

Material 3 Selectable Chips change size when clicked

2 participants