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

[Material] Create material Banner component #36880

Merged
merged 16 commits into from Aug 5, 2019

Conversation

@rami-a
Copy link
Contributor

commented Jul 24, 2019

Description

This PR creates a new material widget for the Banner component. This includes a theme as well. This widget can be dropped into any application, ideally at the top of a listview or scrollview.

Coming later will be a demo in the gallery and the ability to animate the Banner in/out.

Screenshot of the Banner:

Related Issues

#18001

Tests

I added the following tests:

  • Widget tests for the Banner itself.
  • Widget tests for the Banner theme.

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.
rami-a added 5 commits Jul 23, 2019
@googlebot googlebot added the cla: yes label Jul 24, 2019
@rami-a rami-a marked this pull request as ready for review Jul 24, 2019
@rami-a rami-a changed the title WIP - Create material Banner component Create material Banner component Jul 30, 2019
@rami-a rami-a requested review from clocksmith, johnsonmh and willlarche Jul 30, 2019
rami-a added 2 commits Jul 30, 2019
Copy link
Member

left a comment

So awesome and so fast!

packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
Copy link
Contributor

left a comment

LGTM

packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner_theme.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner_theme.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner_theme.dart Outdated Show resolved Hide resolved
rami-a added 3 commits Jul 31, 2019
@rami-a rami-a requested a review from willlarche Jul 31, 2019
@rami-a rami-a changed the title Create material Banner component [Material] Create material Banner component Jul 31, 2019
@rami-a rami-a requested review from HansMuller and removed request for clocksmith Jul 31, 2019
rami-a added 2 commits Jul 31, 2019
Copy link
Contributor

left a comment

This looks great. Just some small-time feedback.

packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner_theme.dart Outdated Show resolved Hide resolved
packages/flutter/lib/src/material/banner_theme.dart Outdated Show resolved Hide resolved
Copy link
Contributor

left a comment

LGTM modulo a const constructor

packages/flutter/lib/src/material/banner.dart Outdated Show resolved Hide resolved
@rami-a rami-a merged commit 35b6d66 into flutter:master Aug 5, 2019
78 of 79 checks passed
78 of 79 checks passed
tool_coverage-linux Task Summary
Details
WIP Ready for review
Details
add2app-macos Task Summary
Details
add2app-macos
Details
analyze Task Summary
Details
analyze
Details
build_tests-linux Task Summary
Details
build_tests-linux
Details
build_tests-macos Task Summary
Details
build_tests-macos
Details
build_tests-windows Task Summary
Details
build_tests-windows
Details
cla/google All necessary CLAs are signed
customer_testing-linux Task Summary
Details
customer_testing-linux
Details
customer_testing-macos Task Summary
Details
customer_testing-macos
Details
customer_testing-windows Task Summary
Details
customer_testing-windows
Details
deploy_gallery Task Summary
Details
deploy_gallery
Details
deploy_gallery-macos Task Summary
Details
deploy_gallery-macos
Details
docs Task Summary
Details
docs
Details
flutter-build
Details
integration_tests-linux Task Summary
Details
integration_tests-linux
Details
integration_tests-macos Task Summary
Details
integration_tests-macos
Details
integration_tests-windows Task Summary
Details
integration_tests-windows
Details
integration_tests_gradle1-linux Task Summary
Details
integration_tests_gradle1-linux
Details
integration_tests_gradle1-windows Task Summary
Details
integration_tests_gradle1-windows
Details
integration_tests_gradle2-linux Task Summary
Details
integration_tests_gradle2-linux
Details
integration_tests_gradle2-windows Task Summary
Details
integration_tests_gradle2-windows
Details
release_smoke_tests Task Summary
Details
release_smoke_tests
Details
tests_extras-linux Task Summary
Details
tests_extras-linux
Details
tests_extras-macos Task Summary
Details
tests_extras-macos
Details
tests_extras-windows Task Summary
Details
tests_extras-windows
Details
tests_framework_other-linux Task Summary
Details
tests_framework_other-linux
Details
tests_framework_other-macos Task Summary
Details
tests_framework_other-macos
Details
tests_framework_other-windows Task Summary
Details
tests_framework_other-windows
Details
tests_widgets-linux Task Summary
Details
tests_widgets-linux
Details
tests_widgets-macos Task Summary
Details
tests_widgets-macos
Details
tests_widgets-windows Task Summary
Details
tests_widgets-windows
Details
tool_coverage-linux
Details
tool_tests-linux Task Summary
Details
tool_tests-linux
Details
tool_tests-macos Task Summary
Details
tool_tests-macos
Details
tool_tests-windows Task Summary
Details
tool_tests-windows
Details
tool_tests_create-linux Task Summary
Details
tool_tests_create-linux
Details
tool_tests_create-macos Task Summary
Details
tool_tests_create-macos
Details
tool_tests_create-windows Task Summary
Details
tool_tests_create-windows
Details
tool_tests_integration-linux Task Summary
Details
tool_tests_integration-linux
Details
tool_tests_integration-macos Task Summary
Details
tool_tests_integration-macos
Details
tool_tests_integration-windows Task Summary
Details
tool_tests_integration-windows
Details
@rami-a rami-a deleted the rami-a:feature-18001-banner branch Aug 5, 2019
darrenaustin added a commit to darrenaustin/flutter that referenced this pull request Aug 5, 2019
This PR creates a new material widget for the Banner component. This includes a theme as well. This widget can be dropped into any application, ideally at the top of a listview or scrollview.

(cherry picked from commit 35b6d66)

Removed the use of ButtonTheme.bar in the Banner implementation.
darrenaustin added a commit that referenced this pull request Aug 20, 2019
* Added new ButtonBarTheme to replace the deprecated ButtonTheme.bar method.

* Responding to PR feedback.

* [Material] Create material Banner component (#36880)

This PR creates a new material widget for the Banner component. This includes a theme as well. This widget can be dropped into any application, ideally at the top of a listview or scrollview.

(cherry picked from commit 35b6d66)

Removed the use of ButtonTheme.bar in the Banner implementation.

* Updated documentation from PR review comments.
@milhomem

This comment has been minimized.

Copy link

commented Oct 4, 2019

What happened with the part:

Banners that appear after a screen loads should animate on screen from the top of a layout. If the banner is at the same elevation as content, it pushes content downwards.

The hard part of the component for us is the animations and having it fixed on the screen.

Is there any plan to have it fully implemented? Can our team help somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.