v107.2.0
·
1173 commits
to stable
since this release
This minor release includes the introduction of a self-sizing mechanism to MDCBaseCell, a new layout style for MDCTabBarView, and numerous improvements and bug fixes for BottomSheet, Snackbar, Dialogs, Ink, and TextFields.
New features
List
Having the UICollectionViewLayoutAttributes
you use with MDCBaseCell
conform to MDCSelfSizingLayoutAttributes
allows you to specify whether the height or the width should be fixed.
-(BOOL)isFixedWidth {
return 100;
}
-(BOOL)isFixedHeight {
return 100;
}
var isFixedWidth: Bool {
return 100;
}
var isFixedHeight: Bool {
return 100;
}
Tabs
Setting the preferredLayoutStyle
property on MDCTabBarView
to MDCTabBarViewLayoutStyleScrollableCentered
allows you to have a scrolling tab bar that centers the selected tab.
tabBarView.preferredLayoutStyle = MDCTabBarViewLayoutStyleScrollableCentered;
tabBarView.preferredLayoutStyle = .scrollableCentered
Component changes
BottomSheet
Chips
- Account for MDCChipField contentInset in placeholder width calculation (#9843) (Bryan Oltman)
- Add MDCChipField snapshot test for placeholder truncation (#9842) (Bryan Oltman)
- Add MDCChipField snapshot tests verifying text field placement (#9831) (Bryan Oltman)
- Add tips about "Adjusting chip sizes after changing the label". (#9852) (featherless)
- Do not include contentEdgeInsets for MDCChipField placeholder if no placeholder is present (#9847) (Bryan Oltman)
- Do not include insets in MDCChipField placeholder width if there is no placeholder (#9850) (Bryan Oltman)
- In MDCChipField, account for horizontal padding when calculating available width for text field (#9841) (Bryan Oltman)
- Move MDCChipField text input to a new line if text is too wide (#9845) (Bryan Oltman)
- Resize MDCChipField's textField frame instead of using left insets to align with chips (#9827) (Bryan Oltman)
- Resize MDCChipField's textField frame instead of using left insets to align with chips (#9837) (Bryan Oltman)
- Revert "Resize MDCChipField's textField frame instead of using left insets to align with chips" (#9828) (Bryan Oltman)
- Update MDCChipField to move long text from a line with chips to a new line. (#9826) (Bryan Oltman)
Dialogs
- Adding actions order tests (#9829) (Galia Kaufman)
- Removing enableAdjustableInsets and fixed-insets calculations. (#9832) (Galia Kaufman)
- Try to fix testActionsAreOrderedByEmphasis snapshot (#9862) (Andrew Overton)
Ink
- Conditionally maskToBounds on MDCInkView layer (a MDCLegacyInkLayer) when usesLegacyInkRipple is set to NO (#9818) (Andrew Overton)
List
- Add MDCSelfSizingLayoutAttributes (#9823) (Andrew Overton)
Snackbar
- Support orientation changes that respect safe area (#9838) (Yarden Eitan)
- add multi-window guessing support (#9830) (Yarden Eitan)
Tabs
- Add MDCTabBarViewLayoutStyleScrollableCentered (#9849) (Andrew Overton)
TextControls
- Update MDCBaseTextField docs (#9861) (Andrew Overton)
TextFields
Multi-component changes
- Remove traitCollection overrides from examples. (#9851) (Bryan Oltman)