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
featherless committed Sep 17, 2019
2 parents 8e8b719 + ed012c9 commit 9e13c82
Show file tree
Hide file tree
Showing 63 changed files with 499 additions and 283 deletions.
85 changes: 84 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
# 90.0.0

This major release deletes several deprecated APIs and annotates several APIs as deprecated.

## Breaking changes

Buttons' `buttonWithShape:` API has been deleted. Please use `floatingButtonWithShape:` instead.

FlexibleHeader's `behavior` API has been deleted. Please use `shiftBehavior` instead.

NavigationBar's `textAlignment` API has been deleted. Please use `titleAlignment` instead.

## New deprecations

ActivityIndicator's ColorThemer is now deprecated. Please theme MDCActivityIndicator's colors
directly instead.

ButtonBar's Theming extension and TypographyThemer are now deprecated. ButtonBar is not intended to
be themed as a standalone component. Please theme it via the AppBar component's Theming extension
instead.

BottomAppBar's ColorThemer is now deprecated. There is presently no replacement. Please indicate
interest in a replacement at
https://github.com/material-components/material-components-ios/issues/7172.

## Upcoming breaking changes

BasicFontScheme is now a standalone target within schemes/Typography with the CocoaPods spec name:
`MaterialComponents/schemes/Typography+BasicFontScheme`. For backwards compatibility, this new
target is still a dependency of `MaterialComponents/schemes/Typography. This dependency will be
removed as a breaking change in a subsequent release, with the intent of eventually deprecating
and deleting the BasicFontScheme target altogether.

## Changes

### ActionSheet

* [Minor style cleanup of import statements. (#8428)](https://github.com/material-components/material-components-ios/commit/42a912da8cdf879f703f983f4fffa1968c6e68c3) (featherless)

### ActivityIndicator

* [Deprecate ColorThemer. (#8430)](https://github.com/material-components/material-components-ios/commit/97bb87866b56bfa80127f2b36cc271d98d90b44f) (featherless)

### BottomAppBar

* [Deprecate the ColorThemer. (#8438)](https://github.com/material-components/material-components-ios/commit/a01712388be973c3912e2b32d3bd57e816dfa120) (featherless)

### ButtonBar

* [Deprecate Theming and TypographyThemer. (#8432)](https://github.com/material-components/material-components-ios/commit/0f7ee59f139b3e1e48cddd1aada1de4715c54b8a) (featherless)

### Buttons

* [Clarify the alternative to shouldRaiseOnTouch. (#8422)](https://github.com/material-components/material-components-ios/commit/2085de156ca18cd61275c33cd8a3eca157c7b388) (featherless)
* [Delete MDCFloatingButton's buttonWithShape method (#8416)](https://github.com/material-components/material-components-ios/commit/cf04f20a9ede9c6e9a4b17d519365628ed05857a) (Bryan Oltman)

### FlexibleHeader

* [Delete unused behavior property (#8414)](https://github.com/material-components/material-components-ios/commit/700908fae5ecc8341dfb3ec3837fc4edae7ffa46) (Bryan Oltman)

### NavigationBar

* [Delete unused MDCNavigationBar textAlignment property (#8411)](https://github.com/material-components/material-components-ios/commit/14febdb6a1770f89f0a3b58463d906b814f9deec) (Bryan Oltman)

### TextFields

* [Try new approach to snapshot testing textfields (#8407)](https://github.com/material-components/material-components-ios/commit/2d747d5da18b106624e62a21d33d0f37cd4f1e3b) (Andrew Overton)

### private/ThumbTrack

* [Delete unused hasShadow property (#8412)](https://github.com/material-components/material-components-ios/commit/d158f657a28ecccd3f7735b9ca96bdad08ffb8d8) (Bryan Oltman)

### schemes/Typography

* [Pull BasicFontScheme out to an extension. (#8425)](https://github.com/material-components/material-components-ios/commit/c0e74b1d201f546164d411063e7eaf6b3bffd51a) (featherless)
* [Rename MaterialTypography+BasicFontScheme.h to MaterialTypographyScheme+BasicFontScheme.h. (#8442)](https://github.com/material-components/material-components-ios/commit/d54d89b413ab7d1eb1db452656d9209cf123c739) (featherless)

## Multi-component changes

* [Fix theming docs. (#8431)](https://github.com/material-components/material-components-ios/commit/c5188966f65f39edb269ee13c63eaa4185c31d92) (Robert Moore)

---

# 89.0.0

This major release deletes several deprecated APIs, includes bug fixes for iOS 13, and improves
Expand All @@ -22,7 +105,7 @@ Chips' `inkColor` API has been deleted.

### FlexibleHeader

* [Update inferred status bar style on light backgrounds for iOS 13 (#8380)](https://github.com/material-components/material-components-ios/commit/f52abf7a87409d79071fe25596648b7a61079b63) (Robert Moore)
* [Update inferred status bar style on light backgrounds for iOS 13 (#8380)](https://github.com/material-components/material-components-ios/commit/f52abf7a87409d79071fe25596648b7a61079b63) (Cameron Spickert)

### Slider

Expand Down
15 changes: 14 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 = "89.0.0"
mdc.version = "90.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 @@ -123,6 +123,8 @@ Pod::Spec.new do |mdc|
end
end

# This subspec is deprecated.
# Please theme MDCActivityIndicator's colors directly instead.
mdc.subspec "ActivityIndicator+ColorThemer" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = [
Expand Down Expand Up @@ -604,6 +606,8 @@ Pod::Spec.new do |mdc|
extension.dependency "MaterialComponents/Themes"
end

# ButtonBar is not intended to be themed as a standalone component.
# Please theme it via the AppBar component's Theming extension instead.
mdc.subspec "ButtonBar+TypographyThemer" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = [
Expand Down Expand Up @@ -2093,6 +2097,7 @@ Pod::Spec.new do |mdc|
scheme.public_header_files = "components/schemes/#{scheme.base_name}/src/*.h"
scheme.source_files = "components/schemes/#{scheme.base_name}/src/*.{h,m}"
scheme.dependency "MaterialComponents/Typography"
scheme.dependency "MaterialComponents/schemes/Typography+BasicFontScheme"

scheme.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
Expand All @@ -2102,6 +2107,14 @@ Pod::Spec.new do |mdc|
unit_tests.resources = "components/schemes/#{scheme.base_name}/tests/unit/resources/*"
end
end
scheme_spec.subspec "Typography+BasicFontScheme" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = "components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = [
"components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}",
"components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
]
end
end

mdc.subspec "private" do |private_spec|
Expand Down
4 changes: 3 additions & 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 = "89.0.0"
mdc.version = "90.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 Expand Up @@ -69,6 +69,8 @@ Pod::Spec.new do |mdc|
end
end

# ButtonBar is not intended to be themed as a standalone component.
# Please theme it via the AppBar component's Theming extension instead.
mdc.subspec "ButtonBar+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"
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 = "89.0.0"
s.version = "90.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 = "89.0.0"
s.version = "90.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 = "89.0.0"
s.version = "90.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 @@
89.0.0
90.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>89.0.0</string>
<string>90.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>89.0.0</string>
<string>90.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>89.0.0</string>
<string>90.0.0</string>
<key>CFBundleVersion</key>
<string>89.0.0</string>
<string>90.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 = "89.0.0"
s.version = "90.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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#import "MDCActionSheetController+MaterialTheming.h"

#import "MaterialColor.h"

static const CGFloat kHighAlpha = (CGFloat)0.87;
Expand Down
19 changes: 11 additions & 8 deletions components/ActivityIndicator/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ objc_bundle(
bundle_imports = [":BundleFiles"],
)

mdc_extension_objc_library(
name = "ColorThemer",
deps = [
":ActivityIndicator",
"//components/schemes/Color",
],
)

mdc_unit_test_swift_library(
name = "unit_test_swift_sources",
deps = [
Expand Down Expand Up @@ -121,3 +113,14 @@ mdc_snapshot_test(
":snapshot_test_lib",
],
)

# Deprecated

mdc_extension_objc_library(
name = "ColorThemer",
deprecation = "Please theme MDCActivityIndicator's colors directly instead.",
deps = [
":ActivityIndicator",
"//components/schemes/Color",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#import <UIKit/UIKit.h>

#import "MaterialActivityIndicator+ColorThemer.h"
#import "MaterialActivityIndicator.h"
#import "MaterialColorScheme.h"
#import "MaterialPalettes.h"
#import "supplemental/ActivityIndicatorExampleViewControllerSupplemental.h"

Expand Down Expand Up @@ -49,8 +49,7 @@ - (void)viewDidLoad {

// Themed determinate activity indicator
self.activityIndicator1 = [[MDCActivityIndicator alloc] init];
[MDCActivityIndicatorColorThemer applySemanticColorScheme:self.colorScheme
toActivityIndicator:self.activityIndicator1];
self.activityIndicator1.cycleColors = @[ self.colorScheme.primaryColor ];
self.activityIndicator1.delegate = self;
self.activityIndicator1.indicatorMode = MDCActivityIndicatorModeDeterminate;
[self.activityIndicator1 sizeToFit];
Expand All @@ -59,8 +58,7 @@ - (void)viewDidLoad {
self.activityIndicator2 = [[MDCActivityIndicator alloc] init];
self.activityIndicator2.delegate = self;
self.activityIndicator2.indicatorMode = MDCActivityIndicatorModeDeterminate;
[MDCActivityIndicatorColorThemer applySemanticColorScheme:self.colorScheme
toActivityIndicator:self.activityIndicator2];
self.activityIndicator2.cycleColors = @[ self.colorScheme.primaryColor ];
[self.activityIndicator2 sizeToFit];

// Indeterminate activity indicator with custom colors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
details on replacement APIs.
Learn more at docs/theming.md#migration-guide-themers-to-theming-extensions
*/
@interface MDCActivityIndicatorColorThemer : NSObject
@end

@interface MDCActivityIndicatorColorThemer (ToBeDeprecated)
__deprecated_msg("Please theme MDCActivityIndicator's colors directly instead.")
@interface MDCActivityIndicatorColorThemer : NSObject

/**
Applies a color scheme's properties to an MDCActivityIndicator.
Expand All @@ -40,7 +38,8 @@
Learn more at docs/theming.md#migration-guide-themers-to-theming-extensions
*/
+ (void)applySemanticColorScheme:(nonnull id<MDCColorScheming>)colorScheme
toActivityIndicator:(nonnull MDCActivityIndicator *)activityIndicator;
toActivityIndicator:(nonnull MDCActivityIndicator *)activityIndicator
__deprecated_msg("Please theme MDCActivityIndicator's colors directly instead.");

/**
Applies a color scheme's properties to an MDCActivityIndicator.
Expand All @@ -53,6 +52,7 @@
@param activityIndicator A component instance to which the color scheme should be applied.
*/
+ (void)applyColorScheme:(nonnull id<MDCColorScheme>)colorScheme
toActivityIndicator:(nonnull MDCActivityIndicator *)activityIndicator;
toActivityIndicator:(nonnull MDCActivityIndicator *)activityIndicator
__deprecated_msg("Please theme MDCActivityIndicator's colors directly instead.");

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

#import "MDCActivityIndicatorColorThemer.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
@implementation MDCActivityIndicatorColorThemer
#pragma clang diagnostic pop

+ (void)applySemanticColorScheme:(nonnull id<MDCColorScheming>)colorScheme
toActivityIndicator:(nonnull MDCActivityIndicator *)activityIndicator {
Expand Down
22 changes: 13 additions & 9 deletions components/BottomAppBar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ mdc_objc_library(
visibility = ["//visibility:private"],
)

mdc_extension_objc_library(
name = "ColorThemer",
deps = [
":BottomAppBar",
"//components/Themes",
"//components/schemes/Color",
],
)

mdc_examples_objc_library(
name = "ObjcExamples",
deps = [
Expand Down Expand Up @@ -118,3 +109,16 @@ mdc_snapshot_test(
name = "snapshot_tests",
deps = [":snapshot_test_lib"],
)

# Deprecated

mdc_extension_objc_library(
name = "ColorThemer",
deprecation = "Please indicate interest in a replacement API at" +
" https://github.com/material-components/material-components-ios/issues/7172",
deps = [
":BottomAppBar",
"//components/Themes",
"//components/schemes/Color",
],
)
14 changes: 12 additions & 2 deletions components/BottomAppBar/examples/BottomAppBarTypicalUseExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,18 @@ - (void)viewDidLoad {
[self commonBottomBarSetup];

[self.bottomBarView.floatingButton applySecondaryThemeWithScheme:[self containerScheme]];
[MDCBottomAppBarColorThemer applySurfaceVariantWithSemanticColorScheme:self.colorScheme
toBottomAppBarView:self.bottomBarView];

self.bottomBarView.barTintColor = self.colorScheme.surfaceColor;
UIColor *barItemTintColor =
[self.colorScheme.onSurfaceColor colorWithAlphaComponent:(CGFloat)0.6];
self.bottomBarView.leadingBarItemsTintColor = barItemTintColor;
self.bottomBarView.trailingBarItemsTintColor = barItemTintColor;
[self.bottomBarView.floatingButton setBackgroundColor:self.colorScheme.primaryColor
forState:UIControlStateNormal];
[self.bottomBarView.floatingButton setTitleColor:self.colorScheme.onPrimaryColor
forState:UIControlStateNormal];
[self.bottomBarView.floatingButton setImageTintColor:self.colorScheme.onPrimaryColor
forState:UIControlStateNormal];
}

- (void)didTapFloatingButton:(id)sender {
Expand Down
Loading

0 comments on commit 9e13c82

Please sign in to comment.