Releases: material-components/material-components-ios
v76.0.0
76.0.0
This major release changes the Material Theming colors for Cards cells. It also includes bug fixes
for Navigation Drawer and Text Fields.
Breaking changes
The MDCCardsColorThemer now sets the imageTintColor:forState:
on MDCCardCollectionCell. This
property was previously unset by the themer.
API changes
Collections
MDCCollectionViewEditing
new property: minimumPressDuration
in MDCCollectionViewEditing
Changes
ActionSheet
- Make examples use container scheme (#6493) (Cody Weaver)
BottomNavigation
- Elevates the BottomNavigationBarController to beta status and re-adds its unit tests. (#6311) (Eric Lee)
- Example is self-contained. (#6480) (Robert Moore)
- Fix import in VC. (#6470) (Robert Moore)
- Lays out the bar when titleVisibility is changed (#6152) (Bartholomew Furrow)
- Add snapshot tests. (#6521) (Robert Moore)
- Move controller out of
/beta
. (#6501) (Robert Moore) - Stop excluding VC example. (#6515) (Robert Moore)
Buttons
- Remove broken link. (#6518) (Robert Moore)
- Update examples to use theming extensions (#6475) (Cody Weaver)
- Update theming docs for theming extensions (#6467) (Cody Weaver)
Cards
- Fix elevation values for Highlighted and Selected for Cards in themer. (#6485) (Yarden Eitan)
- added correct theming for selected icon (#6482) (Yarden Eitan)
Collections
- Customize reorder long-press timing. (#6469) (Robert Moore)
Dialogs
- Fix broken link to beta documentation. (#6506) (featherless)
- Update theming docs for theming extension (#6496) (Cody Weaver)
NavigationDrawer
- Fix issue when setting
trackingScrollView
(#6492) (Cody Weaver) - Fix issue where drawer opens passed
initialDrawerFactor
(#6491) (Cody Weaver) - Fix issue where scrim is shown below content (#6514) (Cody Weaver)
- fix bottom drawer rest in the middle of corner radius animation (#6516) (Wenyu Zhang)
Ripple
- Fail the ripple gesture when other scroll view gestures are competing unless they are tap or long press gestures. (#6487) (Yarden Eitan)
- Remove the notion of state and its implementation from the ripple touch controller (#6486) (Yarden Eitan)
- provide completion block for cancellation (#6488) (Yarden Eitan)
TextFields
- Fixed issue: Placeholder label gets stuck in expanded state when switching between controls (#6269) (Sergey Aleksandrov)
Multi-component changes
- Move shapes from components/private to components/ (#6495) (Yarden Eitan)
- {clang-format} Format the components. (#6347) (Robert Moore)
v75.0.1
75.0.1
This patch release reformats the entire code base to align to the latest
Google Objective-C Style enforced by clang-format.
Multi-component changes
- {clang-format} Format the components. (#6347) (Robert Moore)
v75.0.0
75.0.0
This major release includes a change to the behavior of MDCButton's
borderWidthForState:
API and the behavior of MDCSnackbarManager's
shouldEnableAccessibilityViewIsModal
property. Improved support for the
bazel build system is introduced for several
components.
Breaking changes
MDCButton's borderWidthForState:
behavior now matches that of UIButton's
forState:
properties. Any state without an explicitly-set value will
fall-back to the value for the UIControlStateNormal
state. This does not
change the appearance of MDCButton, but does change the values returned by the
API.
New features
MDCSnackbarManager's shouldEnableAccessibilityViewIsModal
was previously
used to determine the value of a snackbar view's accessibilityViewIsModal
property. Clients can now use the MDCSnackbarManagerDelegate API
-willPresentSnackbarWithMessageView:
to override the view's
accessibilityViewIsModal
for each Snackbar. This value is propagated to the
scrim view to ensure that modality is correctly configured for Snackbars.
@implementation MySnackbarManagerDelegate
- (void)willPresentSnackbarWithMessageView:(MDCSnackbarMessageView *)messageView {
// All Snackbars with an action are "modal" for UIAccessibility
if (messageView.actionButtons.count > 0) {
messageView.accessibilityViewIsModal = YES;
}
}
@end
Changes
ActivityIndicator
- Add Swift examples to bazel. (#6421) (Robert Moore)
AppBar
- Add examples to BUILD rule (#6344) (Cody Weaver)
BottomAppBar
- Add examples to BUILD file (#6348) (Cody Weaver)
- Formatting BUILD file. (#6355) (Robert Moore)
Buttons
- Add fallback for
borderWidthForState:
(#6415) (Cody Weaver) - Add setup and teardown to tests (#6432) (Cody Weaver)
Cards
- Add Swift examples to bazel. (#6422) (Robert Moore)
- Add snapshot tests to bazel. (#6423) (Robert Moore)
Collections
- Add examples to BUILD file (#6341) (Cody Weaver)
Dialogs
- Fix Theming extension for presentation controller. (#6418) (Robert Moore)
FeatureHighlight
- Add examples to BUILD file (#6340) (Cody Weaver)
FlexibleHeader
- Add examples to BUILD file (#6343) (Cody Weaver)
List
- Add List examples to BUILD file (#6321) (Andrew Overton)
- Add Swift examples to bazel (#6424) (Robert Moore)
MaskedTransition
- Add build file for bazel (#6336) (Wenyu Zhang)
NavigationBar
- Add examples to bazel. (#6425) (Robert Moore)
NavigationDrawer
- Add examples to BUILD file (#6349) (Cody Weaver)
PageControl
- Add PageControl examples to BUILD file (#6323) (Andrew Overton)
- Add swift examples to bazel. (#6426) (Robert Moore)
Slider
- Add examples to BUILD file (#6351) (Cody Weaver)
Snackbar
- Add examples to BUILD file (#6402) (Cody Weaver)
- Allow the delegate to override accessibilityViewIsModal (#6263) (Wenyu Zhang)
- Delete EarlGrey tests. (#6427) (Robert Moore)
Tabs
- Add examples to BUILD file (#6339) (Cody Weaver)
TextFields
- Add Swift examples to bazel (#6430) (Robert Moore)
- Add TextField examples to BUILD file (#6397) (Andrew Overton)
- Add experimental examples to bazel. (#6436) (Robert Moore)
- Fix "gap" in outline when placeholder is empty. (#6322) (Robert Moore)
Typography
- Add examples to BUILD file (#6403) (Cody Weaver)
private/Beta
- Add bazel target. (#6411) (Robert Moore)
schemes/Shape
- Add examples to BUILD file (#6404) (Cody Weaver)
Multi-component changes
- {bazel} Ran
buildifier
on all BUILD files (#6345) (Robert Moore)
v74.0.0
74.0.0
This major release introduces Material Theming extensions for
MDCDialogPresentationController and a change to the behavior of MDCButton's
backgroundColorForState:
API. Improved support for the bazel build
system is introduced for several components.
Breaking changes
MDCButton's backgroundColorForState:
behavior now matches that of UIButton's
forState:
properties. Any state without an explicitly-set value will
fall-back to the value for the UIControlStateNormal
state. This does not
change the appearance of MDCButton, but does change the values returned by the
API.
New features
Material Theming for MDCDialogPresentationController
MDCDialogPresentationController can now be themed using the Theming extension
provided by MaterialDialogs+Theming.h.
MDCAlertController *materialAlertController =
[MDCAlertController alertControllerWithTitle:@"Title" message:@"Message"];
MDCDialogPresentationController *presentationController =
materialAlertController.mdc_dialogPresentationController;
MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init];
[presentationController applyThemeWithScheme:self.containerScheme];
Replace this text with example code for each new feature.
Changes
ActivityIndicator
- Add ActivityIndicator examples to BUILD file (#6318) (Andrew Overton)
AnimationTiming
- Add examples to BUILD file (#6267) (Cody Weaver)
BottomNavigation
- Confirm (un)selected ink is same. (#6190) (Robert Moore)
- Sets the selected view controller to the first view controller in the given array when the bottom navigation controller's view controllers are set. (#6284) (Eric Lee)
BottomSheet
- Add examples to BUILD file (#6266) (Cody Weaver)
ButtonBar
- Add examples to BUILD file (#6264) (Cody Weaver)
Buttons
- Add examples to BUILD file (#6271) (Cody Weaver)
- backgroundColorForState: should fall-back to .normal. (#6255) (Robert Moore)
Cards
- Add Cards examples to BUILD file (#6314) (Andrew Overton)
Chips
- Add example to BUILD file (#6273) (Cody Weaver)
- Add snapshot tests to bazel. (#6326) (Robert Moore)
CollectionCells
- Add examples to BUILD file (#6342) (Cody Weaver)
Dialogs
- Add MDCDialogPresentationController+MaterialTheming (#6286) (Andrew Overton)
Ink
- Add example to BUILD file (#6270) (Cody Weaver)
- Reduce flakiness of layer timing test. (#6338) (Robert Moore)
Palettes
- Add swift examples to BUIlD file (#6265) (Cody Weaver)
ProgressView
- Add ProgressView examples to BUILD file (#6328) (Andrew Overton)
Ripple
- Fix flaky unit test. (#6315) (Robert Moore)
ShadowElevations
- Add examples to BUILD file (#6330) (Cody Weaver)
ShadowLayer
- Add examples to BUILD file (#6331) (Cody Weaver)
TextFields
- Add Snapshot tests to bazel. (#6309) (Robert Moore)
- Fix snapshot test imports. (#6299) (Robert Moore)
- Increase snapshot test timeout. (#6337) (Robert Moore)
private/Math
- Add Math tests to bazel (#6282) (Wenyu Zhang)
private/Snapshot/TestHost
- Add test host for snapshot tests. (#6300) (Robert Moore)
private/Snapshot
- Add BUILD file. (#6308) (Robert Moore)
- Add test host for snapshot tests. (#6300) (Robert Moore)
- Fix CGFloat cast. (#6301) (Robert Moore)
schemes/Typography
- Add examples to BUILD file (#6298) (Cody Weaver)
Multi-component changes
- Don't execute "empty" tests in each class. (#6192) (Robert Moore)
- Make pod install work on Cocoapods 1.6.0.beta.2 (#5966) (Andrew Overton)
- ran clang-format (#6027) (Yarden Eitan)
- {bazel} Add reusable examples rules. (#6252) (Robert Moore)
v73.1.1
In this patch release we have improved the formatting of our codebase, and added missing imports to the Dragons target.
API changes
Component changes
Dragons App
- remove as it isn't supported with tulsiproj (#6277) (Yarden Eitan)
- added missing imports to dragons target (#6278) (Yarden Eitan)
Multi-component changes
- ran clang-format (#6027) (Yarden Eitan)
v73.1.0
In this minor release we have added new theming extensions for Cards and Chips, as well as added a new component to beta called Ripple that will eventually be a successor to Ink. We also added additional functionality to Dialogs, NavigationBar, and snapshot testing for Textfields.
New features
Card Theming Extension Usage Example
var scheme: MDCContainerScheming {
let scheme = MDCContainerScheme()
scheme.colorScheme = colorScheme
scheme.typographyScheme = typographyScheme
scheme.shapeScheme = shapeScheme
return scheme
}
...
let card = MDCCard()
card.applyTheme(withScheme: scheme)
Chips Theming Extension Usage Example
var scheme: MDCContainerScheming {
let scheme = MDCContainerScheme()
scheme.colorScheme = colorScheme
scheme.typographyScheme = typographyScheme
scheme.shapeScheme = shapeScheme
return scheme
}
...
let chipView = MDCChipView()
chipView.applyTheme(withScheme: scheme)
Dialogs Background Color Usage Example
let alert = MDCAlertController(title: "Title", message: "Message")
alert.backgroundColor = .white
NavigationBar Title View Inset Usage Example
let navigationBar = MDCNavigationBar()
navigationBar.titleInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
API changes
Cards+Theming
New extension.
Chips+Theming
New extension.
Ripple
New component.
Component changes
Changes
ActionSheet
- Remove redundant
visibility
args. (#6073) (Robert Moore)
ActivityIndicator
AppBar
BottomAppBar
- Enable tapping on area above Navigation Bar (#6036) (Kirk Spaziani)
BottomNavigation
- Add examples bazel targets (#6161) (Robert Moore)
- Added an example for MDCBottomNavigationBarController (#6082) (Eric Lee)
- Fix MDCBottomNavigationBar elevation on MDCBottomNavigationBarController (#6051) (Matias Radzinski)
BottomSheet
Cards
- Ran buildifier against all BUILD files. (#6077) (featherless)
- Add snapshot tests for Card component with variations (#6041) (rami-a)
- Cards theming extension + snapshots: Re-revert with fix (#6049) (rami-a)
- Fix shadow elevation values for outlined cards (#6050) (rami-a)
Chips
- Create theming extension for Chips (#6087) (rami-a)
- Rename internal MDCTextField subclass in MDCChipField (#6032) (Galia Kaufman)
- Add more chip snapshot test to support image and accessory views (#6166) (rami-a)
- Add snapshot tests to Chips (#6098) (rami-a)
- Update chips examples to use theming extension (#6096) (rami-a)
Collections
- Add delegate method to check whether swiping should be limited to one direction. (#6170) (Randall Li)
Dialogs
- adding backgroundColor property for dark theme support (#6066) (Galia Kaufman)
FlexibleHeader
- Fix shift phase behavior when contained in the tracking scroll view. (#6069) (featherless)
- Mark MDCFlexibleHeaderTopSafeArea as final. (#6054) (featherless)
NavigationBar
- Add inset property for title view (#6118) (Cody Weaver)
- Refactor tests to not repeat the same code multiple times (#6136) (Cody Weaver)
- Remove duplicate test helper. (#6196) (Robert Moore)
NavigationDrawer
Ripple
- Ripple implementation + example + unit tests (#6174) (Yarden Eitan)
Slider
- Deflake unit tests. (#6143) (Robert Moore)
Tabs
TextFields
- Add Cyrillic, Hindi, Korean helpers for snapshot tests. (#6140) (Robert Moore)
- Add pre-verification hook for snapshot tests. (#6131) (Robert Moore)
- Drop RTL assert to a log message. (#6124) (Robert Moore)
- Fix RTL code for iOS less than 11. (#6121) (Robert Moore)
- Fix bad test rename (#6179) (Robert Moore)
- Fixing some compiler warnings. (#6142) (Robert Moore)
- Invalidate caret timers in snapshot tests. (#6182) (Robert Moore)
- Minor clean-up/refactor of text fields snapshot tests. (#6128) (Robert Moore)
- Rename hook test method. (#6168) (Robert Moore)
Disabled
snapshot tests use text properties. (#6070) (Robert Moore)- Add Arabic snapshot tests for Filled style. (#6130) (Robert Moore)
- Add Cyrillic snapshot tests. (#6150) (Robert Moore)
- Add Filled Floating Arabic RTL snapshot tests (#6139) (Robert Moore)
- Add Hindi snapshot tests. (#6141) (Robert Moore)
- Add Outlined text area snapshot tests. (#6145) (Robert Moore)
- Add RTL Arabic snapshots for FullWidth (#6127) (Robert Moore)
- [Add Under...
v73.0.0
73.0.0
This is a major release that introduces copy
semantics in MDCShapeCategory, part of the Shapes scheme. Also in this release is a new API in NavigationDrawer that provides a way to expand the bottom drawer to full height.
New features
NavigationDrawer expansion
The NavigationDrawer component's MDCBottomDrawerViewController
has a new API
that allows clients to programmatically expand the bottom drawer to the full
height of the presenting view.
Example (Swift)
drawerVC.expandToFullscreen(withDuration: 0.2, completion: { finished in
if finished {
print("expansion complete");
} else {
print("expansion cancelled");
}
})
API changes
ActionSheet+Theming
New extension.
NavigationDrawer
MDCBottomDrawerViewController
new method: -expandToFullscreenWithDuration:completion:
in MDCBottomDrawerViewController
MDCBottomDrawerPresentationController
new method: -expandToFullscreenWithDuration:completion:
in MDCBottomDrawerPresentationController
ShapeScheme
MDCShapeCategory
modified property: bottomLeftCorner
in MDCShapeCategory
Type of change: | Declaration |
---|---|
From: | @property(strong, nonatomic) MDCCornerTreatment *bottomLeftCorner |
To: | @property(nonatomic, copy) MDCCornerTreatment *bottomLeftCorner |
modified class: MDCShapeCategory
Type of change: | Swift declaration |
---|---|
From: | class MDCShapeCategory : NSObject |
To: | class MDCShapeCategory : NSObject, NSCopying |
modified class: MDCShapeCategory
Type of change: | Declaration |
---|---|
From: | @interface MDCShapeCategory : NSObject |
To: | @interface MDCShapeCategory : NSObject <NSCopying> |
modified property: bottomRightCorner
in MDCShapeCategory
Type of change: | Declaration |
---|---|
From: | @property(strong, nonatomic) MDCCornerTreatment *bottomRightCorner |
To: | @property(nonatomic, copy) MDCCornerTreatment *bottomRightCorner |
modified property: topLeftCorner
in MDCShapeCategory
Type of change: | Declaration |
---|---|
From: | @property(strong, nonatomic) MDCCornerTreatment *topLeftCorner |
To: | @property(nonatomic, copy) MDCCornerTreatment *topLeftCorner |
modified property: topRightCorner
in MDCShapeCategory
Type of change: | Declaration |
---|---|
From: | @property(strong, nonatomic) MDCCornerTreatment *topRightCorner |
To: | @property(nonatomic, copy) MDCCornerTreatment *topRightCorner |
Component changes
Changes
ActionSheet
- Update examples (#5979) (Cody Weaver)
BottomNavigation
- Initial implementation of the Bottom Navigation Controller (#5886) (Eric Lee)
- Revert "[BottomNavigation]Adds Initial tests for MDCBottomNavigationBarController" (#6039) (Robert Moore)
- [BottomNavigation]Adds Initial tests for MDCBottomNavigationBarController (#6012) (Eric Lee)
BottomSheet
- fix bottom sheet layout for safe area (#6024) (Yarden Eitan)
FlexibleHeader
NavigationDrawer
- Attempt to fix header shadow not being removed (#6010) (Michael Cheung)
- Navigation Drawer Present at Fullscreen (#5995) (Yarden Eitan)
TextFields
- Refactor test classes to use subclassing. (#6008) (Robert Moore)
- "Filled" snapshots use abstract class (#6013) (Robert Moore)
- "FullWidth" snapshots use abstract class (#6014) (Robert Moore)
- "SimpleTextField" Example Prototype (#6003) (Andrew Overton)
- Add "unfloating" filled style snapshots. (#5997) (Robert Moore)
- Add Baseline Filled snapshots. (#6029) (Robert Moore)
- Add FullWidth snapshots with character counts. (#6025) (Robert Moore)
- Add
isEditing
snapshots for Filled style (#5988) (Robert Moore) - Add
isEditing
snapshots for Full Width (#5989) (Robert Moore) - Add
isEditing
snapshots for Outlined Text Area (#5994) (Robert Moore) - Add
isEditing
snapshots for Outlined style (#5990) (Robert Moore) - Add
leadingImage
snapshots. (#6028) (Robert Moore) - Add clearButton to Outlined TextArea (#5992) (Robert Moore)
- Add extension for theming (#5975) (Cody Weaver)
- Add snapshots for
disabled
state (#6026) (Robert Moore) - Add snapshots for outlined, baseline, character counts. (#6001) (Robert Moore)
- Add underlined snapshot tests. (#6021) (Robert Moore)
- Allow animations to execute in tests. (#5987) (Robert Moore)
- Incomplete snapshot RTL/Arabic support (#6023) (Robert Moore)
- Outlined TextArea uses abstract test class (#6017) (Robert Moore)
- Outlined controller snapshots use abstract class (#6019) (Robert Moore)
- Outlined, themed snapshots use abstract class (#6016) (Robert Moore)
- Outlined, themed, character count tests use abstract class. (#6015) (Robert Moore)
- Refactor snapshot test class (#5982) (Robert Moore)
- Refactor snapshot tests into abstract class. (#6009) (Robert Moore)
- Refactor textArea snapshot tests. (#5991) (Robert Moore)
- Refactor: Move
recordMode
to-setUp
(#5998) (Robert Moore)
schemes/Shape
Multi-component changes
- Pin all swift_library targets to Swift 3. (#6000) (featherless)
- Ran buildifier against all BUILD files. (#5999) (featherless)
- [Rename MaterialC...
v72.2.0
In this minor release we added scrimColor support for MDCBottomSheetController and added a theming extension support for MDCAlertController. We also added TextFields snapshot testing along with various bug fixes.
New features
Bottom Sheet scrimColor API usage example
MDCBottomSheetController *bottomSheet =
[[MDCBottomSheetController alloc] initWithContentViewController:viewController];
bottomSheet.scrimColor = UIColor.blueColor;
[self presentViewController:bottomSheet animated:YES completion:nil];
Dialogs Theming Extension usage example
var scheme: MDCContainerScheming {
let scheme = MDCContainerScheme()
scheme.colorScheme = colorScheme
scheme.typographyScheme = typographyScheme
return scheme
}
...
let alertController = MDCAlertController(title: "Title", message: "Message")
alertController.applyTheme(withScheme: scheme)
Bug fixes
{Git-LFS} Exclude git-lfs from stable
#5977
API changes
Component changes
Changes
ActionSheet
- Allow changing action item accessibility labels. (#5803) (lightboys22)
BottomSheet
Buttons
- Correct FAB Shape themer documentation. (#5900) (Robert Moore)
- Fix unsafe access to self.bounds.size (#5930) (Robert Moore)
- Improve color themer tests. (#5913) (Robert Moore)
- Match backgroundColor to titleColor API (#5919) (Robert Moore)
- uncomment the test for verifying theming FAB title color (#5923) (Wenyu Zhang)
Chips
Dialogs
- [Dialogs] Renaming example view controllers (#5932) (Galia Kaufman)
- Add dialog category for theming (#5905) (Andrew Overton)
FlexibleHeader
NavigationDrawer
- Fix jump when perferredContentSize changes (#5928) (Cody Weaver)
- Remove clipping view (#5897) (Cody Weaver)
private/KeyboardWatcher
Textfields
- Add FullWidth snapshot tests. (#5953) (Robert Moore)
- Add Outlined snapshot tests (#5939) (Robert Moore)
- Add OutlinedTextArea snapshot tests (#5950) (Robert Moore)
- Add
editing
snapshots for Outlined (#5964) (Robert Moore) - Add clearButton to filled snapshots (#5963) (Robert Moore)
- Post notifications when
isEditing
changes. (#5972) (Robert Moore) - Show clearButton in baseline snapshot (#5962) (Robert Moore)
- Show clearButton in outlined snapshots. (#5961) (Robert Moore)
- Snapshot test for themed Outlined. (#5951) (Robert Moore)
- Snapshot tests for Filled. (#5949) (Robert Moore)
Multi-component changes
- Clean up doc links to guidelines (#5927) (Robert Moore)
- Move verification into test methods (#5947) (Robert Moore)
- Tweak snapshot test base class to handle the verify in tearDown (#5933) (rami-a)
- Update our theming extensions (#5945) (Cody Weaver)
- Update secondary floating action button themer examples (#5922) (Wenyu Zhang)
v72.1.0
72.1.0
This minor release fixes a ChipField RTL issue.