From 4d76e54f83e1d55910e1ec599668df6a18502c7c Mon Sep 17 00:00:00 2001 From: Wenyu Zhang Date: Mon, 18 May 2020 11:48:29 -0700 Subject: [PATCH 01/20] Internal change. PiperOrigin-RevId: 312123414 --- CHANGELOG.md | 34 ------------------- MaterialComponents.podspec | 2 +- MaterialComponentsBeta.podspec | 2 +- MaterialComponentsEarlGreyTests.podspec | 2 +- MaterialComponentsExamples.podspec | 2 +- MaterialComponentsSnapshotTests.podspec | 2 +- VERSION | 2 +- catalog/MDCCatalog/Info.plist | 4 +-- catalog/MDCDragons/Info.plist | 4 +-- .../MaterialCatalog/MaterialCatalog.podspec | 2 +- components/LibraryInfo/src/MDCLibraryInfo.m | 2 +- .../LibraryInfo/tests/unit/LibraryInfoTests.m | 2 +- .../RemoteImageServiceForMDCDemos.podspec | 2 +- 13 files changed, 14 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32350e7c0f2..e34087f6e0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,37 +1,3 @@ -# 109.4.0 - -This minor release adds Theming extension support to MDCBottomDrawerViewController and includes bug fixes and minor refactoring. - -## New features - -- MDCBottomDrawerViewController now has Theming extension support. - -## Component changes - -### AppBar - -* [Add NavigationController example with AppBar initially hidden.](https://github.com/material-components/material-components-ios/commit/dbb9ab1170fda2c4fd571fe682d1af6a84278a8e) (Jeff Verkoeyen) - -### FlexibleHeader - -* [Change links in FlexibleHeader README](https://github.com/material-components/material-components-ios/commit/a31b69ecd1bb89c33bcae5843a309808872889e4) (Andrew Overton) -* [Extract a shifter logical unit.](https://github.com/material-components/material-components-ios/commit/bebb73f5e55ec5b2fe9e6ba8bec57ca2e6b4b4aa) (Jeff Verkoeyen) - -### Tabs - -* [Add support for custom accessibility labels for tab bar items.](https://github.com/material-components/material-components-ios/commit/7335fb5ca9c46a4b27f731724f23c2c4cbdbeec3) (Yarden Eitan) - -## Multi-component changes - -* [ - 51170612999194997e160654411ac87bb61d4764 Automatic changelog preparation for release. by Galia Kaufman - 85feb7896b37c0a93b8c5b5dbcde72403b379dee [Tabs] Update podspec to include new folders. by Galia Kaufman - fbd3f81309b46b9d8e0a6a9dd03e4b63c7794f27 Hand-modified CHANGELOG.md API diff. by Galia Kaufman - 27927ce42748c7afb3ac270b6d6ec64d1c50d3bc Bumped version number to 109.3.1. by Galia Kaufman ](https://github.com/material-components/material-components-ios/commit/2d0d6a8faa6fe7acea7921552a8afe1f656c9088) (Galia Kaufman) -* [Ensure that the FlexibleHeader's position reacts to safeAreaInsets changes when hidden.](https://github.com/material-components/material-components-ios/commit/a502ce66b98101fcc155f98696a974ff91083557) (Jeff Verkoeyen) -* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/0a36a3a12be81c9d2d1d84f15452ed6153c97f74) (Andrew Overton) -* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/1fa6c77ee83f13b2e9711ae182cef5999152f36b) (Andrew Overton) -* [Internal change](https://github.com/material-components/material-components-ios/commit/70716800b8db661d8efa744ab8a3f41e15b99f57) (Nobody) -* [Internal change](https://github.com/material-components/material-components-ios/commit/efea2ddce69e4fdde643fe2e367b1f16b16c9880) (Jeff Verkoeyen) - ---- - # 109.3.1 This hotfix patch release fixes the podspec. Updating the podpsec with new folders that were added in the previous release. diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index e29054e0e95..b485a22c2f7 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb' Pod::Spec.new do |mdc| mdc.name = "MaterialComponents" - mdc.version = "109.4.0" + mdc.version = "109.3.1" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsBeta.podspec b/MaterialComponentsBeta.podspec index 710da33b67b..716372a5b8a 100644 --- a/MaterialComponentsBeta.podspec +++ b/MaterialComponentsBeta.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |mdc| mdc.name = "MaterialComponentsBeta" - mdc.version = "109.4.0" + mdc.version = "109.3.1" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsEarlGreyTests.podspec b/MaterialComponentsEarlGreyTests.podspec index 9c0d08416aa..8e3183f8440 100644 --- a/MaterialComponentsEarlGreyTests.podspec +++ b/MaterialComponentsEarlGreyTests.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsEarlGreyTests" - s.version = "109.4.0" + s.version = "109.3.1" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests." s.description = "This spec is made for use in the MDC Catalog." diff --git a/MaterialComponentsExamples.podspec b/MaterialComponentsExamples.podspec index 12272f3c71e..505bde44ea8 100644 --- a/MaterialComponentsExamples.podspec +++ b/MaterialComponentsExamples.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsExamples" - s.version = "109.4.0" + s.version = "109.3.1" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components examples." s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog." diff --git a/MaterialComponentsSnapshotTests.podspec b/MaterialComponentsSnapshotTests.podspec index 53f64450310..fef8f393c4a 100644 --- a/MaterialComponentsSnapshotTests.podspec +++ b/MaterialComponentsSnapshotTests.podspec @@ -53,7 +53,7 @@ end Pod::Spec.new do |s| s.name = "MaterialComponentsSnapshotTests" - s.version = "109.4.0" + s.version = "109.3.1" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components snapshot tests." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/VERSION b/VERSION index 0aa378dda02..d62ef9f89eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -109.4.0 +109.3.1 diff --git a/catalog/MDCCatalog/Info.plist b/catalog/MDCCatalog/Info.plist index f1dd86e8267..a2e5a3c875b 100644 --- a/catalog/MDCCatalog/Info.plist +++ b/catalog/MDCCatalog/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.4.0 + 109.3.1 CFBundleSignature ???? CFBundleVersion - 109.4.0 + 109.3.1 LSRequiresIPhoneOS UIAppFonts diff --git a/catalog/MDCDragons/Info.plist b/catalog/MDCDragons/Info.plist index 5089db04080..5db388341f2 100644 --- a/catalog/MDCDragons/Info.plist +++ b/catalog/MDCDragons/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.4.0 + 109.3.1 CFBundleVersion - 109.4.0 + 109.3.1 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/catalog/MaterialCatalog/MaterialCatalog.podspec b/catalog/MaterialCatalog/MaterialCatalog.podspec index 7e68bd20dbd..5e6f7fc3bbc 100644 --- a/catalog/MaterialCatalog/MaterialCatalog.podspec +++ b/catalog/MaterialCatalog/MaterialCatalog.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialCatalog" - s.version = "109.4.0" + s.version = "109.3.1" s.summary = "Helper Objective-C classes for the MDC catalog." s.description = "This spec is made for use in the MDC Catalog." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/components/LibraryInfo/src/MDCLibraryInfo.m b/components/LibraryInfo/src/MDCLibraryInfo.m index 459480d4412..010c609e08b 100644 --- a/components/LibraryInfo/src/MDCLibraryInfo.m +++ b/components/LibraryInfo/src/MDCLibraryInfo.m @@ -19,7 +19,7 @@ // This string is updated automatically as a part of the release process and should not be edited // manually. Do not rename this constant or change the formatting without updating the release // scripts. -static NSString const *MDCLibraryInfoVersionString = @"109.4.0"; +static NSString const *MDCLibraryInfoVersionString = @"109.3.1"; @implementation MDCLibraryInfo diff --git a/components/LibraryInfo/tests/unit/LibraryInfoTests.m b/components/LibraryInfo/tests/unit/LibraryInfoTests.m index 100a2415586..e8da593299b 100644 --- a/components/LibraryInfo/tests/unit/LibraryInfoTests.m +++ b/components/LibraryInfo/tests/unit/LibraryInfoTests.m @@ -26,7 +26,7 @@ - (void)testVersionFormat { // Given // This regex pattern does the following: - // Accept: "109.4.0", etc. + // Accept: "109.3.1", etc. // Reject: "0.0.0", "1.2", "1", "-1.2.3", "Hi, I'm a version 1.2.3", "1.2.3 is my version", etc. // // Note the major version must be >= 1 since "0.0.0" is used as the version when something goes diff --git a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec index 96d5b771749..bc2c748010b 100644 --- a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec +++ b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RemoteImageServiceForMDCDemos" - s.version = "109.4.0" + s.version = "109.3.1" s.summary = "A helper image class for the MDC demos." s.description = "This spec is made for use in the MDC demos. It gets images via url." s.homepage = "https://github.com/material-components/material-components-ios" From 9c26a7e67aa298a57e5a78e22d7fbe5abc6fe34f Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Mon, 18 May 2020 12:22:47 -0700 Subject: [PATCH 02/20] Internal change PiperOrigin-RevId: 312130396 --- CHANGELOG.md | 34 +++++++++++++++++++ MaterialComponents.podspec | 2 +- MaterialComponentsBeta.podspec | 2 +- MaterialComponentsEarlGreyTests.podspec | 2 +- MaterialComponentsExamples.podspec | 2 +- MaterialComponentsSnapshotTests.podspec | 2 +- VERSION | 2 +- catalog/MDCCatalog/Info.plist | 4 +-- catalog/MDCDragons/Info.plist | 4 +-- .../MaterialCatalog/MaterialCatalog.podspec | 2 +- components/LibraryInfo/src/MDCLibraryInfo.m | 2 +- .../LibraryInfo/tests/unit/LibraryInfoTests.m | 2 +- .../RemoteImageServiceForMDCDemos.podspec | 2 +- 13 files changed, 48 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e34087f6e0a..32350e7c0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +# 109.4.0 + +This minor release adds Theming extension support to MDCBottomDrawerViewController and includes bug fixes and minor refactoring. + +## New features + +- MDCBottomDrawerViewController now has Theming extension support. + +## Component changes + +### AppBar + +* [Add NavigationController example with AppBar initially hidden.](https://github.com/material-components/material-components-ios/commit/dbb9ab1170fda2c4fd571fe682d1af6a84278a8e) (Jeff Verkoeyen) + +### FlexibleHeader + +* [Change links in FlexibleHeader README](https://github.com/material-components/material-components-ios/commit/a31b69ecd1bb89c33bcae5843a309808872889e4) (Andrew Overton) +* [Extract a shifter logical unit.](https://github.com/material-components/material-components-ios/commit/bebb73f5e55ec5b2fe9e6ba8bec57ca2e6b4b4aa) (Jeff Verkoeyen) + +### Tabs + +* [Add support for custom accessibility labels for tab bar items.](https://github.com/material-components/material-components-ios/commit/7335fb5ca9c46a4b27f731724f23c2c4cbdbeec3) (Yarden Eitan) + +## Multi-component changes + +* [ - 51170612999194997e160654411ac87bb61d4764 Automatic changelog preparation for release. by Galia Kaufman - 85feb7896b37c0a93b8c5b5dbcde72403b379dee [Tabs] Update podspec to include new folders. by Galia Kaufman - fbd3f81309b46b9d8e0a6a9dd03e4b63c7794f27 Hand-modified CHANGELOG.md API diff. by Galia Kaufman - 27927ce42748c7afb3ac270b6d6ec64d1c50d3bc Bumped version number to 109.3.1. by Galia Kaufman ](https://github.com/material-components/material-components-ios/commit/2d0d6a8faa6fe7acea7921552a8afe1f656c9088) (Galia Kaufman) +* [Ensure that the FlexibleHeader's position reacts to safeAreaInsets changes when hidden.](https://github.com/material-components/material-components-ios/commit/a502ce66b98101fcc155f98696a974ff91083557) (Jeff Verkoeyen) +* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/0a36a3a12be81c9d2d1d84f15452ed6153c97f74) (Andrew Overton) +* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/1fa6c77ee83f13b2e9711ae182cef5999152f36b) (Andrew Overton) +* [Internal change](https://github.com/material-components/material-components-ios/commit/70716800b8db661d8efa744ab8a3f41e15b99f57) (Nobody) +* [Internal change](https://github.com/material-components/material-components-ios/commit/efea2ddce69e4fdde643fe2e367b1f16b16c9880) (Jeff Verkoeyen) + +--- + # 109.3.1 This hotfix patch release fixes the podspec. Updating the podpsec with new folders that were added in the previous release. diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index b485a22c2f7..e29054e0e95 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb' Pod::Spec.new do |mdc| mdc.name = "MaterialComponents" - mdc.version = "109.3.1" + mdc.version = "109.4.0" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsBeta.podspec b/MaterialComponentsBeta.podspec index 716372a5b8a..710da33b67b 100644 --- a/MaterialComponentsBeta.podspec +++ b/MaterialComponentsBeta.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |mdc| mdc.name = "MaterialComponentsBeta" - mdc.version = "109.3.1" + mdc.version = "109.4.0" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsEarlGreyTests.podspec b/MaterialComponentsEarlGreyTests.podspec index 8e3183f8440..9c0d08416aa 100644 --- a/MaterialComponentsEarlGreyTests.podspec +++ b/MaterialComponentsEarlGreyTests.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsEarlGreyTests" - s.version = "109.3.1" + s.version = "109.4.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests." s.description = "This spec is made for use in the MDC Catalog." diff --git a/MaterialComponentsExamples.podspec b/MaterialComponentsExamples.podspec index 505bde44ea8..12272f3c71e 100644 --- a/MaterialComponentsExamples.podspec +++ b/MaterialComponentsExamples.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsExamples" - s.version = "109.3.1" + s.version = "109.4.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components examples." s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog." diff --git a/MaterialComponentsSnapshotTests.podspec b/MaterialComponentsSnapshotTests.podspec index fef8f393c4a..53f64450310 100644 --- a/MaterialComponentsSnapshotTests.podspec +++ b/MaterialComponentsSnapshotTests.podspec @@ -53,7 +53,7 @@ end Pod::Spec.new do |s| s.name = "MaterialComponentsSnapshotTests" - s.version = "109.3.1" + s.version = "109.4.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components snapshot tests." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/VERSION b/VERSION index d62ef9f89eb..0aa378dda02 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -109.3.1 +109.4.0 diff --git a/catalog/MDCCatalog/Info.plist b/catalog/MDCCatalog/Info.plist index a2e5a3c875b..f1dd86e8267 100644 --- a/catalog/MDCCatalog/Info.plist +++ b/catalog/MDCCatalog/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.3.1 + 109.4.0 CFBundleSignature ???? CFBundleVersion - 109.3.1 + 109.4.0 LSRequiresIPhoneOS UIAppFonts diff --git a/catalog/MDCDragons/Info.plist b/catalog/MDCDragons/Info.plist index 5db388341f2..5089db04080 100644 --- a/catalog/MDCDragons/Info.plist +++ b/catalog/MDCDragons/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.3.1 + 109.4.0 CFBundleVersion - 109.3.1 + 109.4.0 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/catalog/MaterialCatalog/MaterialCatalog.podspec b/catalog/MaterialCatalog/MaterialCatalog.podspec index 5e6f7fc3bbc..7e68bd20dbd 100644 --- a/catalog/MaterialCatalog/MaterialCatalog.podspec +++ b/catalog/MaterialCatalog/MaterialCatalog.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialCatalog" - s.version = "109.3.1" + s.version = "109.4.0" s.summary = "Helper Objective-C classes for the MDC catalog." s.description = "This spec is made for use in the MDC Catalog." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/components/LibraryInfo/src/MDCLibraryInfo.m b/components/LibraryInfo/src/MDCLibraryInfo.m index 010c609e08b..459480d4412 100644 --- a/components/LibraryInfo/src/MDCLibraryInfo.m +++ b/components/LibraryInfo/src/MDCLibraryInfo.m @@ -19,7 +19,7 @@ // This string is updated automatically as a part of the release process and should not be edited // manually. Do not rename this constant or change the formatting without updating the release // scripts. -static NSString const *MDCLibraryInfoVersionString = @"109.3.1"; +static NSString const *MDCLibraryInfoVersionString = @"109.4.0"; @implementation MDCLibraryInfo diff --git a/components/LibraryInfo/tests/unit/LibraryInfoTests.m b/components/LibraryInfo/tests/unit/LibraryInfoTests.m index e8da593299b..100a2415586 100644 --- a/components/LibraryInfo/tests/unit/LibraryInfoTests.m +++ b/components/LibraryInfo/tests/unit/LibraryInfoTests.m @@ -26,7 +26,7 @@ - (void)testVersionFormat { // Given // This regex pattern does the following: - // Accept: "109.3.1", etc. + // Accept: "109.4.0", etc. // Reject: "0.0.0", "1.2", "1", "-1.2.3", "Hi, I'm a version 1.2.3", "1.2.3 is my version", etc. // // Note the major version must be >= 1 since "0.0.0" is used as the version when something goes diff --git a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec index bc2c748010b..96d5b771749 100644 --- a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec +++ b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RemoteImageServiceForMDCDemos" - s.version = "109.3.1" + s.version = "109.4.0" s.summary = "A helper image class for the MDC demos." s.description = "This spec is made for use in the MDC demos. It gets images via url." s.homepage = "https://github.com/material-components/material-components-ios" From 09171d15c71e762844bf697f7f9c3541a0179854 Mon Sep 17 00:00:00 2001 From: Galia Kaufman Date: Tue, 19 May 2020 05:26:48 -0700 Subject: [PATCH 03/20] [AppBar] Fix a failing snapshot test PiperOrigin-RevId: 312260009 --- components/AppBar/examples/AppBarPresentedHiddenExample.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/AppBar/examples/AppBarPresentedHiddenExample.m b/components/AppBar/examples/AppBarPresentedHiddenExample.m index fb2ff4f8b1b..6b42fc311eb 100644 --- a/components/AppBar/examples/AppBarPresentedHiddenExample.m +++ b/components/AppBar/examples/AppBarPresentedHiddenExample.m @@ -17,6 +17,7 @@ #import "AppBarSampleViewController.h" #import "MaterialAppBar.h" #import "MaterialAppBar+Theming.h" +#import "MaterialAvailability.h" #import "MaterialButtons.h" #import "MaterialButtons+Theming.h" #import "MaterialContainerScheme.h" @@ -106,11 +107,15 @@ - (void)testPresentedFullScreen { - (void)testPresentedAutomatic { [self dismissViewControllerAnimated:NO completion:nil]; +#if MDC_AVAILABLE_SDK_IOS(13_0) if (@available(iOS 13, *)) { [self presentDemoAnimated:NO modalPresentationStyle:UIModalPresentationAutomatic]; } else { [self presentDemoAnimated:NO modalPresentationStyle:UIModalPresentationFullScreen]; } +#else + [self presentDemoAnimated:NO modalPresentationStyle:UIModalPresentationFullScreen]; +#endif } @end From 3fc4f0cb472ef91e4761076f5f6444d6bb99aac0 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Tue, 19 May 2020 05:31:59 -0700 Subject: [PATCH 04/20] [FlexibleHeader] Move ShiftBehaviorForCurrentAppContext into the MDCFlexibleHeaderShifter. This is a step towards moving more of the shift behavior-related logic into a smaller, better tested logical unit. PiperOrigin-RevId: 312260829 --- .../src/MDCFlexibleHeaderView.m | 12 ++---------- .../src/private/MDCFlexibleHeaderShifter.h | 17 +++++++++++++++++ .../src/private/MDCFlexibleHeaderShifter.m | 13 +++++++++++++ .../tests/unit/FlexibleHeaderShifterTests.m | 19 +++++++++++++++++++ 4 files changed, 51 insertions(+), 10 deletions(-) diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m index cdbe3b5e70f..f450db91dc7 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m @@ -72,15 +72,6 @@ // KVO contexts static char *const kKVOContextMDCFlexibleHeaderView = "kKVOContextMDCFlexibleHeaderView"; -static inline MDCFlexibleHeaderShiftBehavior ShiftBehaviorForCurrentAppContext( - MDCFlexibleHeaderShiftBehavior intendedShiftBehavior) { - if ([[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"] && - intendedShiftBehavior == MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar) { - return MDCFlexibleHeaderShiftBehaviorEnabled; - } - return intendedShiftBehavior; -} - @interface MDCFlexibleHeaderView () @@ -1785,7 +1776,8 @@ - (void)setShiftBehavior:(MDCFlexibleHeaderShiftBehavior)shiftBehavior { @"Flexible Header shift behavior must be disabled before content offset observation is" @" enabled."); - shiftBehavior = ShiftBehaviorForCurrentAppContext(shiftBehavior); + shiftBehavior = [MDCFlexibleHeaderShifter behaviorForCurrentContextFromBehavior:shiftBehavior]; + if (_shifter.behavior == shiftBehavior) { return; } diff --git a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h index 26ae6024ef9..4af095002c7 100644 --- a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h +++ b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h @@ -21,6 +21,8 @@ */ __attribute__((objc_subclassing_restricted)) @interface MDCFlexibleHeaderShifter : NSObject +#pragma mark - Behavior + /** The behavior of the header's vertical movement. @@ -28,4 +30,19 @@ __attribute__((objc_subclassing_restricted)) @interface MDCFlexibleHeaderShifter */ @property(nonatomic) MDCFlexibleHeaderShiftBehavior behavior; +/** + Returns a valid behavior for the current application context. + + Not all behaviors are usable in all application contexts. In app extensions, for example, it is not + possible to adjust the status bar's positioning. This method should be used to adjust a desired + behavior to the current context's supported behaviors. + + @param behavior The shift behavior that was originally desired. + @returns If the code is running in an app extension, then + MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar will be returned as + MDCFlexibleHeaderShiftBehaviorEnabled. In all other contexts, @c behavior is returned unmodified. + */ ++ (MDCFlexibleHeaderShiftBehavior)behaviorForCurrentContextFromBehavior: + (MDCFlexibleHeaderShiftBehavior)behavior; + @end diff --git a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m index a6c2b250a0a..6dc90617929 100644 --- a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m +++ b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m @@ -14,6 +14,9 @@ #import "MDCFlexibleHeaderShifter.h" +// The suffix for an app extension bundle path. +static NSString *const kAppExtensionSuffix = @".appex"; + @implementation MDCFlexibleHeaderShifter - (instancetype)init { @@ -24,4 +27,14 @@ - (instancetype)init { return self; } ++ (MDCFlexibleHeaderShiftBehavior)behaviorForCurrentContextFromBehavior: + (MDCFlexibleHeaderShiftBehavior)behavior { + // In app extensions we do not allow shifting with the status bar. + if ([[[NSBundle mainBundle] bundlePath] hasSuffix:kAppExtensionSuffix] && + behavior == MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar) { + return MDCFlexibleHeaderShiftBehaviorEnabled; + } + return behavior; +} + @end diff --git a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m index 4ec3f73a366..8e270648991 100644 --- a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m +++ b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m @@ -40,4 +40,23 @@ - (void)testBehaviorSetterPersistsTheSetValue { XCTAssertEqual(shifter.behavior, MDCFlexibleHeaderShiftBehaviorEnabled); } +#pragma mark - +behaviorForCurrentContextFromBehavior: + +- (void)testBehaviorForGivenContextReturnsSameContext { + // TODO(b/156978412): Test this in an app extension target as well. + XCTAssertEqual([MDCFlexibleHeaderShifter + behaviorForCurrentContextFromBehavior:MDCFlexibleHeaderShiftBehaviorDisabled], + MDCFlexibleHeaderShiftBehaviorDisabled); + XCTAssertEqual([MDCFlexibleHeaderShifter + behaviorForCurrentContextFromBehavior:MDCFlexibleHeaderShiftBehaviorEnabled], + MDCFlexibleHeaderShiftBehaviorEnabled); + XCTAssertEqual( + [MDCFlexibleHeaderShifter + behaviorForCurrentContextFromBehavior:MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar], + MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar); + XCTAssertEqual([MDCFlexibleHeaderShifter + behaviorForCurrentContextFromBehavior:MDCFlexibleHeaderShiftBehaviorHideable], + MDCFlexibleHeaderShiftBehaviorHideable); +} + @end From 5b8abd6659b5c2ea71c18cb4ea8c6d04310f19ec Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Tue, 19 May 2020 06:31:13 -0700 Subject: [PATCH 05/20] [FlexibleHeader] Turn MDCFlexibleHeaderShiftBehavior into an extensible enum. PiperOrigin-RevId: 312267643 --- .../src/MDCFlexibleHeaderView+ShiftBehavior.h | 42 +++++++++---------- .../src/MDCFlexibleHeaderView.m | 5 +++ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h b/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h index 3bc563385dc..e2b12e6c72a 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h @@ -22,33 +22,33 @@ Enabling shifting allows the header to enter the @c MDCFlexibleHeaderScrollPhaseShifting scroll phase. */ -typedef NS_ENUM(NSInteger, MDCFlexibleHeaderShiftBehavior) { +typedef NSInteger MDCFlexibleHeaderShiftBehavior NS_TYPED_EXTENSIBLE_ENUM; - /** Header's y position never changes in reaction to scroll events. */ - MDCFlexibleHeaderShiftBehaviorDisabled, +/** Header's y position never changes in reaction to scroll events. */ +FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorDisabled; - /** When fully-collapsed, the header translates vertically in reaction to scroll events. */ - MDCFlexibleHeaderShiftBehaviorEnabled, +/** When fully-collapsed, the header translates vertically in reaction to scroll events. */ +FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorEnabled; - /** - When fully-collapsed, the header translates vertically in reaction to scroll events along with - the status bar. +/** + When fully-collapsed, the header translates vertically in reaction to scroll events along with + the status bar. - If used with a vertically-paging scroll view, this behavior acts like - MDCFlexibleHeaderShiftBehaviorEnabled. - */ - MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar, + If used with a vertically-paging scroll view, this behavior acts like + MDCFlexibleHeaderShiftBehaviorEnabled. + */ +FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior + MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar; - /** - Allows the header to be shifted on- and off-screen only via the @c shiftHeaderOnScreenAnimated: - and @c shiftHeaderOffScreenAnimated APIs. Scroll events will not affect the visibility of the - header. +/** + Allows the header to be shifted on- and off-screen only via the @c shiftHeaderOnScreenAnimated: + and @c shiftHeaderOffScreenAnimated APIs. Scroll events will not affect the visibility of the + header. - Analogous to UINavigationController's setNavigationBarHidden: behavior, in that the visibility of - the navigation bar persists regardless of the user's subsequent interactions. - */ - MDCFlexibleHeaderShiftBehaviorHideable, -}; + Analogous to UINavigationController's setNavigationBarHidden: behavior, in that the visibility of + the navigation bar persists regardless of the user's subsequent interactions. + */ +FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorHideable; /** The importance of content contained within the flexible header view. */ typedef NS_ENUM(NSInteger, MDCFlexibleHeaderContentImportance) { diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m index f450db91dc7..9f8ec37ed5b 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m @@ -31,6 +31,11 @@ float UIAnimationDragCoefficient(void); // Private API for simulator animation speed #endif +const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorDisabled = 0; +const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorEnabled = 1; +const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar = 2; +const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorHideable = 3; + // The maximum default opacity of the shadow. static const float kDefaultVisibleShadowOpacity = (float)0.4; From 755a10e3be1344ba1ccb8671a7d8679cb278909a Mon Sep 17 00:00:00 2001 From: Andrew Overton Date: Tue, 19 May 2020 06:54:24 -0700 Subject: [PATCH 06/20] [NavigationDrawer] Add NavigationDrawer theming target to podspec When the source files for the NavigationDrawer theming extension were added the podspec wasn't updated. This change updates the podspec and renames an incorrectly-named file. Closes https://github.com/material-components/material-components-ios/pull/9996 COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/9996 from andrewoverton:update-navigationdrawer-theming-target 44389e5dd73b5fdb4cfd5f9651ed36e9ad638570 PiperOrigin-RevId: 312270981 --- MaterialComponents.podspec | 10 ++++++++++ ...ialTheming.h => MaterialNavigationDrawer+Theming.h} | 0 .../snapshot/MDCBottomDrawerControllerSnapshotTests.m | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) rename components/NavigationDrawer/src/Theming/{MaterialNavigationDrawer+MaterialTheming.h => MaterialNavigationDrawer+Theming.h} (100%) diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index e29054e0e95..af0f2003701 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -1144,6 +1144,16 @@ Pod::Spec.new do |mdc| extension.dependency "MaterialComponents/schemes/Color" end + mdc.subspec "NavigationDrawer+Theming" do |extension| + extension.ios.deployment_target = '9.0' + extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h" + extension.source_files = [ + "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}", + ] + extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}" + extension.dependency "MaterialComponents/schemes/Container" + end + # OverlayWindow mdc.subspec "OverlayWindow" do |component| diff --git a/components/NavigationDrawer/src/Theming/MaterialNavigationDrawer+MaterialTheming.h b/components/NavigationDrawer/src/Theming/MaterialNavigationDrawer+Theming.h similarity index 100% rename from components/NavigationDrawer/src/Theming/MaterialNavigationDrawer+MaterialTheming.h rename to components/NavigationDrawer/src/Theming/MaterialNavigationDrawer+Theming.h diff --git a/components/NavigationDrawer/tests/snapshot/MDCBottomDrawerControllerSnapshotTests.m b/components/NavigationDrawer/tests/snapshot/MDCBottomDrawerControllerSnapshotTests.m index 352275e8ad7..904cde63aad 100644 --- a/components/NavigationDrawer/tests/snapshot/MDCBottomDrawerControllerSnapshotTests.m +++ b/components/NavigationDrawer/tests/snapshot/MDCBottomDrawerControllerSnapshotTests.m @@ -17,7 +17,7 @@ #import "../../src/private/MDCBottomDrawerContainerViewController.h" #import "supplemental/MDCBottomDrawerSnapshotTestMutableTraitCollection.h" #import "MaterialNavigationDrawer.h" -#import "MaterialNavigationDrawer+MaterialTheming.h" +#import "MaterialNavigationDrawer+Theming.h" /** Fake MDCBottomDrawerContainerViewController for snapshot testing. */ @interface FakeBottomDrawerContainerViewController : MDCBottomDrawerContainerViewController From dfd5109f15627b8c159aa77dd8e8e5652146be37 Mon Sep 17 00:00:00 2001 From: Wenyu Zhang Date: Tue, 19 May 2020 10:02:57 -0700 Subject: [PATCH 07/20] [FAB] Fix theme being applied to a wrong floating button in the example snapshot. PiperOrigin-RevId: 312300844 --- .../FloatingButtonTypicalUseExample.m | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/components/Buttons/examples/FloatingButtonTypicalUseExample.m b/components/Buttons/examples/FloatingButtonTypicalUseExample.m index 9548205bcf2..9a6cd17d4ce 100644 --- a/components/Buttons/examples/FloatingButtonTypicalUseExample.m +++ b/components/Buttons/examples/FloatingButtonTypicalUseExample.m @@ -61,12 +61,10 @@ - (void)viewDidLoad { [self.miniFloatingButton setMinimumSize:CGSizeMake(96, 40) forShape:MDCFloatingButtonShapeMini inMode:MDCFloatingButtonModeExpanded]; - [self.miniFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; self.defaultFloatingButton = [[MDCFloatingButton alloc] init]; [self.defaultFloatingButton setImage:plusImage forState:UIControlStateNormal]; self.defaultFloatingButton.accessibilityLabel = kButtonLabel; - [self.defaultFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; self.largeIconFloatingButton = [[MDCFloatingButton alloc] init]; [self.largeIconFloatingButton setImage:plusImage36 forState:UIControlStateNormal]; @@ -74,8 +72,8 @@ - (void)viewDidLoad { [self.largeIconFloatingButton setContentEdgeInsets:UIEdgeInsetsMake(-6, -6, -6, 0) forShape:MDCFloatingButtonShapeDefault inMode:MDCFloatingButtonModeExpanded]; - [self.largeIconFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; + [self applyThemeToAllButtonsWithScheme:self.containerScheme]; [self.view addSubview:self.iPadLabel]; [self.view addSubview:self.miniFloatingButton]; [self.view addSubview:self.defaultFloatingButton]; @@ -182,6 +180,20 @@ - (void)willTransitionToTraitCollection:(UITraitCollection *)newCollection } } +- (void)setContainerScheme:(id)containerScheme { + _containerScheme = containerScheme; + + if ([self isViewLoaded]) { + [self applyThemeToAllButtonsWithScheme:containerScheme]; + } +} + +- (void)applyThemeToAllButtonsWithScheme:(id)containerScheme { + [self.miniFloatingButton applySecondaryThemeWithScheme:containerScheme]; + [self.defaultFloatingButton applySecondaryThemeWithScheme:containerScheme]; + [self.largeIconFloatingButton applySecondaryThemeWithScheme:containerScheme]; +} + #pragma mark - Catalog by Convention + (NSDictionary *)catalogMetadata { @@ -201,12 +213,9 @@ - (void)testDynamic201907ColorScheme { MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init]; containerScheme.colorScheme = [[MDCSemanticColorScheme alloc] initWithDefaults:MDCColorSchemeDefaultsMaterial201907]; - self.containerScheme = containerScheme; // When - [self.miniFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; - [self.largeIconFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; - [self.largeIconFloatingButton applySecondaryThemeWithScheme:self.containerScheme]; + self.containerScheme = containerScheme; } @end From 0fcf353c3abde1b300e5aee8a0c9ca256bbd0212 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 19 May 2020 11:19:48 -0700 Subject: [PATCH 08/20] [MDCSnackbar] Add snackbarIsPresenting to MDCSnackbarManagerDelegate. PiperOrigin-RevId: 312316674 --- components/Snackbar/src/MDCSnackbarManager.m | 4 ++++ components/Snackbar/src/MDCSnackbarManagerDelegate.h | 8 ++++++++ .../tests/unit/MDCSnackbarMessageViewTests.m | 12 +++++++++++- .../supplemental/MDCFakeMDCSnackbarManagerDelegate.h | 3 +-- .../supplemental/MDCFakeMDCSnackbarManagerDelegate.m | 4 ++++ 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/components/Snackbar/src/MDCSnackbarManager.m b/components/Snackbar/src/MDCSnackbarManager.m index 57dd43341f3..11b34c9a811 100644 --- a/components/Snackbar/src/MDCSnackbarManager.m +++ b/components/Snackbar/src/MDCSnackbarManager.m @@ -270,6 +270,10 @@ - (void)displaySnackbarViewForMessage:(MDCSnackbarMessage *)message { }); } }]; + + if ([self.delegate respondsToSelector:@selector(isPresentingSnackbarWithMessageView:)]) { + [self.delegate isPresentingSnackbarWithMessageView:snackbarView]; + } } - (MDCSnackbarOverlayView *)overlayView { diff --git a/components/Snackbar/src/MDCSnackbarManagerDelegate.h b/components/Snackbar/src/MDCSnackbarManagerDelegate.h index d401782c607..b5cb2d1453f 100644 --- a/components/Snackbar/src/MDCSnackbarManagerDelegate.h +++ b/components/Snackbar/src/MDCSnackbarManagerDelegate.h @@ -36,4 +36,12 @@ */ - (void)snackbarDidDisappear; +/** + This method is called after the snackbar begins presenting (and is laid out), + but before the animiation is finished. + + @param messageView The messageView of the snackbar that was just presented. + */ +- (void)isPresentingSnackbarWithMessageView:(nullable MDCSnackbarMessageView *)messageView; + @end diff --git a/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m b/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m index 159b7eaf6ff..ddcf860fee1 100644 --- a/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m +++ b/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m @@ -624,10 +624,20 @@ - (void)testNotDismissedOnScreenTap { // Then [NSThread sleepForTimeInterval:0.5]; - // Unfortunately, there is no way to to assert an expectation has *not* fired after a time + // Unfortunately, there is no way to to assert an expectation has *not* fired after a time // interval. Instead we rely on 'internalManager.currentSnackbar' to be nil iff the snackbar is // dismissed. XCTAssertNotNil(self.manager.internalManager.currentSnackbar); } +- (void)testsnackbarIsPresentingDelegateCalled { + // Given + self.delegate.willPresentExpectation = [self expectationWithDescription:@"willPresent"]; + self.delegate.isPresentingExpectation = [self expectationWithDescription:@"isPresenting"]; + // When + [self.manager showMessage:self.message]; + // Then + [self waitForExpectationsWithTimeout:0.2 handler:nil]; +} + @end diff --git a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h index 574ff5dd9f3..2099f62d34b 100644 --- a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h +++ b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h @@ -22,7 +22,6 @@ @property(nonatomic, assign) BOOL shouldSetSnackbarViewAccessibilityViewIsModal; @property(nonatomic, assign) XCTestExpectation *disappearExpectation; @property(nonatomic, assign) XCTestExpectation *willPresentExpectation; - -- (void)willPresentSnackbarWithMessageView:(MDCSnackbarMessageView *)messageView; +@property(nonatomic, assign) XCTestExpectation *isPresentingExpectation; @end diff --git a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m index 13bd6b3e51d..336982a713d 100644 --- a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m +++ b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m @@ -28,4 +28,8 @@ - (void)snackbarDidDisappear { [self.disappearExpectation fulfill]; } +- (void)isPresentingSnackbarWithMessageView:(nullable MDCSnackbarMessageView *)messageView { + [self.isPresentingExpectation fulfill]; +} + @end From 112ea0d0894a769dba4384325d04d09ba26362af Mon Sep 17 00:00:00 2001 From: Andrew Overton Date: Tue, 19 May 2020 11:50:30 -0700 Subject: [PATCH 09/20] [Dialogs] Add additional theming screenshot to Dialogs docs This PR adds a screenshot of a themed Dialog to the Dialogs README. Closes https://github.com/material-components/material-components-ios/pull/9997 COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/9997 from andrewoverton:add-theming-screenshot 03da851b3a5bcd4f696ea9ab84fbc35c3abf2f59 PiperOrigin-RevId: 312322585 --- components/Dialogs/README.md | 8 +++++--- .../Dialogs/docs/assets/shrine_dialog.png | Bin 0 -> 33537 bytes 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 components/Dialogs/docs/assets/shrine_dialog.png diff --git a/components/Dialogs/README.md b/components/Dialogs/README.md index ac00194a799..fc8c7cd9631 100644 --- a/components/Dialogs/README.md +++ b/components/Dialogs/README.md @@ -222,8 +222,10 @@ The following is an anatomy diagram of a Material dialog: ### Theming dialogs -You can theme a Material Dialog to match the Material Design Dialog using your app's scheme and the Dialogs theming -extension. To add the theming extension to your project add the following line to your Podfile: +![Dialogs with Shrine theming](docs/assets/shrine_dialog.png) + +You can theme a Material Dialog using a container scheme and the Dialogs theming extension. To achieve something like the +Shrine theming above first add the Dialogs theming extension to your project by adding the following line to your Podfile: ```bash pod 'MaterialComponents/Dialogs+Theming' @@ -278,7 +280,7 @@ High, Medium and low emphasis are supported. // Add actions with emphases that will generate buttons with the desired appearance. // An example of a high and a medium emphasis actions: alert.addAction(MDCAlertAction(title:"Add Item", emphasis: .high, handler: handler)) - alert.addAction(MDCAlertAction(title:"Cancel", emphasis: .medium, handler: handler)) + alert.addAction(MDCAlertAction(title:"Cancel", emphasis: .high, handler: handler)) // Make sure to apply theming after all actions are added, so they are themed too! alert.applyTheme(withScheme: scheme) diff --git a/components/Dialogs/docs/assets/shrine_dialog.png b/components/Dialogs/docs/assets/shrine_dialog.png new file mode 100644 index 0000000000000000000000000000000000000000..25ad4bab4ea231bc6f7bc89d55019557fe69e10e GIT binary patch literal 33537 zcmb^XWmsHG6E=*Z!GcSW;O_437Ti5Rkip#@f`s4}+}+*XLI~~*76|S#Xn=1>_I`H0 z_q^xNxelxu7Hf4^cU4zcb=6%F%8Js+i1>&Q5D>_+G7_o~5Kwv$5RkU;ufR`OP^$GI zAYPjQ#Ko0m#l=aKo$Sp4Hf9hIG7(8yaN24kI9YnCvX+7HG6Gf!-_qcMvya{rh%gCD@qY9T&4-NJTU-dUoagqA z)>mk*{!0pDpo#Nmx=^t=F$jowNXKMlQksAkJctenl7u%nD8eAc z1k|FOIXqJFEdXate(41;OaoC6u>hYg0XT?N%@PZ21SgW16Y}uYLa_)e2to4jU>K7w zv`vceF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{;tnArKjT{d86qx3clr5SV!xJp4r3mVU)2dhfe)b z>nN_DWQ9LA%FoeB{B*i=c!oS=b~I!|g^Bae`{AcWyO||q^*gy)r4GNz*~AIuma^qJ zYeT*3dTZL2Dq^S^TCOk*67`<-I&lzgbRMxM_2{x(tno=T9>7M_BT>NQWx!wRIad>` z9xC@7avs1&g{S6&7NTJwua~=}jU@SsGKRqg6hY*Vmj{kQJ#m*=MDXJcWR^9hha8ve zg$)U?!hQTtXKv*Y+x`%$gsOF{ePxg2Kb|=L_V_C*t(W$!i Date: Wed, 20 May 2020 06:57:13 -0700 Subject: [PATCH 10/20] [FlexibleHeader] Move the shift behavior types to separate targets. PiperOrigin-RevId: 312473972 --- MaterialComponents.podspec | 24 +++++++++++++++++ .../src/MDCFlexibleHeaderView+ShiftBehavior.h | 20 ++------------ .../MDCFlexibleHeaderShiftBehavior.h | 23 ++++++++++++++++ .../MaterialFlexibleHeader+ShiftBehavior.h | 16 ++++++++++++ ...eHeaderShiftBehaviorEnabledWithStatusBar.h | 26 +++++++++++++++++++ ...Header+ShiftBehaviorEnabledWithStatusBar.h | 16 ++++++++++++ 6 files changed, 107 insertions(+), 18 deletions(-) create mode 100644 components/FlexibleHeader/src/ShiftBehavior/MDCFlexibleHeaderShiftBehavior.h create mode 100644 components/FlexibleHeader/src/ShiftBehavior/MaterialFlexibleHeader+ShiftBehavior.h create mode 100644 components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h create mode 100644 components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index af0f2003701..2e5ff9cbb46 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -905,6 +905,8 @@ Pod::Spec.new do |mdc| component.dependency 'MDFTextAccessibility' component.dependency "MaterialComponents/Availability" component.dependency "MaterialComponents/Elevation" + component.dependency "MaterialComponents/FlexibleHeader+ShiftBehavior" + component.dependency "MaterialComponents/FlexibleHeader+ShiftBehaviorEnabledWithStatusBar" component.dependency "MaterialComponents/ShadowElevations" component.dependency "MaterialComponents/ShadowLayer" component.dependency "MaterialComponents/private/Application" @@ -921,6 +923,28 @@ Pod::Spec.new do |mdc| end end + mdc.subspec "FlexibleHeader+ShiftBehavior" do |extension| + extension.ios.deployment_target = '9.0' + extension.public_header_files = [ + "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h" + ] + extension.source_files = [ + "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}" + ] + end + + mdc.subspec "FlexibleHeader+ShiftBehaviorEnabledWithStatusBar" do |extension| + extension.ios.deployment_target = '9.0' + extension.public_header_files = [ + "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h" + ] + extension.source_files = [ + "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}" + ] + + component.dependency "MaterialComponents/FlexibleHeader+ShiftBehavior" + end + mdc.subspec "FlexibleHeader+CanAlwaysExpandToMaximumHeight" do |extension| extension.ios.deployment_target = '9.0' extension.public_header_files = [ diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h b/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h index e2b12e6c72a..d68272db30f 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView+ShiftBehavior.h @@ -13,33 +13,17 @@ // limitations under the License. #import "MDCFlexibleHeaderView.h" +#import "MaterialFlexibleHeader+ShiftBehavior.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #pragma mark - Shift behavior-specific APIs -/** - The possible translation (shift) behaviors of a flexible header view. - - Enabling shifting allows the header to enter the - @c MDCFlexibleHeaderScrollPhaseShifting scroll phase. - */ -typedef NSInteger MDCFlexibleHeaderShiftBehavior NS_TYPED_EXTENSIBLE_ENUM; - /** Header's y position never changes in reaction to scroll events. */ FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorDisabled; /** When fully-collapsed, the header translates vertically in reaction to scroll events. */ FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior MDCFlexibleHeaderShiftBehaviorEnabled; -/** - When fully-collapsed, the header translates vertically in reaction to scroll events along with - the status bar. - - If used with a vertically-paging scroll view, this behavior acts like - MDCFlexibleHeaderShiftBehaviorEnabled. - */ -FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior - MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar; - /** Allows the header to be shifted on- and off-screen only via the @c shiftHeaderOnScreenAnimated: and @c shiftHeaderOffScreenAnimated APIs. Scroll events will not affect the visibility of the diff --git a/components/FlexibleHeader/src/ShiftBehavior/MDCFlexibleHeaderShiftBehavior.h b/components/FlexibleHeader/src/ShiftBehavior/MDCFlexibleHeaderShiftBehavior.h new file mode 100644 index 00000000000..9f89497dace --- /dev/null +++ b/components/FlexibleHeader/src/ShiftBehavior/MDCFlexibleHeaderShiftBehavior.h @@ -0,0 +1,23 @@ +// Copyright 2020-present the Material Components for iOS authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/** + The possible translation (shift) behaviors of a flexible header view. + + Enabling shifting allows the header to enter the + @c MDCFlexibleHeaderScrollPhaseShifting scroll phase. + */ +typedef NSInteger MDCFlexibleHeaderShiftBehavior NS_TYPED_EXTENSIBLE_ENUM; diff --git a/components/FlexibleHeader/src/ShiftBehavior/MaterialFlexibleHeader+ShiftBehavior.h b/components/FlexibleHeader/src/ShiftBehavior/MaterialFlexibleHeader+ShiftBehavior.h new file mode 100644 index 00000000000..3cd2e8535f0 --- /dev/null +++ b/components/FlexibleHeader/src/ShiftBehavior/MaterialFlexibleHeader+ShiftBehavior.h @@ -0,0 +1,16 @@ +// Copyright 2020-present the Material Components for iOS authors. All Rights +// Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "MDCFlexibleHeaderShiftBehavior.h" diff --git a/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h b/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h new file mode 100644 index 00000000000..f4dfc19eddf --- /dev/null +++ b/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h @@ -0,0 +1,26 @@ +// Copyright 2020-present the Material Components for iOS authors. All Rights +// Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "MaterialFlexibleHeader+ShiftBehavior.h" + +/** + When fully-collapsed, the header translates vertically in reaction to scroll + events along with the status bar. + + If used with a vertically-paging scroll view, this behavior acts like + MDCFlexibleHeaderShiftBehaviorEnabled. + */ +FOUNDATION_EXTERN const MDCFlexibleHeaderShiftBehavior + MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar; diff --git a/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h b/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h new file mode 100644 index 00000000000..4bb93e8a438 --- /dev/null +++ b/components/FlexibleHeader/src/ShiftBehaviorEnabledWithStatusBar/MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h @@ -0,0 +1,16 @@ +// Copyright 2020-present the Material Components for iOS authors. All Rights +// Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h" From 1992bbdd21a009c345a253a9aa7816bae8841961 Mon Sep 17 00:00:00 2001 From: Wenyu Zhang Date: Wed, 20 May 2020 07:03:24 -0700 Subject: [PATCH 11/20] [Chips] Adjust hitAreaInsets in the typical example. PiperOrigin-RevId: 312474752 --- components/Chips/examples/ChipsTypicalUseViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Chips/examples/ChipsTypicalUseViewController.m b/components/Chips/examples/ChipsTypicalUseViewController.m index 2d9d62def7b..76b88ca3d4c 100644 --- a/components/Chips/examples/ChipsTypicalUseViewController.m +++ b/components/Chips/examples/ChipsTypicalUseViewController.m @@ -157,6 +157,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell.chipView.imageView.image = model.showProfilePic ? ChipsExampleAssets.faceImage : nil; cell.chipView.selectedImageView.image = model.showDoneImage ? ChipsExampleAssets.doneImage : nil; cell.chipView.accessoryView = model.showDeleteButton ? ChipsExampleAssets.deleteButton : nil; + cell.chipView.hitAreaInsets = UIEdgeInsetsMake(-16, 0, -16, 0); [cell.chipView applyThemeWithScheme:self.containerScheme]; return cell; From c8b569bd60f0702f21b32fe55112e458f0db3a67 Mon Sep 17 00:00:00 2001 From: Nobody Date: Wed, 20 May 2020 07:41:35 -0700 Subject: [PATCH 12/20] [MDCSnackbar] Add snackbarWillDisappear to SnackbarManagerDelegate PiperOrigin-RevId: 312479558 --- components/Snackbar/src/MDCSnackbarManager.m | 4 ++++ .../Snackbar/src/MDCSnackbarManagerDelegate.h | 5 +++++ .../tests/unit/MDCSnackbarMessageViewTests.m | 16 ++++++++++++++-- .../MDCFakeMDCSnackbarManagerDelegate.h | 3 ++- .../MDCFakeMDCSnackbarManagerDelegate.m | 6 +++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/components/Snackbar/src/MDCSnackbarManager.m b/components/Snackbar/src/MDCSnackbarManager.m index 11b34c9a811..f20b7433403 100644 --- a/components/Snackbar/src/MDCSnackbarManager.m +++ b/components/Snackbar/src/MDCSnackbarManager.m @@ -304,6 +304,10 @@ - (void)hideSnackbarViewReally:(MDCSnackbarMessageView *)snackbarView completion:nil]; }]; + if ([self.delegate respondsToSelector:@selector(snackbarWillDisappear)]) { + [self.delegate snackbarWillDisappear]; + } + [self.overlayView dismissSnackbarViewAnimated:YES completion:^{ diff --git a/components/Snackbar/src/MDCSnackbarManagerDelegate.h b/components/Snackbar/src/MDCSnackbarManagerDelegate.h index b5cb2d1453f..4cb3388c60b 100644 --- a/components/Snackbar/src/MDCSnackbarManagerDelegate.h +++ b/components/Snackbar/src/MDCSnackbarManagerDelegate.h @@ -31,6 +31,11 @@ @optional +/** + This method is called just before a Snackbar is dismissed. + */ +- (void)snackbarWillDisappear; + /** This method is called after a Snackbar's dismissal animation is finished. */ diff --git a/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m b/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m index ddcf860fee1..313c8da61dd 100644 --- a/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m +++ b/components/Snackbar/tests/unit/MDCSnackbarMessageViewTests.m @@ -541,12 +541,24 @@ - (void)testSnackbarDidDisappearDelegateCalled { self.message.duration = kSnackbarDuration; // When [self.manager showMessage:self.message]; - self.delegate.disappearExpectation = [self expectationWithDescription:@"disappeared"]; + self.delegate.didDisappearExpectation = [self expectationWithDescription:@"didDisappear"]; // Then // Expect 'snackbarDidDisappear' delegate method to be called. [self waitForExpectationsWithTimeout:3 handler:nil]; } +- (void)testSnackbarWillDisappearDelegateCalled { + // Given + const CGFloat kSnackbarDuration = (CGFloat)0.1; + self.message.duration = kSnackbarDuration; + // When + [self.manager showMessage:self.message]; + self.delegate.willDisappearExpectation = [self expectationWithDescription:@"willDisappear"]; + // Then + // Expect 'snackbarWillDisappear' delegate method to be called. + [self waitForExpectationsWithTimeout:3 handler:nil]; +} + - (void)testSettingPresentationHostViewOverrideDisplaysSnackbarInCorrectView { // Given UIView *customView = [[UIView alloc] init]; @@ -575,7 +587,7 @@ - (void)testDismissOnScreenTap { // Given self.message.shouldDismissOnOverlayTap = YES; self.message.duration = 0; - self.delegate.disappearExpectation = [self expectationWithDescription:@"disappeared"]; + self.delegate.didDisappearExpectation = [self expectationWithDescription:@"didDisappear"]; self.delegate.willPresentExpectation = [self expectationWithDescription:@"willPresent"]; // When diff --git a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h index 2099f62d34b..e84d0612c47 100644 --- a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h +++ b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.h @@ -20,8 +20,9 @@ @property(nonatomic, strong) MDCSnackbarMessageView *presentedView; @property(nonatomic, assign) BOOL shouldSetSnackbarViewAccessibilityViewIsModal; -@property(nonatomic, assign) XCTestExpectation *disappearExpectation; +@property(nonatomic, assign) XCTestExpectation *didDisappearExpectation; @property(nonatomic, assign) XCTestExpectation *willPresentExpectation; @property(nonatomic, assign) XCTestExpectation *isPresentingExpectation; +@property(nonatomic, assign) XCTestExpectation *willDisappearExpectation; @end diff --git a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m index 336982a713d..6ab702b3460 100644 --- a/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m +++ b/components/Snackbar/tests/unit/supplemental/MDCFakeMDCSnackbarManagerDelegate.m @@ -25,7 +25,11 @@ - (void)willPresentSnackbarWithMessageView:(MDCSnackbarMessageView *)messageView } - (void)snackbarDidDisappear { - [self.disappearExpectation fulfill]; + [self.didDisappearExpectation fulfill]; +} + +- (void)snackbarWillDisappear { + [self.willDisappearExpectation fulfill]; } - (void)isPresentingSnackbarWithMessageView:(nullable MDCSnackbarMessageView *)messageView { From 9fde103ea50df2f85c3dfc0650fa70a285989cfb Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Wed, 20 May 2020 12:24:47 -0700 Subject: [PATCH 13/20] [FlexibleHeader] Extract hidesStatusBarWhenShiftedOffscreen to the shifter. Also adds unit tests for the API. PiperOrigin-RevId: 312531709 --- .../src/MDCFlexibleHeaderView.m | 13 +-- .../src/private/MDCFlexibleHeaderShifter.h | 18 ++++ .../src/private/MDCFlexibleHeaderShifter.m | 9 ++ .../tests/unit/FlexibleHeaderShifterTests.m | 86 +++++++++++++++++++ 4 files changed, 117 insertions(+), 9 deletions(-) diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m index 9f8ec37ed5b..65786bb4ca7 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m @@ -761,11 +761,11 @@ - (CGFloat)fhv_accumulatorMax { #pragma mark Logical short forms - (BOOL)fhv_shouldAllowShifting { - return self.hidesStatusBarWhenCollapsed && self.statusBarHintCanOverlapHeader; + return _shifter.hidesStatusBarWhenShiftedOffscreen && self.statusBarHintCanOverlapHeader; } - (BOOL)fhv_shouldCollapseToStatusBar { - return !self.hidesStatusBarWhenCollapsed && self.statusBarHintCanOverlapHeader; + return !_shifter.hidesStatusBarWhenShiftedOffscreen && self.statusBarHintCanOverlapHeader; } - (BOOL)fhv_canShiftOffscreen { @@ -967,7 +967,7 @@ - (void)fhv_accumulatorDidChange { } CGFloat shadowIntensity; - if (self.hidesStatusBarWhenCollapsed) { + if (_shifter.hidesStatusBarWhenShiftedOffscreen) { // Calculate the desired shadow strength for the offset & accumulator and then take the // weakest strength. CGFloat accumulator = @@ -1571,6 +1571,7 @@ - (void)setTrackingScrollView:(UIScrollView *)trackingScrollView { } BOOL wasTrackingScrollView = _trackingScrollView != nil; + _shifter.trackingScrollView = trackingScrollView; _trackingScrollView = trackingScrollView; // If this header is shared by many scroll views then we leave the insets when switching the @@ -1756,12 +1757,6 @@ - (BOOL)prefersStatusBarHidden { return _statusBarShifter.prefersStatusBarHidden; } -- (BOOL)hidesStatusBarWhenCollapsed { - return ((_shifter.behavior == MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar || - _shifter.behavior == MDCFlexibleHeaderShiftBehaviorHideable) && - !_trackingScrollView.pagingEnabled); -} - - (void)setStatusBarHintCanOverlapHeader:(BOOL)statusBarHintCanOverlapHeader { if (_statusBarHintCanOverlapHeader == statusBarHintCanOverlapHeader) { return; diff --git a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h index 4af095002c7..56775c6724d 100644 --- a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h +++ b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.h @@ -21,6 +21,18 @@ */ __attribute__((objc_subclassing_restricted)) @interface MDCFlexibleHeaderShifter : NSObject +#pragma mark - Tracking scroll view + +/** + The scroll view whose content offset affects the shift behavior of the flexible header. + + The tracking scroll view is weakly held so that we don't unintentionally keep the scroll view + around any longer than it needs to be. Doing so could get into tricky situations where the view + controller didn't nil out the scroll view's delegate in dealloc and UIScrollView's non-weak + delegate points to a dead object. + */ +@property(nonatomic, weak, nullable) UIScrollView *trackingScrollView; + #pragma mark - Behavior /** @@ -45,4 +57,10 @@ __attribute__((objc_subclassing_restricted)) @interface MDCFlexibleHeaderShifter + (MDCFlexibleHeaderShiftBehavior)behaviorForCurrentContextFromBehavior: (MDCFlexibleHeaderShiftBehavior)behavior; +/** + Returns YES if the shifter will also hide the status bar when the header is shifting off-screen; + returns NO otherwise. + */ +- (BOOL)hidesStatusBarWhenShiftedOffscreen; + @end diff --git a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m index 6dc90617929..5c9b5955b8d 100644 --- a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m +++ b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m @@ -27,6 +27,15 @@ - (instancetype)init { return self; } +#pragma mark - Behavior + +- (BOOL)hidesStatusBarWhenShiftedOffscreen { + BOOL behaviorWantsStatusBarHidden = + self.behavior == MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar || + self.behavior == MDCFlexibleHeaderShiftBehaviorHideable; + return behaviorWantsStatusBarHidden && !self.trackingScrollView.pagingEnabled; +} + + (MDCFlexibleHeaderShiftBehavior)behaviorForCurrentContextFromBehavior: (MDCFlexibleHeaderShiftBehavior)behavior { // In app extensions we do not allow shifting with the status bar. diff --git a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m index 8e270648991..aab7d3c60a8 100644 --- a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m +++ b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m @@ -26,9 +26,13 @@ - (void)testDefaults { MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; // Then + XCTAssertNil(shifter.trackingScrollView); XCTAssertEqual(shifter.behavior, MDCFlexibleHeaderShiftBehaviorDisabled); + XCTAssertFalse(shifter.hidesStatusBarWhenShiftedOffscreen); } +#pragma mark - behavior + - (void)testBehaviorSetterPersistsTheSetValue { // Given MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; @@ -40,6 +44,88 @@ - (void)testBehaviorSetterPersistsTheSetValue { XCTAssertEqual(shifter.behavior, MDCFlexibleHeaderShiftBehaviorEnabled); } +#pragma mark - trackingScrollView + +- (void)testTrackingScrollViewIsWeaklyHeld { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + + // When + @autoreleasepool { + UIScrollView *scrollView = [[UIScrollView alloc] init]; + shifter.trackingScrollView = scrollView; + } + + // Then + XCTAssertNil(shifter.trackingScrollView); +} + +#pragma mark - -hidesStatusBarWhenShiftedOffscreen + +- (void)testDoesNotHideStatusBarWhenShiftBehaviorEnabled { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + + // When + shifter.behavior = MDCFlexibleHeaderShiftBehaviorEnabled; + + // Then + XCTAssertFalse(shifter.hidesStatusBarWhenShiftedOffscreen); +} + +- (void)testHidesStatusBarWhenShiftBehaviorEnabledWithStatusBar { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + + // When + shifter.behavior = MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar; + + // Then + XCTAssertTrue(shifter.hidesStatusBarWhenShiftedOffscreen); +} + +- (void)testHidesStatusBarWhenHideable { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + + // When + shifter.behavior = MDCFlexibleHeaderShiftBehaviorHideable; + + // Then + XCTAssertTrue(shifter.hidesStatusBarWhenShiftedOffscreen); +} + +- (void) + testDoesNotHideStatusBarWhenShiftBehaviorEnabledWithStatusBarAndTrackingScrollViewPagingEnabled { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + UIScrollView *scrollView = [[UIScrollView alloc] init]; + shifter.trackingScrollView = scrollView; + + // When + shifter.behavior = MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar; + scrollView.pagingEnabled = YES; + + // Then + XCTAssertFalse(shifter.hidesStatusBarWhenShiftedOffscreen); + XCTAssertNotNil(scrollView); // Keep a strong reference to the tracking scroll view. +} + +- (void)testDoesNotHideStatusBarWhenHideableAndTrackingScrollViewPagingEnabled { + // Given + MDCFlexibleHeaderShifter *shifter = [[MDCFlexibleHeaderShifter alloc] init]; + UIScrollView *scrollView = [[UIScrollView alloc] init]; + shifter.trackingScrollView = scrollView; + + // When + shifter.behavior = MDCFlexibleHeaderShiftBehaviorHideable; + scrollView.pagingEnabled = YES; + + // Then + XCTAssertFalse(shifter.hidesStatusBarWhenShiftedOffscreen); + XCTAssertNotNil(scrollView); // Keep a strong reference to the tracking scroll view. +} + #pragma mark - +behaviorForCurrentContextFromBehavior: - (void)testBehaviorForGivenContextReturnsSameContext { From b5aa93e81cba6ab5670eb4096bb7c640d02585da Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Thu, 21 May 2020 17:42:08 -0700 Subject: [PATCH 14/20] Internal change PiperOrigin-RevId: 312773402 --- .../examples/FlexibleHeaderConfiguratorExample.m | 3 ++- .../examples/FlexibleHeaderSafeAreaLayoutGuideExample.m | 1 + .../examples/FlexibleHeaderTopLayoutGuideExample.m | 1 + components/FlexibleHeader/src/MDCFlexibleHeaderView.m | 1 + .../FlexibleHeader/src/MDCFlexibleHeaderViewController.m | 1 + .../FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m | 1 + .../FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m | 2 ++ .../examples/supplemental/TabBarTextOnlyExampleSupplemental.m | 1 + 8 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/FlexibleHeader/examples/FlexibleHeaderConfiguratorExample.m b/components/FlexibleHeader/examples/FlexibleHeaderConfiguratorExample.m index 1bdb5c00f11..2fb167396b4 100644 --- a/components/FlexibleHeader/examples/FlexibleHeaderConfiguratorExample.m +++ b/components/FlexibleHeader/examples/FlexibleHeaderConfiguratorExample.m @@ -14,8 +14,9 @@ #import -#import "MaterialFlexibleHeader.h" #import "MaterialFlexibleHeader+CanAlwaysExpandToMaximumHeight.h" +#import "MaterialFlexibleHeader.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #import "supplemental/FlexibleHeaderConfiguratorControlItem.h" diff --git a/components/FlexibleHeader/examples/FlexibleHeaderSafeAreaLayoutGuideExample.m b/components/FlexibleHeader/examples/FlexibleHeaderSafeAreaLayoutGuideExample.m index 160f0ec634b..f209c7f7f95 100644 --- a/components/FlexibleHeader/examples/FlexibleHeaderSafeAreaLayoutGuideExample.m +++ b/components/FlexibleHeader/examples/FlexibleHeaderSafeAreaLayoutGuideExample.m @@ -15,6 +15,7 @@ #import #import "MaterialFlexibleHeader.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #import "MaterialPalettes.h" @interface FlexibleHeaderSafeAreaLayoutGuideExample diff --git a/components/FlexibleHeader/examples/FlexibleHeaderTopLayoutGuideExample.m b/components/FlexibleHeader/examples/FlexibleHeaderTopLayoutGuideExample.m index 8e50b8d96d1..fa62c9ff144 100644 --- a/components/FlexibleHeader/examples/FlexibleHeaderTopLayoutGuideExample.m +++ b/components/FlexibleHeader/examples/FlexibleHeaderTopLayoutGuideExample.m @@ -15,6 +15,7 @@ #import #import "MaterialFlexibleHeader.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #import "MaterialPalettes.h" @interface FlexibleHeaderTopLayoutGuideExample diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m index 65786bb4ca7..ba8a425aea8 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderView.m +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderView.m @@ -22,6 +22,7 @@ #import "MDCFlexibleHeaderView+ShiftBehavior.h" #import "MDCFlexibleHeaderViewAnimationDelegate.h" #import "MDCFlexibleHeaderViewDelegate.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #import "MaterialShadowElevations.h" #import "MaterialApplication.h" #import "MaterialMath.h" diff --git a/components/FlexibleHeader/src/MDCFlexibleHeaderViewController.m b/components/FlexibleHeader/src/MDCFlexibleHeaderViewController.m index b540672ebbd..ee947644550 100644 --- a/components/FlexibleHeader/src/MDCFlexibleHeaderViewController.m +++ b/components/FlexibleHeader/src/MDCFlexibleHeaderViewController.m @@ -22,6 +22,7 @@ #import "MDCFlexibleHeaderView+ShiftBehavior.h" #import "MDCFlexibleHeaderView.h" #import "MDCFlexibleHeaderViewLayoutDelegate.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" #import "MaterialApplication.h" #import "MaterialUIMetrics.h" #import diff --git a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m index 5c9b5955b8d..e2b561fb746 100644 --- a/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m +++ b/components/FlexibleHeader/src/private/MDCFlexibleHeaderShifter.m @@ -13,6 +13,7 @@ // limitations under the License. #import "MDCFlexibleHeaderShifter.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" // The suffix for an app extension bundle path. static NSString *const kAppExtensionSuffix = @".appex"; diff --git a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m index aab7d3c60a8..cd0721a2a12 100644 --- a/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m +++ b/components/FlexibleHeader/tests/unit/FlexibleHeaderShifterTests.m @@ -14,6 +14,8 @@ #import "MDCFlexibleHeaderShifter.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" + #import @interface FlexibleHeaderShifterTests : XCTestCase diff --git a/components/Tabs/examples/supplemental/TabBarTextOnlyExampleSupplemental.m b/components/Tabs/examples/supplemental/TabBarTextOnlyExampleSupplemental.m index 9d00ffd4007..7f2afc73ffa 100644 --- a/components/Tabs/examples/supplemental/TabBarTextOnlyExampleSupplemental.m +++ b/components/Tabs/examples/supplemental/TabBarTextOnlyExampleSupplemental.m @@ -17,6 +17,7 @@ */ #import "TabBarTextOnlyExampleSupplemental.h" +#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h" static CGFloat const kAppBarMinHeight = 56; static CGFloat const kTabBarHeight = 48; From b7524a60167e313b3fc658305f2f186e00d65601 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 09:09:37 -0700 Subject: [PATCH 15/20] [MDC-iOS] Use correct variable for dependency declaration in FlexibleHeader+ShiftBehaviorEnabledWithStatusBar podspec PiperOrigin-RevId: 313202466 --- MaterialComponents.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index 2e5ff9cbb46..ca6ab42a4af 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -942,7 +942,7 @@ Pod::Spec.new do |mdc| "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}" ] - component.dependency "MaterialComponents/FlexibleHeader+ShiftBehavior" + extension.dependency "MaterialComponents/FlexibleHeader+ShiftBehavior" end mdc.subspec "FlexibleHeader+CanAlwaysExpandToMaximumHeight" do |extension| From 87a86c3e312764499f2f76e239a6b6ad98be8c88 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 12:13:59 -0400 Subject: [PATCH 16/20] Automatic changelog preparation for release. --- .gitattributes | 28 ++++++++++++++++++++++--- CHANGELOG.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index c13f46c3bdc..f56e2dfb895 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,25 @@ -# Do not merge this version into `stable`. # DO NOT CHANGE THIS FILE -snapshot_test_goldens/**/*.png filter=lfs diff=lfs merge=lfs -text # DO NOT EDIT THE LINE BELOW. -.gitattributes merge=gitattributes +# DO NOT CHANGE THIS FILE +# DO NOT EDIT THE LINE BELOW. +/.gitattributes merge=gitattributes +# DO NOT EDIT THE LINE ABOVE. +# +# You can of course edit this file, but make sure you understand what you are +# doing. This file defines a custom filter driver that prevents snapshot test +# images from being merged into `stable`. Snapshot test images are only +# valuable in `develop` because they are only intended to help developers +# identify changes in the appearance of the library. +# +# Before you change this file, please carefully consider whether such a change +# is actually necessary. When you do change this file, it should almost always +# be done in a dedicated commit directly on the `stable` branch and not part +# of a release. If you see this file being changed as part of a release, +# block the release and work with the releaser to ensure that the change needs +# to be propagated from the `develop` branch to the `stable` branch. In nearly +# all cases, it should not be propagated from `develop` to `stable`. +# +# If you are a releaser and see this file change and you're not sure why, you +# might have accidentally skipped [setting the correct +# driver in your cloned +# repository](https://github.com/material-components/material-components-ios/blob/develop/contributing/releasing.md#configure-the-merge-strategy-for-gitattributes). +# If that's the case, please either revert the accidental change manually or +# restart the release with a fresh clone and the correct driver. diff --git a/CHANGELOG.md b/CHANGELOG.md index 32350e7c0f2..b1bc71eb649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,59 @@ +# #develop# + +Replace this text with a summarized description of this release's contents. +## Breaking changes + +Replace this explanations for how to resolve the breaking changes. +## New deprecations + +Replace this text with links to deprecation guides. +## New features + +Replace this text with example code for each new feature. +## API changes + +## Component changes + +### AppBar + +* [Fix a failing snapshot test](https://github.com/material-components/material-components-ios/commit/09171d15c71e762844bf697f7f9c3541a0179854) (Galia Kaufman) + +### Buttons + +* [Fix theme being applied to a wrong floating button in the example snapshot.](https://github.com/material-components/material-components-ios/commit/dfd5109f15627b8c159aa77dd8e8e5652146be37) (Wenyu Zhang) + +### Chips + +* [Adjust hitAreaInsets in the typical example.](https://github.com/material-components/material-components-ios/commit/1992bbdd21a009c345a253a9aa7816bae8841961) (Wenyu Zhang) + +### Dialogs + +* [Add additional theming screenshot to Dialogs docs](https://github.com/material-components/material-components-ios/commit/112ea0d0894a769dba4384325d04d09ba26362af) (Andrew Overton) + +### FlexibleHeader + +* [Extract hidesStatusBarWhenShiftedOffscreen to the shifter.](https://github.com/material-components/material-components-ios/commit/9fde103ea50df2f85c3dfc0650fa70a285989cfb) (Jeff Verkoeyen) +* [Move ShiftBehaviorForCurrentAppContext into the MDCFlexibleHeaderShifter.](https://github.com/material-components/material-components-ios/commit/3fc4f0cb472ef91e4761076f5f6444d6bb99aac0) (Jeff Verkoeyen) +* [Move the shift behavior types to separate targets.](https://github.com/material-components/material-components-ios/commit/643170dea99036cac1680faa7045ee4a4ee1aac9) (Jeff Verkoeyen) +* [Turn MDCFlexibleHeaderShiftBehavior into an extensible enum.](https://github.com/material-components/material-components-ios/commit/5b8abd6659b5c2ea71c18cb4ea8c6d04310f19ec) (Jeff Verkoeyen) + +### NavigationDrawer + +* [Add NavigationDrawer theming target to podspec](https://github.com/material-components/material-components-ios/commit/755a10e3be1344ba1ccb8671a7d8679cb278909a) (Andrew Overton) + +### Snackbar + +* [Add snackbarIsPresenting to MDCSnackbarManagerDelegate.](https://github.com/material-components/material-components-ios/commit/0fcf353c3abde1b300e5aee8a0c9ca256bbd0212) (Nobody) +* [Add snackbarWillDisappear to SnackbarManagerDelegate](https://github.com/material-components/material-components-ios/commit/c8b569bd60f0702f21b32fe55112e458f0db3a67) (Nobody) + +## Multi-component changes + +* [Internal change.](https://github.com/material-components/material-components-ios/commit/4d76e54f83e1d55910e1ec599668df6a18502c7c) (Wenyu Zhang) +* [Internal change](https://github.com/material-components/material-components-ios/commit/9c26a7e67aa298a57e5a78e22d7fbe5abc6fe34f) (Bryan Oltman) +* [Internal change](https://github.com/material-components/material-components-ios/commit/b5aa93e81cba6ab5670eb4096bb7c640d02585da) (Jeff Verkoeyen) + +--- + # 109.4.0 This minor release adds Theming extension support to MDCBottomDrawerViewController and includes bug fixes and minor refactoring. From 16d0b69914bf3da3b711bba0a314e29826fb8882 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 13:48:01 -0400 Subject: [PATCH 17/20] Hand-modified CHANGELOG.md API diff. --- CHANGELOG.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1bc71eb649..0f5f19b31c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,12 @@ -# #develop# +# 109.5.0 -Replace this text with a summarized description of this release's contents. -## Breaking changes - -Replace this explanations for how to resolve the breaking changes. -## New deprecations +This minor release adds functionality to MDCSnackbarManagerDelegate and includes internal cleanup of FlexibleHeader. -Replace this text with links to deprecation guides. ## New features -Replace this text with example code for each new feature. -## API changes +### Snackbar + +MDCSnackbarManagerDelegate has new `snackbarWillDisappear` and `isPresentingSnackbarWithMessageView:` methods. ## Component changes From e7f6d26ce1fecb8a506e5eecfab4d237c1d9eac6 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 15:56:19 -0400 Subject: [PATCH 18/20] Hand-modified CHANGELOG.md API diff. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f5f19b31c6..8badfa76bc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,8 +39,8 @@ MDCSnackbarManagerDelegate has new `snackbarWillDisappear` and `isPresentingSnac ### Snackbar -* [Add snackbarIsPresenting to MDCSnackbarManagerDelegate.](https://github.com/material-components/material-components-ios/commit/0fcf353c3abde1b300e5aee8a0c9ca256bbd0212) (Nobody) -* [Add snackbarWillDisappear to SnackbarManagerDelegate](https://github.com/material-components/material-components-ios/commit/c8b569bd60f0702f21b32fe55112e458f0db3a67) (Nobody) +* [Add snackbarIsPresenting to MDCSnackbarManagerDelegate.](https://github.com/material-components/material-components-ios/commit/0fcf353c3abde1b300e5aee8a0c9ca256bbd0212) (mredding-goog) +* [Add snackbarWillDisappear to SnackbarManagerDelegate](https://github.com/material-components/material-components-ios/commit/c8b569bd60f0702f21b32fe55112e458f0db3a67) (mredding-goog) ## Multi-component changes From 6c1b840cc0e1376dad020687853047f743e38082 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 15:57:34 -0400 Subject: [PATCH 19/20] Hand-modified CHANGELOG.md API diff. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8badfa76bc1..f62bfb7709d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,8 +39,8 @@ MDCSnackbarManagerDelegate has new `snackbarWillDisappear` and `isPresentingSnac ### Snackbar -* [Add snackbarIsPresenting to MDCSnackbarManagerDelegate.](https://github.com/material-components/material-components-ios/commit/0fcf353c3abde1b300e5aee8a0c9ca256bbd0212) (mredding-goog) -* [Add snackbarWillDisappear to SnackbarManagerDelegate](https://github.com/material-components/material-components-ios/commit/c8b569bd60f0702f21b32fe55112e458f0db3a67) (mredding-goog) +* [Add snackbarIsPresenting to MDCSnackbarManagerDelegate.](https://github.com/material-components/material-components-ios/commit/0fcf353c3abde1b300e5aee8a0c9ca256bbd0212) (Morgan Redding) +* [Add snackbarWillDisappear to SnackbarManagerDelegate](https://github.com/material-components/material-components-ios/commit/c8b569bd60f0702f21b32fe55112e458f0db3a67) (Morgan Redding) ## Multi-component changes From 4464b9aade177f5ff2543023f7040c73f2c735bc Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 26 May 2020 16:31:21 -0400 Subject: [PATCH 20/20] Bumped version number to 109.5.0. --- MaterialComponents.podspec | 2 +- MaterialComponentsBeta.podspec | 2 +- MaterialComponentsEarlGreyTests.podspec | 2 +- MaterialComponentsExamples.podspec | 2 +- MaterialComponentsSnapshotTests.podspec | 2 +- VERSION | 2 +- catalog/MDCCatalog/Info.plist | 4 ++-- catalog/MDCDragons/Info.plist | 4 ++-- catalog/MaterialCatalog/MaterialCatalog.podspec | 2 +- components/LibraryInfo/src/MDCLibraryInfo.m | 2 +- components/LibraryInfo/tests/unit/LibraryInfoTests.m | 2 +- demos/supplemental/RemoteImageServiceForMDCDemos.podspec | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index ca6ab42a4af..92097c76755 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb' Pod::Spec.new do |mdc| mdc.name = "MaterialComponents" - mdc.version = "109.4.0" + mdc.version = "109.5.0" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsBeta.podspec b/MaterialComponentsBeta.podspec index 710da33b67b..aec08c8d7fb 100644 --- a/MaterialComponentsBeta.podspec +++ b/MaterialComponentsBeta.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |mdc| mdc.name = "MaterialComponentsBeta" - mdc.version = "109.4.0" + mdc.version = "109.5.0" mdc.authors = "The Material Components authors." mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution." mdc.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsEarlGreyTests.podspec b/MaterialComponentsEarlGreyTests.podspec index 9c0d08416aa..d67bb5049dc 100644 --- a/MaterialComponentsEarlGreyTests.podspec +++ b/MaterialComponentsEarlGreyTests.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsEarlGreyTests" - s.version = "109.4.0" + s.version = "109.5.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests." s.description = "This spec is made for use in the MDC Catalog." diff --git a/MaterialComponentsExamples.podspec b/MaterialComponentsExamples.podspec index 12272f3c71e..cf8a250ffb2 100644 --- a/MaterialComponentsExamples.podspec +++ b/MaterialComponentsExamples.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsExamples" - s.version = "109.4.0" + s.version = "109.5.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components examples." s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog." diff --git a/MaterialComponentsSnapshotTests.podspec b/MaterialComponentsSnapshotTests.podspec index 53f64450310..eb356229f55 100644 --- a/MaterialComponentsSnapshotTests.podspec +++ b/MaterialComponentsSnapshotTests.podspec @@ -53,7 +53,7 @@ end Pod::Spec.new do |s| s.name = "MaterialComponentsSnapshotTests" - s.version = "109.4.0" + s.version = "109.5.0" s.authors = "The Material Components authors." s.summary = "This spec is an aggregate of all the Material Components snapshot tests." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/VERSION b/VERSION index 0aa378dda02..cea01bd3dc2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -109.4.0 +109.5.0 diff --git a/catalog/MDCCatalog/Info.plist b/catalog/MDCCatalog/Info.plist index f1dd86e8267..f60b1a868a6 100644 --- a/catalog/MDCCatalog/Info.plist +++ b/catalog/MDCCatalog/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.4.0 + 109.5.0 CFBundleSignature ???? CFBundleVersion - 109.4.0 + 109.5.0 LSRequiresIPhoneOS UIAppFonts diff --git a/catalog/MDCDragons/Info.plist b/catalog/MDCDragons/Info.plist index 5089db04080..0a5d49135f7 100644 --- a/catalog/MDCDragons/Info.plist +++ b/catalog/MDCDragons/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 109.4.0 + 109.5.0 CFBundleVersion - 109.4.0 + 109.5.0 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/catalog/MaterialCatalog/MaterialCatalog.podspec b/catalog/MaterialCatalog/MaterialCatalog.podspec index 7e68bd20dbd..903a633e2da 100644 --- a/catalog/MaterialCatalog/MaterialCatalog.podspec +++ b/catalog/MaterialCatalog/MaterialCatalog.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialCatalog" - s.version = "109.4.0" + s.version = "109.5.0" s.summary = "Helper Objective-C classes for the MDC catalog." s.description = "This spec is made for use in the MDC Catalog." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/components/LibraryInfo/src/MDCLibraryInfo.m b/components/LibraryInfo/src/MDCLibraryInfo.m index 459480d4412..1cbdfe3d16f 100644 --- a/components/LibraryInfo/src/MDCLibraryInfo.m +++ b/components/LibraryInfo/src/MDCLibraryInfo.m @@ -19,7 +19,7 @@ // This string is updated automatically as a part of the release process and should not be edited // manually. Do not rename this constant or change the formatting without updating the release // scripts. -static NSString const *MDCLibraryInfoVersionString = @"109.4.0"; +static NSString const *MDCLibraryInfoVersionString = @"109.5.0"; @implementation MDCLibraryInfo diff --git a/components/LibraryInfo/tests/unit/LibraryInfoTests.m b/components/LibraryInfo/tests/unit/LibraryInfoTests.m index 100a2415586..4ef68e9ebe9 100644 --- a/components/LibraryInfo/tests/unit/LibraryInfoTests.m +++ b/components/LibraryInfo/tests/unit/LibraryInfoTests.m @@ -26,7 +26,7 @@ - (void)testVersionFormat { // Given // This regex pattern does the following: - // Accept: "109.4.0", etc. + // Accept: "109.5.0", etc. // Reject: "0.0.0", "1.2", "1", "-1.2.3", "Hi, I'm a version 1.2.3", "1.2.3 is my version", etc. // // Note the major version must be >= 1 since "0.0.0" is used as the version when something goes diff --git a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec index 96d5b771749..791107b1320 100644 --- a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec +++ b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RemoteImageServiceForMDCDemos" - s.version = "109.4.0" + s.version = "109.5.0" s.summary = "A helper image class for the MDC demos." s.description = "This spec is made for use in the MDC demos. It gets images via url." s.homepage = "https://github.com/material-components/material-components-ios"