Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update icon button splash radius to prevent overflow in appbar #64717

Closed
wants to merge 3 commits into from
Closed

Update icon button splash radius to prevent overflow in appbar #64717

wants to merge 3 commits into from

Conversation

sidrao2006
Copy link
Contributor

Solves issue #64702

Description

As mentioned in issue #64702 , the icon button splash (which is auto generated) always overflows. Hence by reducing the splash radius, the overflow is prevented.

Related Issues

Issue #64702

Checklist

  • 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 read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • 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

  • No, this is not a breaking change.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Aug 27, 2020
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

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

Updated dartdoc comments to match changes
@sidrao2006
Copy link
Contributor Author

@Hixie, please exempt this PR from tests as it only updates the value of the IconButton's splashRadius property.
If this is not possible, I will definitely add tests.

@sidrao2006
Copy link
Contributor Author

@TahaTesser , @pedromassango , @dnfield
Can you please look into this PR?

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

We should not change the default for sake of a different widget. Is it not possible to set the parameter when. Using this in an app bar?

This also is too small for a11y guidelines.

@sidrao2006
Copy link
Contributor Author

@dnfield , it is possible to manually set the splashRadius, however it is not possible to set it for auto generated IconButtons

@dnfield
Copy link
Contributor

dnfield commented Aug 27, 2020

This change affects the size of the whole button, not just the splash radius.

@sidrao2006
Copy link
Contributor Author

@dnfield , I am really sorry, I meant to change the splash radius.
I will revert the change and make the necessary changes

Updated `splashRadius`. Reverted changes to `iconSize`
@dnfield
Copy link
Contributor

dnfield commented Aug 27, 2020

It's still not clear to me why we would change the default here. Someone from material would know better but this is probably not what the spec wants now.

Ill comment on your issue as well, but why not just pass your desired radius for app bars instead of changing it everywhere?

I would also expect this change to fail tests.

@sidrao2006
Copy link
Contributor Author

@dnfield , as you suggested, the IconButton's splashRadius can be set manually, however it is not possible to manually set the splashradius for auto-generated buttons like the back button and the open drawer button.

@sidrao2006
Copy link
Contributor Author

Ill comment on your issue as well, but why not just pass your desired radius for app bars instead of changing it everywhere?

I have set the value as 20 because it is approximately the maximum value that does not cause the splash to overflow in accordance with the AppBar

@sidrao2006 sidrao2006 changed the title Updated material's icon button to prevent overflow in appbar Update icon button splash to prevent overflow in appbar Aug 27, 2020
@sidrao2006 sidrao2006 changed the title Update icon button splash to prevent overflow in appbar Update icon button splash radius to prevent overflow in appbar Aug 27, 2020
@Hixie
Copy link
Contributor

Hixie commented Aug 27, 2020

The overflow is intentional, though maybe the material spec has changed since we implemented this.

In any case, this kind of change would definitely need tests. (Probably golden image tests.)

@sidrao2006
Copy link
Contributor Author

Please follow up on #64789

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

None yet

4 participants