Skip to content

Conversation

Albert221
Copy link
Contributor

@Albert221 Albert221 commented Oct 2, 2020

Description

Fixes #48042. Adds a horizontal margin to the SnackBar action, according to Material Design guidelines.

As you can see on the first screenshot below (before), the SnackBarAction does not have any space between the right button border and the right snackbar border which is not a correct appearance according to Material Design guidelines

Before

image

After

image
image

Related Issues

#48042

Tests

I added the following tests:

  • SnackBar has correct end padding when it contains an action with fixed behavior
  • SnackBar has correct end padding when it contains an action with floating behavior

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

Did any tests fail when you ran them? Please read Handling breaking changes.

Yes, I changed some of the existing tests, but they weren't following the spec in Material Design guidelines too. That change is really cosmetic, I don't think there is a need for a migration guide or a design doc.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. work in progress; do not review labels Oct 2, 2020
@Albert221 Albert221 marked this pull request as ready for review October 2, 2020 21:49
@Albert221 Albert221 changed the title Add missing margin to SnackBarAction [NOT WIP] Add missing margin to SnackBarAction Oct 2, 2020
@goderbauer goderbauer changed the title [NOT WIP] Add missing margin to SnackBarAction Add missing margin to SnackBarAction Oct 2, 2020
@HansMuller HansMuller requested a review from Piinks October 8, 2020 23:37
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Hi @Albert221 welcome! And thank you for the contribution. It looks like there is a merge conflict, can you update your change to resolve it?

@Piinks
Copy link
Contributor

Piinks commented Oct 14, 2020

It looks like the latest update included the NNBD migration of the test files you are working in, so your tests will need to be null safe. That should resolve the test failures here.

@Albert221
Copy link
Contributor Author

Of course, here's the fixed version!

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Flutter_LGTM

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

SnackBarAction doesn't have right margin
5 participants