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 from MDCTextInputControllerBase and properties backgroundColor and backgroundColorDefault from MDCTextInputController. 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 in MDCBottomSheetTransitionController(ScrimAccessibility)

    ๐Ÿ†• new property: scrimAccessibilityLabel in MDCBottomSheetTransitionController(ScrimAccessibility)

    ๐Ÿ†• new property: scrimAccessibilityHint in MDCBottomSheetTransitionController(ScrimAccessibility)

    ๐Ÿ†• new property: scrimAccessibilityTraits in MDCBottomSheetTransitionController(ScrimAccessibility)

    MDCBottomSheetController

    ๐Ÿ†• new property: scrimAccessibilityHint in MDCBottomSheetController

    ๐Ÿ†• new property: isScrimAccessibilityElement in MDCBottomSheetController

    ๐Ÿ†• new property: state in MDCBottomSheetController

    ๐Ÿ†• new method: -shapeGeneratorForState: in MDCBottomSheetController

    ๐Ÿ†• new property: scrimAccessibilityLabel in MDCBottomSheetController

    ๐Ÿ†• new method: -setShapeGenerator:forState: in MDCBottomSheetController

    ๐Ÿ†• new property: scrimAccessibilityTraits in MDCBottomSheetController

    MDCSheetState

    ๐Ÿ†• new enum: MDCSheetState with values MDCSheetStateExtended, MDCSheetStatePreferred, and MDCSheetStateClosed

    MDCBottomSheetPresentationControllerDelegate

    ๐Ÿ†• new method: -bottomSheetWillChangeState:sheetState: in MDCBottomSheetPresentationControllerDelegate

    MDCBottomSheetPresentationController

    ๐Ÿ†• new property: scrimAccessibilityLabel in MDCBottomSheetPresentationController

    ๐Ÿ†• new property: isScrimAccessibilityElement in MDCBottomSheetPresentationController

    ๐Ÿ†• new property: scrimAccessibilityTraits in MDCBottomSheetPresentationController

    ๐Ÿ†• new property: scrimAccessibilityHint in MDCBottomSheetPresentationController

    Cards

    MDCCardCollectionCell

    ๐Ÿ†• new property: interactable in MDCCardCollectionCell

    MDCCard

    ๐Ÿ†• new property: interactable in MDCCard

    List

    ๐Ÿ†• New component.

    TextFields

    MDCTextInputControllerFullWidth

    ๐Ÿ†• new property: backgroundColor in MDCTextInputControllerFullWidth

    ๐Ÿ†• new property: backgroundColorDefault in MDCTextInputControllerFullWidth

    MDCTextInputControllerBase

    โœ‚ removed property: backgroundColor in MDCTextInputControllerBase

    MDCTextInputController

    ๐Ÿ†• new property: textInputClearButtonTintColorDefault in MDCTextInputController

    ๐Ÿ†• new property: textInputClearButtonTintColor in MDCTextInputController

    โœ‚ removed property: backgroundColorDefault in MDCTextInputController

    โœ‚ removed property: backgroundColor in MDCTextInputController

    Typography

    UIFont(MaterialSimpleEquality)

    ๐Ÿ†• new method: -mdc_isSimplyEqual: in UIFont(MaterialSimpleEquality)

    ๐Ÿ†• new category: UIFont(MaterialSimpleEquality)

    Component changes

    Tabs

    ๐Ÿ”„ Changes

    ๐Ÿ”‹ FeatureHighlight

    ๐Ÿ”„ Changes

    Buttons

    ๐Ÿ”„ Changes

    TextFields

    ๐Ÿ”„ Changes

    Chips

    ๐Ÿ”„ Changes

    Cards

    ๐Ÿ”„ Changes

    List

    ๐Ÿ”„ Changes

    BottomSheet

    ๐Ÿ”„ Changes

    Typography

    ๐Ÿ”„ Changes

    BottomNavigation

    ๐Ÿ”„ Changes

    FlexibleHeader

    ๐Ÿ”„ Changes