Skip to content

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Verkoeyen committed Feb 19, 2021
2 parents cf50992 + 47cd790 commit 2c73e2d
Show file tree
Hide file tree
Showing 161 changed files with 453 additions and 136 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 122.0.1

This patch release fixes a bug and generally cleans up import statements.

## Component changes

### BottomNavigation

* [Honor the `animated` param when changing the hidden state of the bottom navigation bar.](https://github.com/material-components/material-components-ios/commit/cdf7ffccc2a4ab366b630eae460099ce977ea2c7) (Nobody)

### NavigationDrawer

* [Increase code coverage by adding more tests.](https://github.com/material-components/material-components-ios/commit/1e8dcc273e9c37d8cd4aad4167ec415ccc13b9be) (Yarden Eitan)

## Multi-component changes

* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/1abdf167609ad6283cef7dd687a6e8e5b399a1e5) (Jeff Verkoeyen)
* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/29803522c60f81168bc4fcf881b2d14bae554f42) (Jeff Verkoeyen)
* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/2a8a6ac1c911ad256dfd5a2cc4762c7b46338d8e) (Jeff Verkoeyen)
* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/4c86b139e41fc1dd5688f7d2fdfbb90d511ff3c4) (Jeff Verkoeyen)
* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/8ce743ce8a43529d4b8c2dfe42dd64c5b608c050) (Jeff Verkoeyen)
* [Optimizing imports](https://github.com/material-components/material-components-ios/commit/c53f44398e9605b38643a5ddcceefed71928cf25) (Jeff Verkoeyen)

---

# 122.0.0

In this major release, we have made some API-breaking changes and landed some bug fixes and test improvements.
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponents.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'

Pod::Spec.new do |mdc|
mdc.name = "MaterialComponents"
mdc.version = "122.0.0"
mdc.version = "122.0.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"
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsEarlGreyTests.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsEarlGreyTests"
s.version = "122.0.0"
s.version = "122.0.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."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsExamples.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsExamples"
s.version = "122.0.0"
s.version = "122.0.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."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsSnapshotTests.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end

Pod::Spec.new do |s|
s.name = "MaterialComponentsSnapshotTests"
s.version = "122.0.0"
s.version = "122.0.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"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
122.0.0
122.0.1
4 changes: 2 additions & 2 deletions catalog/MDCCatalog/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>122.0.0</string>
<string>122.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>122.0.0</string>
<string>122.0.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down
4 changes: 2 additions & 2 deletions catalog/MDCDragons/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>122.0.0</string>
<string>122.0.1</string>
<key>CFBundleVersion</key>
<string>122.0.0</string>
<string>122.0.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion catalog/MaterialCatalog/MaterialCatalog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialCatalog"
s.version = "122.0.0"
s.version = "122.0.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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import "MaterialButtons.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"

@interface ActionSheetComparisonExample : UIViewController

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import "MaterialButtons.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"

@interface ActionSheetTypicalUseExample : UIViewController <MDCActionSheetControllerDelegate>

Expand Down
2 changes: 1 addition & 1 deletion components/ActionSheet/tests/unit/ActionSheetTestHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#import <CoreImage/CoreImage.h>

#import "../../src/private/MDCActionSheetHeaderView.h"
#import "../../src/private/MDCActionSheetItemTableViewCell.h"
#import "MaterialActionSheet.h"

@implementation ActionSheetTestHelpers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import "MDCActionSheetController.h"
#import "MDCActionSheetControllerDelegate.h"
#import "MDCBottomSheetPresentationController.h"
#import "MaterialBottomSheet.h"

@interface ActionSheetControllerDelegate : NSObject <MDCActionSheetControllerDelegate>
@property(nonatomic, readonly) MDCActionSheetController *dismissedActionSheetController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#import "../../src/private/MDCActionSheetItemTableViewCell.h"
#import "MaterialActionSheet.h"
#import "ActionSheetTestHelpers.h"
#import "MaterialInk.h"
#import "MaterialRipple.h"

@interface MDCActionSheetController (TestingRipple)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@

#import "../../src/private/MDCActionSheetHeaderView.h"
#import "../../src/private/MDCActionSheetItemTableViewCell.h"
#import "MaterialActionSheet.h"
#import "MaterialActionSheet+Theming.h"
#import "MaterialAvailability.h"
#import "MaterialShadowElevations.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"

static const CGFloat kHighAlpha = (CGFloat)0.87;
static const CGFloat kMediumAlpha = (CGFloat)0.6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import <XCTest/XCTest.h>

#import "../../src/private/MDCActionSheetItemTableViewCell.h"
#import "MaterialActionSheet.h"
#import "ActionSheetTestHelpers.h"

@interface MDCActionSheetItemTableViewCell (Testing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MaterialAppBar.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialNavigationBar.h"
#import "MaterialSnapshot.h"

#import "MaterialAppBar+Theming.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MaterialAppBar.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialNavigationBar.h"
#import "MaterialSnapshot.h"

#import "MaterialAppBar+Theming.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import <XCTest/XCTest.h>

#import "MaterialAppBar.h"
#import "MaterialFlexibleHeader.h"

@interface AppBarNavigationControllerNavigationBarHiddenTests : XCTestCase
@property(nonatomic, strong) MDCAppBarNavigationController *appBarNavigationController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import <XCTest/XCTest.h>

#import "MaterialAppBar.h"
#import "MaterialFlexibleHeader.h"

@interface AppBarNavigationControllerNavigationBarHiddenWhenNavigationBarHiddenHidesAppBarTests
: XCTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import <XCTest/XCTest.h>

#import "MaterialAppBar.h"
#import "MaterialFlexibleHeader.h"

@interface AppBarNavigationControllerTests : XCTestCase

Expand Down
3 changes: 3 additions & 0 deletions components/AppBar/tests/unit/AppBarViewControllerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#import <XCTest/XCTest.h>

#import "MDCAppBarViewController.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialHeaderStackView.h"
#import "MaterialNavigationBar.h"

@interface AppBarViewControllerTests : XCTestCase

Expand Down
7 changes: 5 additions & 2 deletions components/Banner/examples/AppBarBannerExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@

#import <UIKit/UIKit.h>

#import "MaterialAppBar+Theming.h"
#import "MaterialAppBar.h"
#import "MaterialBanner+Theming.h"
#import "MaterialAppBar+Theming.h"
#import "MaterialBanner.h"
#import "MaterialBanner+Theming.h"
#import "MaterialButtons.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialHeaderStackView.h"
#import "MaterialContainerScheme.h"

@interface AppBarBannerExample : UITableViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#import "MaterialBanner.h"
#import "MaterialBanner+Theming.h"
#import "MaterialButtons.h"
#import "MaterialTypography.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
#import "BottomAppBarTypicalUseSupplemental.h"

#import "MaterialAppBar+ColorThemer.h"
#import "MaterialAppBar+TypographyThemer.h"
#import "MaterialAppBar.h"
#import "MaterialAppBar+TypographyThemer.h"
#import "MaterialBottomAppBar.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialColorScheme.h"
#import "MaterialTypographyScheme.h"

static NSString *const kCellIdentifier = @"cell";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#import "BottomAppBarTypicalUseViewController.h"

#import "MaterialBottomAppBar.h"

@interface BottomAppBarTypicalUseViewController ()

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

#import <UIKit/UIKit.h>

#import "MDCBottomNavigationBar+MaterialTheming.h"
#import "MaterialBottomNavigation.h"
#import "MDCBottomNavigationBar+MaterialTheming.h"
#import "MaterialColorScheme.h"
#import "MaterialTypographyScheme.h"
#import "MaterialContainerScheme.h"

@interface BottomNavigationBlurExample : UIViewController <UICollectionViewDataSource>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

#import <UIKit/UIKit.h>

#import "MaterialAvailability.h"
#import "MaterialBottomNavigation.h"
#import "MDCBottomNavigationBar+MaterialTheming.h"
#import "MaterialPalettes.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"

@interface BottomNavigationTypicalUseExample : UIViewController <MDCBottomNavigationBarDelegate>

Expand Down
27 changes: 22 additions & 5 deletions components/BottomNavigation/src/MDCBottomNavigationBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

#import "private/MDCBottomNavigationBar+Private.h"
#import "private/MDCBottomNavigationLargeItemDialogView.h"
#import "MDCBottomNavigationBarControllerDelegate.h"
#import "MaterialBottomNavigation.h"
#import "MaterialApplication.h"

// A context for Key Value Observing
static void *const kObservationContext = (void *)&kObservationContext;
Expand Down Expand Up @@ -263,16 +261,35 @@ - (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated {

_navigationBarHidden = hidden;

MDCBottomNavigationBar *navigationBar = self.navigationBar;
self.navigationBarItemsBottomAnchorConstraint.active = !hidden;
self.navigationBarBottomAnchorConstraint.constant =
hidden ? CGRectGetHeight(self.navigationBar.frame) : 0;
hidden ? CGRectGetHeight(navigationBar.frame) : 0;

[UIView animateWithDuration:kNavigationBarHideShowAnimationDuration
void (^completionBlock)(BOOL) = nil;

if (hidden && animated) {
// For animated hides we deffer updating the nav-bar hidden state until the animation finishes.
completionBlock = ^(BOOL finished) {
if (finished) {
// Hide the view to avoid visual artifacts on rotations.
navigationBar.hidden = hidden;
}
};
} else {
// Update `hidden` state immediately for unhide or non-animated transitions to ensure it gets
// applied in the same run loop.
navigationBar.hidden = hidden;
}

NSTimeInterval duration = animated ? kNavigationBarHideShowAnimationDuration : 0;
[UIView animateWithDuration:duration
animations:^{
[self.view setNeedsLayout];
[self.view layoutIfNeeded];
[self updateNavigationBarInsets];
}];
}
completion:completionBlock];
}

#pragma mark - MDCBottomNavigationBarDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import "MaterialBottomNavigation.h"
#import "MaterialInk.h"
#import "MaterialSnapshot.h"
#import "supplemental/MDCBottomNavigationSnapshotTestMutableTraitCollection.h"
#import "supplemental/MDCBottomNavigationSnapshotTestUtilities.h"
#import "supplemental/MDCFakeBottomNavigationBar.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MaterialBottomNavigation.h"
#import "MaterialSnapshot.h"

#import "MDCBottomNavigationBarController.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#import "MDCBottomNavigationBar+MaterialTheming.h"
#import "MaterialInk.h"
#import "MaterialSnapshot.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"

static const CGFloat kWidthWide = 1600;
static const CGFloat kWidthNarrow = 240;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MaterialBottomNavigation.h"
#import "MaterialBottomNavigation+Theming.h"

#import <XCTest/XCTest.h>

#import "../../src/private/MDCBottomNavigationItemView.h"
#import "MaterialInk.h"
#import "MaterialSnapshot.h"
#import "MaterialColorScheme.h"
#import "MaterialContainerScheme.h"
#import "MaterialTypographyScheme.h"

static const CGFloat kFakeWidth = 500;
static const CGFloat kFakeHeight = 75;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#import <XCTest/XCTest.h>

#import "../../src/private/MDCBottomNavigationItemBadge.h"
#import "MaterialBottomNavigation.h"

@interface BottomNavigationItemBadgeTests : XCTestCase
@property(nonatomic, strong) MDCBottomNavigationItemBadge *badge;
Expand Down
Loading

0 comments on commit 2c73e2d

Please sign in to comment.