Material Components v57.0.0 Release Notes
-
๐ In this release we have added the List component, made accessibility improvements to Bottom Sheet, added Shapes support for Chips and Bottom Sheet, made Catalog visual improvements, and other bug fixes.
๐ฅ Breaking changes
TextFields
๐ We have removed property
backgroundColor
fromMDCTextInputControllerBase
and propertiesbackgroundColor
andbackgroundColorDefault
fromMDCTextInputController
. The reason for removal was due to these properties not being used by the controller in any meaningful way, and therefore this should not produce any changes.๐ New features
BottomSheet
VoiceOver and switch device users currently have to use the accessibility escape gesture to dismiss a Bottom Sheet. Optionally, the BottomSheet can use the dimmed "scrim" area (which can be tappable) to dismiss the bottom sheet using accessibility technologies.
๐ As an example of how this could be used by clients, here's how our AppDelegate would change to support a VoiceOver button for dismissal:
let menuViewController = MDCMenuViewController(style: .plain) let bottomSheet = MDCBottomSheetController(contentViewController: menuViewController) bottomSheet.dismissOnBackgroundTap = true bottomSheet.isScrimAccessibilityElement = true bottomSheet.scrimAccessibilityLabel = "Close" self.present(bottomSheet, animated: true, completion: nil)
Cards
You can now set the car to be interactable or not. Our specification for cards explicitly define a card as being an interactable component. Therefore, the interactable property should be set to NO only if there are other interactable items within the card's content, such as buttons or other tappable controls. To set the interactability to no in your cards:
let card = MDCCard() card.isInteractable = false let cardCell = MDCCardCollectionCell() cardCell.isInteractable = false
List
๐ We now have a new component, List! See more information about the component here: https://github.com/material-components/material-components-ios/tree/develop/components/List
API changes
BottomSheet
MDCBottomSheetTransitionController(ScrimAccessibility)
๐ new category:
MDCBottomSheetTransitionController(ScrimAccessibility)
๐ new property:
isScrimAccessibilityElement
inMDCBottomSheetTransitionController(ScrimAccessibility)
๐ new property:
scrimAccessibilityLabel
inMDCBottomSheetTransitionController(ScrimAccessibility)
๐ new property:
scrimAccessibilityHint
inMDCBottomSheetTransitionController(ScrimAccessibility)
๐ new property:
scrimAccessibilityTraits
inMDCBottomSheetTransitionController(ScrimAccessibility)
MDCBottomSheetController
๐ new property:
scrimAccessibilityHint
inMDCBottomSheetController
๐ new property:
isScrimAccessibilityElement
inMDCBottomSheetController
๐ new property:
state
inMDCBottomSheetController
๐ new method:
-shapeGeneratorForState:
inMDCBottomSheetController
๐ new property:
scrimAccessibilityLabel
inMDCBottomSheetController
๐ new method:
-setShapeGenerator:forState:
inMDCBottomSheetController
๐ new property:
scrimAccessibilityTraits
inMDCBottomSheetController
MDCSheetState
๐ new enum:
MDCSheetState
with valuesMDCSheetStateExtended
,MDCSheetStatePreferred
, andMDCSheetStateClosed
MDCBottomSheetPresentationControllerDelegate
๐ new method:
-bottomSheetWillChangeState:sheetState:
inMDCBottomSheetPresentationControllerDelegate
MDCBottomSheetPresentationController
๐ new property:
scrimAccessibilityLabel
inMDCBottomSheetPresentationController
๐ new property:
isScrimAccessibilityElement
inMDCBottomSheetPresentationController
๐ new property:
scrimAccessibilityTraits
inMDCBottomSheetPresentationController
๐ new property:
scrimAccessibilityHint
inMDCBottomSheetPresentationController
Cards
MDCCardCollectionCell
๐ new property:
interactable
inMDCCardCollectionCell
MDCCard
๐ new property:
interactable
inMDCCard
List
๐ New component.
TextFields
MDCTextInputControllerFullWidth
๐ new property:
backgroundColor
inMDCTextInputControllerFullWidth
๐ new property:
backgroundColorDefault
inMDCTextInputControllerFullWidth
MDCTextInputControllerBase
โ removed property:
backgroundColor
inMDCTextInputControllerBase
MDCTextInputController
๐ new property:
textInputClearButtonTintColorDefault
inMDCTextInputController
๐ new property:
textInputClearButtonTintColor
inMDCTextInputController
โ removed property:
backgroundColorDefault
inMDCTextInputController
โ removed property:
backgroundColor
inMDCTextInputController
Typography
UIFont(MaterialSimpleEquality)
๐ new method:
-mdc_isSimplyEqual:
inUIFont(MaterialSimpleEquality)
๐ new category:
UIFont(MaterialSimpleEquality)
Component changes
Tabs
๐ Changes
- Fix alerts in examples (#4480) (Robert Moore)
๐ FeatureHighlight
๐ Changes
- Add swift example (#4439) (Cody Weaver)
Buttons
๐ Changes
- [Catalog] Fix VoiceOver ordering in Buttons demo (#4482) (Robert Moore)
TextFields
๐ Changes
- Fix clearIcon drawing (#4450) (Robert Moore)
- Make MDCTextField accessibilityValue include only placeholder or [super accessibilityValue], not both (#4460) (Andrew Overton)
- โ Migrate textInputClearButtonTintColor to MDCTextInputController, tests (#4465) (Michelle Dudley)
- ๐ Support clear button tint color (#4449) (Robert Moore)
- [Typography] 3rd PR on font equality (#4435) (Will Larche)
- ๐ {BreakingChange} Remove unused
backgroundColor
property (#4452) (Robert Moore)
Chips
๐ Changes
- Fix Choice demo (#4473) (Robert Moore)
- ๐ chips shape support fix + example (#4474) (Yarden Eitan)
Cards
๐ Changes
- Added interactability toggle to Cards (#4404) (Yarden Eitan)
List
๐ Changes
- [ListItems] Add Base Cell With Example (#4461) (Andrew Overton)
BottomSheet
๐ Changes
- Dismiss BottomSheet with UIAccessibility (#4475) (Robert Moore)
- ๐ [Shapes] Added Shapes support for BottomSheet (#4486) (Yarden Eitan)
Typography
๐ Changes
- 3rd PR on font equality (#4435) (Will Larche)
BottomNavigation
๐ Changes
- ๐ AccessibilityValue and Selected icon support (#4444) (Cody Weaver)
- โ Test cases when we reset the bottom navigation items array (#4431) (Cody Weaver)
- [BottomNavigation, Math] Fix
BOOL
types (#4436) (Robert Moore)
FlexibleHeader
๐ Changes
- Fix odd scrolling bugs in voiceover (#4485) (John Detloff)