v104.0.0
104.0.0
In this major release we removed the deprecated MDCFloatingActionButtonThemer, added APIs to AppBar flexible header, alert controllers, bottom drawers and sliders to make the more configurable for clients.
Breaking changes
Deleted the MDCFloatingActionButtonThemer class. Use the theming extension.
New features
AppBar added an API for changing the stack view offset.
Flexible header added an API for showing the hairline and its color.
Availability macro for internal use.
AlertControllers added an API for titleIconView.
Bottom drawer added an API for sticky status bars and adjustment when content size changes.
let contentViewController = UIViewController() let bottomDrawerViewController = MDCBottomDrawerViewController()
...
bottomDrawerVC.shouldIncludeSafeAreaInContentHeight = true
bottomDrawerVC.shouldIncludeSafeAreaInInitialDrawerHeight = true
present(bottomDrawerViewController, animated: true, completion: nil)
Slider added an API for allowAnimatedValueChanges and trackEndsAreRounded or trackEndsAreInset.
API changes
Component changes
ActionSheet
- Change default header to be 8pt tall instead of 0. (Cody Weaver)
AppBar
- Add a snapshot test for a scrolled app bar. (Jeff Verkoeyen)
- Add an AppBar Theming example. (Jeff Verkoeyen)
- Always apply the default shadow behavior when theming. (featherless)
- Minor clarification to example documentation. (Jeff Verkoeyen)
- internal change (Nobody)
Availability
- Add an umbrella header. (Jeff Verkoeyen)
- add Availability build file (#9678) (Randall Li)
Banner
BottomNavigation
- Layout item views after title changes. (Rob Moore)
ButtonBar
- Add missing self-> within a block. (Jeff Verkoeyen)
- Add snapshot tests for title color behavior. (Jeff Verkoeyen)
- Assign the UIBarButtonItem's tintColor to the button's text color. (Jeff Verkoeyen)
- Assign the UIBarButtonItem's tintColor to the button's text color. (Jeff Verkoeyen)
- Refactor title color logic to a single location. (Jeff Verkoeyen)
- Rolling back "Assign the UIBarButtonItem's tintColor to the button's text color." (Jeff Verkoeyen)
- Use CGSizeZero instead of CGSizeMake(0, 0). (Jeff Verkoeyen)
Buttons
- Delete deprecated MDCFloatingActionButtonThemer (#9662) (Bryan Oltman)
- Migrates Buttons to MDCAvailability. (Nobody)
- Set contentEdgeInsets in theming for MDCFloatingButton with normal shape. (Wenyu Zhang)
Dialogs
- Add a private API for passing a custom title icon view. It can be used for passing a custom animation into the title. (Iryna Berezan)
- Adding scuba tests for long, short, text and outlined actions in vertical and horizontal layout, in LTR and RTL. (Galia Kaufman)
- Avoid code duplication for placing action and content scroll views in 'layoutSubviews' method of MDCAlerControllerView. (Iryna Berezan)
- Ensure to remove correct notification observer for the style updates. (Iryna Berezan)
- Initialize a few CGFloat expressions in dialogs with a single-precision floating point constant. (Iryna Berezan)
- Keep the title on the screen during scrolling, just like the action buttons, to follow MD guidelines on Dialogs. (Iryna Berezan)
- Refactor out the layout calculations for title, title icon, message and the view insets into private methods. (Iryna Berezan)
- Removing redundant function argument (Galia Kaufman)
- Renaming "custom" category to "customize". (Galia Kaufman)
- Renaming "custom" category to "customize". (Galia Kaufman)
- Update comments describing private margin properties. (Galia Kaufman)
- Update comments describing private margin properties. (Galia Kaufman)
Elevation
FeatureHighlight
FlexibleHeader
- Add hairline support. (Jeff Verkoeyen)
- Add missing import to MDCFlexibleHeaderView+Private.h (Jeff Verkoeyen)
- Add missing nullability annotation. (Jeff Verkoeyen)
- Resolve precision warning due to use of floating point. (Jeff Verkoeyen)
List
- Make padding between title label and detail label smaller (Andrew Overton)
- This change makes rippleColor null_resettable on MDCBaseCell (Andrew Overton)
NavigationDrawer
- Add ability to change the maximumInitialDrawerHeight after drawer has been presented. (Yarden Eitan)
- Add contributor to OWNERS file (Yarden Eitan)
- Adding a flag to allow clients to opt-in to when the preferredContentSize of the contentViewController changes, it visually updates the drawer height. (Yarden Eitan)
- Implemented opt-in ability to have a "sticky" view, presented behind top safe area, when a headerViewController is not provided (continuation of #9464). (Nobody)
- Improve behavior when navigating the bottom drawer with Voice Over. This change makes it possible to navigate back and forth between the
headerViewController
andcontentViewController
, without VO getting stuck, by making the view hierarchy'saccessibilityElements
explicit. (Jake Rockland) - Improve swipe-down-to-dismiss behavior for drawers where drawer content is less than
160
. This adjustment ensures that for drawer contents that are quite small (ex. 100pt) the drawer contents to not become undismissable. Without this adjustment it is nearly impossible to achieve a scroll offset of (40pt), the currentkVerticalDistanceDismissalThreshold
, making the drawer effectively undismissable. (Jake Rockland) - Refactor
CGFloat topAreaInsetForHeader = (self.headerViewController ? self.topSafeAreaInset : 0);
usage into its own private method. (Nobody) - Update documentation basic examples for MDCBottomDrawerViewController usage. (Jake Rockland)
- Use keyWindow top inset to maintain backwards consistency with behavior prior to moving off of MDCDeviceTopSafeAreaInset. (Nobody)
- Use positive booleans to improve readability of height layout calculations. (Nobody)
ProgressView
- Allow the progress view to be sized to fractional points. (Jeff Verkoeyen)
Slider
- Add trackEndsAreInset property to MDCSlider (Jacob Lukas)
TextControls
- Add Swift-friendlier names to TextControl text fields (Andrew Overton)
- Invalidate intrinsic content size in MDCBaseTextField (Andrew Overton)
- This change gives MDCBaseTextField the same default font as UITextField. (Andrew Overton)
- This change removes some log statements that would otherwise annoy clients. (Andrew Overton)
TextFields
- Add localized clear text string for multiline text field. (Cody Weaver)
- Use correct localization API. (Cody Weaver)
private/TextControlsPrivate
- Remove unwanted animations from filled style. (Andrew Overton)
Multi-component changes
- Add allowAnimatedValueChanges property to MDCSlider (Jacob Lukas)
- Add iberezan to the codeowners. (Iryna Berezan)
- Add trackEndsAreRounded property to MDCSlider (Jacob Lukas)
- Adds availability macro for conditionally compiling OS sensitive code. (Nobody)
- Internal Change (Nobody)
- Move off of MDCDeviceTopSafeAreaInset (continuation of #9476). (Nobody)
- Reevaluate RTL logic because of internal snapshot testing infrastructure (Andrew Overton)
- This change adds a new property to the private protocol MDCTextControl. This property, labelFrame, is used by the outlined style object during style application. The outlined style object needs to know the label frame because the outline breaks before it hits the label and resumes after it. Accessing
label.frame
has proven unreliable during this scenario because of animations in progress. (Andrew Overton) - add deps on availability for a bunch of components (#9679) (Randall Li)