Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Aug 14, 2018

Fixes #20483

@jonahwilliams
Copy link
Contributor Author

cc @liyuqian , @Hixie

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

I'm not happy about rolling this into Beta. Although this change fixes the FAB problem, the existence of #20483 implies that no one has reviewed the Flutter gallery since the clipping changes landed.

this.padding,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use
Copy link
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because clipBehavior is defined as a default parameter on RawMaterialButton and we unconditionally pass clipBehavior from all parent widgets, it will end up as null unless we specify it at every level.

Copy link
Contributor

@HansMuller HansMuller Aug 14, 2018

Choose a reason for hiding this comment

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

~~ don't think we should include a clipBehavior parameter here (and etc). ~~

Never mind that. If we clip or otherwise make the splash (the InkWell) conform to the button's shape by default then I can understand adding a clipBehavior to buttons, since typically they don't need to be clipped anyway.

this.disabledElevation = 0.0,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use
Copy link
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

this.padding,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use,
Copy link
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

@liyuqian
Copy link
Contributor

Thanks @jonahwilliams . Sorry that I couldn't be in the office today to fix the issue...

@Hixie
Copy link
Contributor

Hixie commented Aug 14, 2018

This reverts us to the old behavior right?

@jonahwilliams
Copy link
Contributor Author

@Hixie this mostly reverts #20205

@jonahwilliams jonahwilliams merged commit 8de0e15 into flutter:master Aug 15, 2018
@jonahwilliams jonahwilliams deleted the chrome_state branch August 15, 2018 03:23
@a-siva
Copy link
Contributor

a-siva commented Aug 15, 2018

This has caused a regression in the perf benchmark
flutter_gallery_ios32__transition_perf 99th_percentile_frame_rasterizer_time_millis

@jonahwilliams
Copy link
Contributor Author

The revert was necessary to fix several instances of overly aggressive clipping. If the performance is no worse than the last google3 roll and the last beta roll we should still proceed.

@a-siva
Copy link
Contributor

a-siva commented Aug 15, 2018

The performance is no worse than the last beta roll

liyuqian added a commit to liyuqian/flutter that referenced this pull request Aug 17, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FloatingActionButton InkWell is not clipped (rectangle instead of circle)

6 participants