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
yarneo committed Aug 18, 2020
2 parents 0f491bc + 5d54632 commit c6c5f4b
Show file tree
Hide file tree
Showing 53 changed files with 1,613 additions and 251 deletions.
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
# 113.1.0

In this minor release we have added a ScalableFontDescriptor library to represent custom scalable fonts from iOS 11 and up, added UILargeContentViewer support to AppBar, NavigationBar, TabBarView, as well as other improvements.

## New deprecations

* We have deprecated some MDCSnackbarManager class methods. Please use MDCSnackbarManager.defaultManager and their corresponding instance methods instead.

## New features

On iOS 11 and up, using ScalableFontDescriptor enables you to describe a custom font and the corresponding UIFontMetrics that enable the font to scale in response to Dynamic Type settings.
This type enables you to pair font descriptors with specific UIFontMetrics. This is most commonly used for describing the metrics of a collection of custom fonts.

```swift
// Create the type scale.
let fontDescriptor = UIFontDescriptor(name: "CustomFont-Light", size: UIFont.labelFontSize)
let scalableFontDescriptor: MDCScalableFontDescriptor
if #available(iOS 11, *) {
scalableFontDescriptor = MDCScalableFontDescriptor(
fontDescriptor: fontDescriptor,
fontMetrics: UIFontMetrics(forTextStyle: .largeTitle)
)
} else {
scalableFontDescriptor = MDCScalableFontDescriptor(fontDescriptor: fontDescriptor)
}
// Use the scalable font descriptor.
if #available(iOS 11, *) {
label.font = scalableFontDescriptor.preferredFont(compatibleWith: label.traitCollection)
label.adjustsFontForContentSizeCategory = true
} else {
label.font = scalableFontDescriptor.baseFont()
}
```

You can now toggle if you would like that your BottomDrawer will display at fullscreen or not when in mobile landscape by setting the `shouldDisplayMobileLandscapeFullscreen` property on `MDCBottomDrawerViewController`.

```swift
let controller = MDCBottomDrawerViewController()
controller.shouldDisplayMobileLandscapeFullscreen = false
```

## Component changes

### BottomAppBar

* [Fix bug where FAB shadow would "bounce" when the position changed.](https://github.com/material-components/material-components-ios/commit/453eaa8a9a33e344276892ebb005ceaec205bab8) (Jeff Verkoeyen)

### BottomNavigation

* [modify layouts with division to use floor(), as not using this was causing some non integer pixel values, which then resulted in a blurry layout](https://github.com/material-components/material-components-ios/commit/4a3058d59175eb455ef2f4e38df262b3cb6040cf) (Alyssa Weiss)

### ButtonBar

* [Adds Large Content Viewer support to MDCButtonBar, MDCNavigationBar, and MDCAppBar.](https://github.com/material-components/material-components-ios/commit/7f9d2cc3504b12da7a8dec3d8028c6b6102cd75e) (Yarden Eitan)
* [Fall back to accessibilityLabel for UILargeContentView when there is an image and no title.](https://github.com/material-components/material-components-ios/commit/ae3fc08aac3722feb31148011d52af7a7dc926f5) (Yarden Eitan)
* [Removes nullability modifiers from file.](https://github.com/material-components/material-components-ios/commit/4511a9f5e4d2909dbc0c84b65af45a7e0d7e03f2) (Nobody)

### Chips

* [Add a snapshot test case for MDCChipView with minimumSize set and centerVisible set to YES.](https://github.com/material-components/material-components-ios/commit/70d7a73cb4beaf4aa67e1d51626c6e1ab9b12b6a) (Wenyu Zhang)

### NavigationDrawer

* [Adds shouldDisplayMobileLandscapeFullscreen property to MDCBottomDrawerViewController.](https://github.com/material-components/material-components-ios/commit/d63936f671a2b113eb57cbcc589b4ba14a160309) (Nobody)

### ScalableFontDescriptor

* [Add a new ScalableFontDescriptor library.](https://github.com/material-components/material-components-ios/commit/1baab835a533df37b5e599444937f75deadca056) (Jeff Verkoeyen)

### Snackbar

* [ Material Snackbar support for selecting which window to present on.](https://github.com/material-components/material-components-ios/commit/c48cd65ade15bc29ab2329ed9e8032e1f5f01a2c) (Nobody)
* [Deprecate more class methods on MDCSnackbarManager.](https://github.com/material-components/material-components-ios/commit/8dc2768f7fabd5451cf8b8956098020465ac9088) (Jeff Verkoeyen)
* [Deprecate remaining class methods on MDCSnackbarManager.](https://github.com/material-components/material-components-ios/commit/b928b4d5c8e854288450be0938b8bfc3927ad46e) (Jeff Verkoeyen)
* [Internal change](https://github.com/material-components/material-components-ios/commit/ad2b16134b8dc04667604a7b8609686a1c401494) (Jeff Verkoeyen)

### Tabs

* [Adds Large Content Viewer support to MDCTabBarView.](https://github.com/material-components/material-components-ios/commit/eb13147f839302bd0b0b42fcb74f90cf94fe72f1) (Yarden Eitan)
* [Animate text and icon colors when switching tabs.](https://github.com/material-components/material-components-ios/commit/3022102dbfd9833f325fbebe9ff7bceccb0c5778) (Jeff Verkoeyen)

## Multi-component changes

* [Add isPointerInteractionEnabled availability check.](https://github.com/material-components/material-components-ios/commit/91a2953b0d052bd6411c178be22923445ed03b35) (Bryan Oltman)
* [Ensure transition controller pass-through accessors work following presentation controller initialization](https://github.com/material-components/material-components-ios/commit/225cd3c0cba6ac194c77a418188d1c4421227f2e) (Andrew Overton)
* [Move MDCBottomNavigationBarController to main podspec](https://github.com/material-components/material-components-ios/commit/b22eef526fcd0ecb164f5eab0d8e42a36fc313de) (Andrew Overton)

---

# 113.0.0

In this major release we have dropped support for iOS 9.0, added support to Catalyst for our catalogs, and enlarged the minimum touch target of the thumb view of our Slider component.
Expand Down
23 changes: 21 additions & 2 deletions 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 = "113.0.0"
mdc.version = "113.1.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 @@ -311,7 +311,7 @@ Pod::Spec.new do |mdc|
]
component.exclude_files = [
"components/#{component.base_name}/src/MDCBottomNavigationBarController.*",
"components/#{component.base_name}/src/MaterialBottomNavigationBeta.h"
"components/#{component.base_name}/src/MaterialBottomNavigation+BottomNavigationController.h"
]
component.resources = [
"components/#{component.base_name}/src/Material#{component.base_name}.bundle"
Expand Down Expand Up @@ -341,6 +341,25 @@ Pod::Spec.new do |mdc|
end
end

mdc.subspec "BottomNavigation+BottomNavigationController" do |component|
component.ios.deployment_target = '10.0'
component.public_header_files = [
"components/#{component.base_name.split('+')[0]}/src/MDCBottomNavigationBarController.h",
"components/#{component.base_name.split('+')[0]}/src/MaterialBottomNavigation+BottomNavigationController.h",
]
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/MDCBottomNavigationBarController.*",
"components/#{component.base_name.split('+')[0]}/src/MaterialBottomNavigation+BottomNavigationController.h",
]
component.dependency "MaterialComponents/BottomNavigation"
component.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
"components/#{component.base_name.split('+')[0]}/tests/unit/MDCBottomNavigationBarControllerTests.m",
"components/#{component.base_name.split('+')[0]}/tests/unit/MDCBottomNavigationBarControllerDelegateTests.m"
]
end
end

mdc.subspec "BottomNavigation+Theming" do |extension|
extension.ios.deployment_target = '10.0'
extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
Expand Down
41 changes: 0 additions & 41 deletions MaterialComponentsBeta.podspec

This file was deleted.

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 = "113.0.0"
s.version = "113.1.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
3 changes: 1 addition & 2 deletions 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 = "113.0.0"
s.version = "113.1.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 All @@ -13,6 +13,5 @@ Pod::Spec.new do |s|

s.resources = ['components/*/examples/resources/*', 'components/private/*/examples/resources/*', 'components/schemes/*/examples/resources/*']
s.dependency 'MaterialComponents'
s.dependency 'MaterialComponentsBeta'
s.public_header_files = ['components/*/examples/*.h', 'components/*/examples/supplemental/*.h', 'components/private/*/examples/*.h', 'components/schemes/*/examples/*.h']
end
3 changes: 1 addition & 2 deletions 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 = "113.0.0"
s.version = "113.1.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 All @@ -62,7 +62,6 @@ Pod::Spec.new do |s|
s.platform = :ios, '10.0'
s.requires_arc = true
s.dependency 'MaterialComponents'
s.dependency 'MaterialComponentsBeta'
s.dependency 'MaterialComponentsExamples'

# Top level sources are required. Without them, unit test targets do not show up in Xcode.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
113.0.0
113.1.0
2 changes: 0 additions & 2 deletions catalog/MDCCatalog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@
"${BUILT_PRODUCTS_DIR}/MDFTextAccessibility/MDFTextAccessibility.framework",
"${BUILT_PRODUCTS_DIR}/MaterialCatalog/MaterialCatalog.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponents/MaterialComponents.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponentsBeta/MaterialComponentsBeta.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponentsExamples/MaterialComponentsExamples.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponentsSnapshotTests/MaterialComponentsSnapshotTests.framework",
"${BUILT_PRODUCTS_DIR}/MotionAnimator/MotionAnimator.framework",
Expand All @@ -433,7 +432,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MDFTextAccessibility.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialCatalog.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponents.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponentsBeta.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponentsExamples.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponentsSnapshotTests.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MotionAnimator.framework",
Expand Down
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>113.0.0</string>
<string>113.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>113.0.0</string>
<string>113.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down
2 changes: 0 additions & 2 deletions catalog/MDCDragons.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
"${BUILT_PRODUCTS_DIR}/MDFInternationalization/MDFInternationalization.framework",
"${BUILT_PRODUCTS_DIR}/MDFTextAccessibility/MDFTextAccessibility.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponents/MaterialComponents.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponentsBeta/MaterialComponentsBeta.framework",
"${BUILT_PRODUCTS_DIR}/MaterialComponentsExamples/MaterialComponentsExamples.framework",
"${BUILT_PRODUCTS_DIR}/MotionAnimator/MotionAnimator.framework",
"${BUILT_PRODUCTS_DIR}/MotionInterchange/MotionInterchange.framework",
Expand All @@ -217,7 +216,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MDFInternationalization.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MDFTextAccessibility.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponents.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponentsBeta.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaterialComponentsExamples.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MotionAnimator.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MotionInterchange.framework",
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>113.0.0</string>
<string>113.1.0</string>
<key>CFBundleVersion</key>
<string>113.0.0</string>
<string>113.1.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 = "113.0.0"
s.version = "113.1.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
8 changes: 2 additions & 6 deletions catalog/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ target "MDCCatalog" do
'Banner+Theming/UnitTests',
'BottomAppBar/UnitTests',
'BottomNavigation/UnitTests',
'BottomNavigation+BottomNavigationController/UnitTests',
'BottomNavigation+Theming/UnitTests',
'BottomSheet/UnitTests',
'ButtonBar/UnitTests',
Expand Down Expand Up @@ -86,9 +87,6 @@ target "MDCCatalog" do
'Themes/UnitTests',
'Typography/UnitTests',
]
pod 'MaterialComponentsBeta', :path => '../', :testspecs => [
'BottomNavigation/UnitTests',
]
pod 'MaterialComponentsSnapshotTests', :path => '../', :testspecs => [
'SnapshotTests'
]
Expand All @@ -103,7 +101,6 @@ target "MDCActionExtension" do
project 'MDCCatalog.xcodeproj'
pod 'MaterialComponentsExamples', :path => '../'
pod 'MaterialComponents', :path => '../'
pod 'MaterialComponentsBeta', :path => '../'
pod 'CatalogByConvention', "~> 2.5"
pod 'MaterialCatalog', :path => 'MaterialCatalog/'

Expand All @@ -115,7 +112,6 @@ target "MDCDragons" do
project 'MDCDragons.xcodeproj'
pod 'CatalogByConvention', "~> 2.5"
pod 'MaterialComponents', :path => '../'
pod 'MaterialComponentsBeta', :path => '../'
pod 'MaterialComponentsExamples', :path => '../'
use_frameworks!
end
Expand All @@ -124,7 +120,7 @@ post_install do |installer|

mdc_xcconfigs = []
target_support_files_path = File.dirname(installer.pods_project.path) + "/" + "Target Support Files"
subdirectories = ["MaterialComponents", "MaterialComponentsBeta", "MaterialComponentsExamples", "Pods-MDCCatalog"]
subdirectories = ["MaterialComponents", "MaterialComponentsExamples", "Pods-MDCCatalog"]
subdirectories.each do |subdirectory|
subdirectory_path = target_support_files_path + "/" + subdirectory
Dir.foreach(subdirectory_path) do |file|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
#import <XCTest/XCTest.h>

#import "../../src/private/MDCActionSheetHeaderView.h"
#import "MaterialActionSheet.h"
#import "MDCActionSheetTestHelper.h"
#import "MaterialMath.h"
#import "MaterialBottomSheet.h"
#import "MaterialShadowElevations.h"
#import "MaterialMath.h"

static const CGFloat kSafeAreaAmount = 20;
static const CGFloat kDefaultDividerOpacity = (CGFloat)0.12;
Expand Down Expand Up @@ -259,6 +261,25 @@ - (void)testSetAlignTitlesWhenNoActionsHaveImages {
XCTAssertFalse(self.actionSheet.addLeadingPaddingToCell);
}

- (void)testPassThroughPropertiesToPresentationControllerWorkAfterItsInitialization {
// Given
[self.actionSheet addAction:[MDCActionSheetAction actionWithTitle:@"An action"
image:nil
handler:nil]];
NSString *expectedScrimAccessibilityLabel =
@"Accessibility label to be passed to presentation controller";
__unused UIView *forceLoadedViewResultingInInitializationOfPresentationController =
self.actionSheet.view;

// When
self.actionSheet.transitionController.scrimAccessibilityLabel = expectedScrimAccessibilityLabel;

// Then
NSString *actualScrimAccessibilityLabel =
self.actionSheet.mdc_bottomSheetPresentationController.scrimAccessibilityLabel;
XCTAssertEqualObjects(expectedScrimAccessibilityLabel, actualScrimAccessibilityLabel);
}

#pragma mark - Opening height

- (CGRect)setUpActionSheetWithHeight:(CGFloat)height
Expand Down
Loading

0 comments on commit c6c5f4b

Please sign in to comment.