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
codeman7 committed Jun 23, 2020
2 parents 6f114f5 + 836ea76 commit bb82074
Show file tree
Hide file tree
Showing 72 changed files with 1,521 additions and 1,292 deletions.
93 changes: 93 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,96 @@
# 110.0.0

In this major release we removed an API from `MDCProgressView` and fixed bugs in ActionSheet, Dialogs, ProgressView, Ripple, and TextControls.

## Breaking changes

In this release we removed the `-setMode:animated:completion:` method that was added in the previous release.

## New features

`MDCActionSheetController` now announces it has been presented when VoiceOver is enabled.

`MDCBottomDrawerViewController` now supports coloring the `trackingScrollView` via the theming extension.

`MDCRippleView` allows users to query if a ripple was added to a given view.

`MDCRippleTouchController` allows users to control the creation and reuse of ripple views.

`MDCTextControls` now support custom padding for the leading and trailing views.

## API changes

### NavigationDrawer

*new* method: `- applyThemeWithScheme:applyToTrackingScrollView:` in `MDCBottomDrawerViewController`

### Ripple

*new* method: `- rippleTouchController:rippleViewAtTouchLocation:` in `MDCRippleTouchControllerDelegate`

*new* method: `+ injectedRippleViewForView:` in `MDCRippleView`

### TextControls

*new* property: `leadingEdgePaddingOverride` in `MDCBaseTextArea`

*new* property: `trailingEdgePaddingOverride` in `MDCBaseTextArea`

*new* property: `leadingEdgePaddingOverride` in `MDCBaseTextField`

*new* property: `trailingEdgePaddingOverride` in `MDCBaseTextArea`

## Component changes

### ActionSheet

* [Add alert anouncement for voiceover users.](https://github.com/material-components/material-components-ios/commit/b98382a762ed3349b8761a1cb528bf707ef69a64) (Yarden Eitan)

### BottomNavigation

* [Re-order TOC in README](https://github.com/material-components/material-components-ios/commit/55d64ef79955d31eb558574a7522694e9a98bc88) (Andrew Overton)

### Chips

* [Add safe guard to prevent setting visibleAreaInsets using same values.](https://github.com/material-components/material-components-ios/commit/22f92d4d10c3ec9d92481d888bc663634d852671) (Wenyu Zhang)

### Dialogs

* [Add visibleAreaInsets support.](https://github.com/material-components/material-components-ios/commit/313135ece2b6a7f3cd3223022741192ffbd41897) (Wenyu Zhang)

### List

* [Replace list docs](https://github.com/material-components/material-components-ios/commit/0ec073f1bc03e28d6fdb1996fc1a6a7bf5443ad7) (Andrew Overton)

### NavigationDrawer

* [Add method to theming extension to color tracking scrollview.](https://github.com/material-components/material-components-ios/commit/a5c3b4938a872eefe8ef53e686ab5514151ec6fc) (Nobody)

### ProgressView

* [Change float to CGFloat](https://github.com/material-components/material-components-ios/commit/685082b9a78de7c59dfbec8cf6324aba4d8b7ecd) (Andrew Overton)
* [Make indeterminate progress view example showing how transition looks.](https://github.com/material-components/material-components-ios/commit/d5b47fca05494783ce820a09afbdc78f3fd461c4) (Wenyu Zhang)
* [Remove setMode:animated:completion API.](https://github.com/material-components/material-components-ios/commit/00a6cab90b982a855493fc8968d1c4993707ed69) (Wenyu Zhang)

### Ripple

* [Add a convenience API for finding the ripple view in the view's subviews.](https://github.com/material-components/material-components-ios/commit/5462d27375bfadf6e4b78e86c4725da2ea8a134f) (Yarden Eitan)
* [Add delegate method to RippleTouchController existing in InkTouchController.](https://github.com/material-components/material-components-ios/commit/a68702e3a4d833ce6456189ccb2f888ceea4a63b) (Yarden Eitan)
* [Align ripple starting size with spec guidance.](https://github.com/material-components/material-components-ios/commit/ef53fab9cac468f10d2e1b80c3329cf7cea0f0bc) (Yarden Eitan)
* [Move the radius calculation into its own method.](https://github.com/material-components/material-components-ios/commit/3817d4523195da79e9831a927d2e70562b4e1bd1) (Yarden Eitan)
* [Update alpha value of Ripple to 0.12 instead of 0.16](https://github.com/material-components/material-components-ios/commit/f425b8995b257a45e8414503e4b04ba653ebd917) (Yarden Eitan)

### TextControls

* [Add padding customizing properties to MDCBaseTextField and MDCBaseTextArea](https://github.com/material-components/material-components-ios/commit/9c99bc9006f20b3e918a63b914f8f912f561383a) (Andrew Overton)
* [Separate side padding into leading/trailing padding](https://github.com/material-components/material-components-ios/commit/b7f5b0dd2b972e31b2edc89909acb9e1bab488e3) (Andrew Overton)

### Typography

* [Use MDFTextAccessibility's isLargeForContrastRatios.](https://github.com/material-components/material-components-ios/commit/244dd62b6c59218c9847fcf948f17aecdb727a45) (Jeff Verkoeyen)

---

# 109.8.0

In this minor release we added indeterminate mode to `MDCProgressView`. As well as various bug fixes to ActionSheet, Banner, Dialog, and TextFields components.
Expand Down
3 changes: 2 additions & 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 = "109.8.0"
mdc.version = "110.0.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"
Expand Down Expand Up @@ -1893,6 +1893,7 @@ Pod::Spec.new do |mdc|

component.dependency "MaterialComponents/private/Application"
component.dependency "MaterialComponents/private/Math"
component.dependency "MDFTextAccessibility"

component.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsBeta.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |mdc|
mdc.name = "MaterialComponentsBeta"
mdc.version = "109.8.0"
mdc.version = "110.0.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"
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 = "109.8.0"
s.version = "110.0.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."
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 = "109.8.0"
s.version = "110.0.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."
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 = "109.8.0"
s.version = "110.0.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"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
109.8.0
110.0.0
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>109.8.0</string>
<string>110.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>109.8.0</string>
<string>110.0.0</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>109.8.0</string>
<string>110.0.0</string>
<key>CFBundleVersion</key>
<string>109.8.0</string>
<string>110.0.0</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 = "109.8.0"
s.version = "110.0.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"
Expand Down
29 changes: 29 additions & 0 deletions components/ActionSheet/src/MDCActionSheetController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#import "private/MDCActionSheetHeaderView.h"
#import "private/MDCActionSheetItemTableViewCell.h"
#import "private/MaterialActionSheetStrings.h"
#import "private/MaterialActionSheetStrings_table.h"
#import "MDCActionSheetControllerDelegate.h"
#import "MaterialAvailability.h"
#import "MaterialShadowElevations.h"
Expand All @@ -27,6 +29,9 @@
static const CGFloat kActionTextAlpha = (CGFloat)0.87;
static const CGFloat kDividerDefaultAlpha = (CGFloat)0.12;

// The Bundle for string resources.
static NSString *const kMaterialActionSheetBundle = @"MaterialActionSheet.bundle";

@interface MDCActionSheetController () <MDCBottomSheetPresentationControllerDelegate,
UITableViewDelegate,
UITableViewDataSource>
Expand Down Expand Up @@ -203,6 +208,12 @@ - (void)viewDidLoad {
[self.view addSubview:self.tableView];
[self.view addSubview:self.header];
[self.view addSubview:self.headerDividerView];

NSString *key =
kMaterialActionSheetStringTable[kStr_MaterialActionSheetPresentedAccessibilityAnnouncement];
NSString *announcement = NSLocalizedStringFromTableInBundle(
key, kMaterialActionSheetStringsTableName, [[self class] bundle], @"Alert");
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, announcement);
}

- (void)viewDidLayoutSubviews {
Expand Down Expand Up @@ -590,4 +601,22 @@ - (void)bottomSheetPresentationControllerDismissalAnimationCompleted:
}
}

#pragma mark - Resource bundle

+ (NSBundle *)bundle {
static NSBundle *bundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
bundle = [NSBundle bundleWithPath:[self bundlePathWithName:kMaterialActionSheetBundle]];
});

return bundle;
}

+ (NSString *)bundlePathWithName:(NSString *)bundleName {
NSBundle *bundle = [NSBundle bundleForClass:[MDCActionSheetController class]];
NSString *resourcePath = [(nil == bundle ? [NSBundle mainBundle] : bundle) resourcePath];
return [resourcePath stringByAppendingPathComponent:bundleName];
}

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Accessibility announcement when an action sheet is displayed. */
"MaterialActionSheetPresentedAccessibilityAnnouncement" = "Alert";
23 changes: 23 additions & 0 deletions components/ActionSheet/src/private/MaterialActionSheetStrings.h
Original file line number Diff line number Diff line change
@@ -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.

// GENERATED CODE: DO NOT EDIT BY HAND
// GENERATED FROM:
// components/ActionSheet/src/MaterialActionSheet.bundle/Resources/en.lproj/MaterialActionSheet.strings
// GENERATED BY: generate_string_tables.py

typedef enum {
kStr_MaterialActionSheetPresentedAccessibilityAnnouncement = 0,
} MaterialActionSheetStringId;
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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.

// GENERATED CODE: DO NOT EDIT BY HAND
// GENERATED FROM:
// components/ActionSheet/src/MaterialActionSheet.bundle/Resources/en.lproj/MaterialActionSheet.strings
// GENERATED BY: generate_string_tables.py

#import <Foundation/Foundation.h>

// A table of string keys to look-up localized strings in the bundle.
// This table is to be indexed using the generated enum.

static NSString *const kMaterialActionSheetStringTable[] = {
@"MaterialActionSheetPresentedAccessibilityAnnouncement", // Alert
};
#define kNumMaterialActionSheetStrings 1
#define kMaterialActionSheetStringsOffset 0
#define kMaterialActionSheetStringsEnd 10000
static NSString *const kMaterialActionSheetStringsTableName = @"MaterialActionSheet";
2 changes: 1 addition & 1 deletion components/BottomNavigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ navigation icon takes you directly to the associated view or refreshes the curre
## Contents

* [Using bottom navigation](#using-bottom-navigation)
* [Making bottom navigation accessible](#making-bottom-navigation-accessible)
* [Installing bottom navigation](#installing-bottom-navigation)
* [Making bottom navigation accessible](#making-bottom-navigation-accessible)
* [Theming bottom navigation](#theming-bottom-navigation)

- - -
Expand Down
4 changes: 4 additions & 0 deletions components/Chips/src/MDCChipView.m
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ - (BOOL)pointInside:(CGPoint)point withEvent:(__unused UIEvent *)event {
#pragma mark - Visible area

- (void)setVisibleAreaInsets:(UIEdgeInsets)visibleAreaInsets {
if (UIEdgeInsetsEqualToEdgeInsets(visibleAreaInsets, _visibleAreaInsets)) {
return;
}

_visibleAreaInsets = visibleAreaInsets;

if (UIEdgeInsetsEqualToEdgeInsets(visibleAreaInsets, UIEdgeInsetsZero)) {
Expand Down
8 changes: 8 additions & 0 deletions components/Dialogs/src/MDCAlertControllerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
The edge insets around the actions against the dialog edges and its neighbor, which could be any of
the other elements: the message, accessory view, title, title icon or title icon view.
The action insets are taken based on the visible area of the button, not its frame.
Since the default size of the alert buttons do not meet minimum touch area requirement,
the buttons frame are larger than the visible area, allowing for a large enough touch area.
Default value is UIEdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8).
*/
@property(nonatomic, assign) UIEdgeInsets actionsInsets;
Expand All @@ -103,6 +107,10 @@
The vertical space between the action buttons when the buttons are vertically aligned, and if more
than one button is presented.
The action buttons represent the visible areas of the buttons, it can differ from the frame when
the button doesn't meet the minimum touch area requirement and its frame is adjusted to be larger
then its visible area.
Default value is 12.
*/
@property(nonatomic, assign) CGFloat actionsVerticalMargin;
Expand Down
Loading

0 comments on commit bb82074

Please sign in to comment.