Changelog History
Page 16
-
v80.0.0 Changes
๐ This major release introduces Dynamic Type support for Typography Schemes as well as โ UIFontMetrics-like support for Dynamic Type for Material Typography. It also includes snapshot tests for additional components and less-restrictive badging for Tabs.
๐ฅ Breaking changes
MDCTypographyScheming
has a new non-optional API,mdc_adjustsFontForContentSizeCategory
that isYES
if the returned fonts should use the new Dynamic Type APIs available from Material Typography. Existing implementations may wish to migrate (at least initially) by returningNO
as a read-only ๐ value until support can be added.- (void)mdc_adjustsFontForContentSizeCategory { return NO; }
public var mdc_adjustsFontForContentSizeCategory: Bool { return false; }
๐ New features
๐ Improved Dynamic Type Support
โก๏ธ The Typography and TypographyScheme components have been updated for improved Dynamic Type support. ๐ Most clients will make use of this support through MDCTypographyScheme, though it is possible to create scalable fonts manually via MDCFontScaler within Typography. The new scaling curves have โก๏ธ been updated for last year's refresh of Material Design typography and font values.
Objective-C
// Typography Scheme is the most typical way to receive scalable fonts. MDCTypographyScheme *typographyScheme = [[MDCTypographyScheme alloc] initWithDefaults:MDCTypographySchemeDefaultsMaterial201902]; UIFont *scaledBody1Font = [typographyScheme.body1 mdc_scaledFontForCurrentSizeCategory]; // If Typography Schemes aren't used, it's possible to create the fonts manually. // Initial set-up to apply scaling curves to a base UIFont. UIFont *baseFont = [UIFont systemFontOfSize:18.0]; MDCFontScaler *body2Scaler = [[MDCFontScaler alloc] initForMaterialTextStyle:MDCTextStyleBody2]; UIFont *scalableFont = [body2Scaler scaledFontWithFont:baseFont]; // Now UIFonts appropriate for Dynamic Type size categories can be created anywhere. UIFont *baseFontScaledToDefault = [scalableFont mdc_scaledFontAtDefaultSize]; UIFont *baseFontScaledForExtraLarge = [scalableFont mdc_scaledFontForSizeCategory:UIContentSizeCategoryExtraLarge]; UIFont *baseFontScaledForCurrentSizeCategory = [scalableFont mdc_scaledFontForCurrentSizeCategory];
Swift
// Typography Scheme is the most typical way to receive scalable fonts. let typographyScheme = MDCTypographyScheme(defaults: .material201902) let scaledBody1Font = typographyScheme.body1.mdc_scaledFontForCurrentSizeCategory() // If Typography Schemes aren't used, it's possible to create the fonts manually. // Initial set-up to apply scaling curves to a base UIFont. let baseFont = UIFont.systemFont(ofSize: 18) let body2Scaler = MDCFontScaler(forMaterialTextStyle: .body2) let scalableFont = body2Scaler.scaledFont(with: baseFont) // Now UIFonts appropriate for Dynamic Type size categories can be created anywhere. let baseFontScaledToDefault = scalableFont.mdc_scaledFontAtDefaultSize() let baseFontScaledForExtraLarge = scalableFont.mdc_scaledFont(forSizeCategory: .extraLarge) let baseFontScaledForCurrentSizeCategory = scalableFont.mdc_scaledFontForCurrentSizeCategory()
API changes
Typography
๐ MDCTextStyleButton
๐ new constant:
MDCTextStyleButton
๐ MDCTextStyleCaption
๐ new constant:
MDCTextStyleCaption
๐ MDCTextStyleSubtitle2
๐ new constant:
MDCTextStyleSubtitle2
๐ MDCTextStyleSubtitle1
๐ new constant:
MDCTextStyleSubtitle1
๐ MDCTextStyleBody1
๐ new constant:
MDCTextStyleBody1
UIFont(MaterialScalable)
๐ new method:
-mdc_scaledFontForCurrentSizeCategory
inUIFont(MaterialScalable)
๐ new method:
-mdc_scaledFontAtDefaultSize
inUIFont(MaterialScalable)
๐ new method:
-mdc_scaledFontForSizeCategory:
inUIFont(MaterialScalable)
๐ new category:
UIFont(MaterialScalable)
๐ new property:
mdc_scalingCurve
inUIFont(MaterialScalable)
MDCFontScaler
๐ new class method:
+scalerForMaterialTextStyle:
inMDCFontScaler
๐ new method:
-scaledValueForValue:
inMDCFontScaler
๐ new class:
MDCFontScaler
๐ new method:
-init
inMDCFontScaler
๐ new method:
-initForMaterialTextStyle:
inMDCFontScaler
๐ new method:
-scaledFontWithFont:
inMDCFontScaler
๐ MDCTextStyleHeadline4
๐ new constant:
MDCTextStyleHeadline4
๐ MDCTextStyleHeadline3
๐ new constant:
MDCTextStyleHeadline3
๐ MDCTextStyleHeadline2
๐ new constant:
MDCTextStyleHeadline2
๐ MDCTextStyleHeadline6
๐ new constant:
MDCTextStyleHeadline6
๐ MDCTextStyleBody2
๐ new constant:
MDCTextStyleBody2
๐ MDCTextStyle
๐ new typedef:
MDCTextStyle
๐ MDCTextStyleOverline
๐ new constant:
MDCTextStyleOverline
๐ MDCTextStyleHeadline1
๐ new constant:
MDCTextStyleHeadline1
๐ MDCTextStyleHeadline5
๐ new constant:
MDCTextStyleHeadline5
TypographyScheme
0๏ธโฃ MDCTypographySchemeDefaults
๐ new enum value:
MDCTypographySchemeDefaultsMaterial201902
inMDCTypographySchemeDefaults
MDCTypographyScheme
๐ new property:
mdc_adjustsFontForContentSizeCategory
inMDCTypographyScheme
MDCTypographyScheming
๐ new property:
mdc_adjustsFontForContentSizeCategory
inMDCTypographyScheming
Component changes
๐ Changes
ActivityIndicator
- โ Deflake snapshot tests. (#6934) (Robert Moore)
AppBar
- Fix README code snippet (#6969) (Robert Moore)
- ๐จ Refactor AppBar example table views (#6974) (Brian Moore)
Buttons
- Fix
accessibilityTraits
in init. (#6948) (Robert Moore)
HeaderStackView
- โ Add basic Snapshot tests. (#6923) (Robert Moore)
Ripple
- ๐ Remove manipulation of clipping for the ripple's superview (#6977) (Yarden Eitan)
ShapeLibrary
- โ Add basic Snapshot tests. (#6918) (Robert Moore)
Shapes
- โ Add basic Snapshot tests. (#6919) (Robert Moore)
Tabs
- Do not truncate badge text on MDCItemBarCell (#6916) (Andrew Overton)
Typography
- Add Font Scaler (#6871) (ianegordon)
schemes/Typography
-
v79.3.0 Changes
๐ This minor release fixes a bug in MDCButton's
accessibilityTraits
value. A recent change introduced 0๏ธโฃ a bug that disabled the default behavior ofaccessibilityTraits
and so they would not โก๏ธ automatically be updated when the button was disabled.๐ Changes
Buttons
- Fix
accessibilityTraits
in init. (#6948) (Robert Moore)
- Fix
-
v79.2.0 Changes
๐ This minor release introduces a bug fix and new API to Flexible Header, Beta Theming Extensions for โ App Bar and Text Fields, and additional component snapshot tests.
๐ New features
MDCFlexibleHeaderView has a new API that can be called from UIScrollViewDelegates to notify it of โก๏ธ updated adjusted content inset values.
func scrollViewDidChangeAdjustedContentInset(_ scrollView: UIScrollView) { if #available(iOS 11.0, *) { self.appBarViewController.headerView.trackingScrollDidChangeAdjustedContentInset(scrollView) } }
- (void)scrollViewDidChangeAdjustedContentInset:(UIScrollView *)scrollView { if (@available(iOS 11.0, *)) { [self.appBarViewController.headerView trackingScrollViewDidChangeAdjustedContentInset:scrollView]; } }
API changes
AppBar+MaterialTheming
๐ New extension.
FlexibleHeader
MDCFlexibleHeaderView
๐ new method:
-trackingScrollViewDidChangeAdjustedContentInset:
inMDCFlexibleHeaderView
MDCFlexibleHeaderView()
๐ new category:
MDCFlexibleHeaderView()
โ removed category:
MDCFlexibleHeaderView()
modified property:
contentView
inMDCFlexibleHeaderView()
Type of change: parent.usr From: c:objc(ext)[email protected]@14987
To: c:objc(ext)[email protected]@15448
TextFields+Theming
๐ New extension.
๐ Changes
ActionSheet
- โ Add basic Snapshot tests. (#6917) (Robert Moore)
AppBar
- Add theming extension for MDCAppBarViewController (#6903) (Robert Moore)
BottomNavigation
- โก๏ธ Fix image updates in ItemView (#6847) (Robert Moore)
- More snapshots for item icons. (#6855) (Robert Moore)
- โช Restore examples titles. (#6869) (Robert Moore)
- โ Snapshot test for selection bug (#6843) (Robert Moore)
- โ Split alignment snapshot tests. (#6856) (Robert Moore)
- โ Use new test icons. (#6898) (Robert Moore)
FlexibleHeader
- โก๏ธ update contentInset when tracked view's adjustedContentInset is changed. (#6868) (Wenyu Zhang)
- ๐จ refactor internal helper methods (#6862) (Wenyu Zhang)
Ink
- โ Add basic snapshot tests. (#6920) (Robert Moore)
ShadowElevations
- โ Add basic snapshot tests. (#6829) (Robert Moore)
ShadowLayer
- โ Add basic Snapshot tests. (#6921) (Robert Moore)
TextFields
private/Snapshot
- โ Fix test image scale and clipping. (#6899) (Robert Moore)
- ๐ Adding 4 more test image styles. (#6897) (Robert Moore)
Multi-component changes
- โ Include snapshot tests in examples in Podspec (#6895) (Wenyu Zhang)
- Removing nil-coalescing operators per issue #6827 (#6859) (Joe Aguilar)
- โช Revert "[Typography] Dynamic Type 2.0 (#6733)" (#6848) (ianegordon)
-
v79.1.1 Changes
๐ This patch release fixes a bug in BottomNavigation where the icons were not showing up correctly.
๐ Bugs closed in this release
API changes
Component changes
BottomNavigation
- โก๏ธ Fix image updates in ItemView (#6847) (Robert Moore)
- More snapshots for item icons. (#6855) (Robert Moore)
- โ Snapshot test for selection bug (#6843) (Robert Moore)
-
v79.1.0 Changes
๐ This minor release increases our snapshot testing coverage and introduces a migration flag for including
UIAccessibilityTraitButton
in MDCButton's accessibilityTraits.๐ New features
It is now possible to set
accessibilityTraits
on MDCButton to a custom value that does not includeUIAccessibilityTraitButton
. To enable this new behavior you must first set 0๏ธโฃ accessibilityTraitsIncludesButton = NO. This flag will eventually default to NO and then be ๐ deprecated/deleted.API changes
Buttons
MDCButton
๐ new property:
accessibilityTraitsIncludesButton
inMDCButton
๐ Changes
ActionSheet
- โ Fixes broken action sheet tests. (#6743) (Robert Moore)
ActivityIndicator
- โ Add basic Snapshot tests (#6826) (Robert Moore)
BottomNavigation
- Clean up internal constants (#6834) (Robert Moore)
- Examples clean-up. (#6718) (Robert Moore)
- Prevents the client from setting the navigation items directly when using the bottom navigation bar controller. (#6773) (Eric Lee)
Buttons
- Allow setting
accessibilityTraits
. (#6766) (Robert Moore)
Collections
List
- โ Add basic snapshot tests. (#6822) (Robert Moore)
NavigationBar
- โ Add basic Snapshot tests. (#6821) (Robert Moore)
PageControl
- โ Add basic Snapshot tests. (#6823) (Robert Moore)
ProgressView
- โ Add basic Snapshot tests. (#6825) (Robert Moore)
Ripple
- Added a fix for the ripple sometimes blinking when ending animation (#6792) (Yarden Eitan)
- โก๏ธ update docs (#6772) (Yarden Eitan)
Snackbar
- โ Add basic Snapshot tests. (#6824) (Robert Moore)
- Make initialization threadsafe. (#6768) (Robert Moore)
Tabs
- โ Add basic Snapshot tests. (#6801) (Robert Moore)
- Fix badge text truncation bug in MDCItemBarCell (#6786) (Andrew Overton)
Typography
- โ Add basic Snapshot tests. (#6828) (Robert Moore)
Multi-component changes
- Dynamic Type 2.0 (#6733) (ianegordon)
- Enable -Wunguarded-availability. (#6776) (featherless)
- โช Revert "[Typography] Dynamic Type 2.0 (#6733)" (#6848) (ianegordon)
- โ {Tests} Fix font comparison in Objective-C. (#6789) (Robert Moore)
-
v79.0.1 Changes
This patch release removes
NS_REQUIRES_SUPER
from several MDCCollectionViewController APIs, removing the requirement to call super.API changes
Collections
MDCCollectionViewController
Type of change: Declaration From: - (void)collectionView:(nonnull UICollectionView *)collectionView didHighlightItemAtIndexPath:(nonnull NSIndexPath *)indexPath NS_REQUIRES_SUPER;
To: - (void)collectionView:(nonnull UICollectionView *)collectionView didHighlightItemAtIndexPath:(nonnull NSIndexPath *)indexPath;
Component changes
Collections
-
v79.0.0 Changes
๐ This major release introduces breaking changes for Swift code that makes use of the MDCContainerScheme and MDCContainerScheming types. It also includes breaking changes for Shapes header files and completes the graduation of Shapes to a production-ready state.
๐ฅ Breaking changes
MDCContainerScheming's and MDCContainerScheme's colorScheme and typographyScheme are now both nonnull. This change will require changes in Swift code that make use of these APIs.
All Shapes headers have been renamed, dropping their
New
suffix where applicable.๐ New features
BottomNavigation
BottomNavigation has two new properties:
sizeThatFitsIncludesSafeArea
andbarItemsBottomAnchor
.๐ See [components/BottomNavigation/README.md](components/BottomNavigation/README.md#deprecations) for more details on the
sizeThatFitsIncludesSafeArea
property.barItemsBottomAnchor
allows anchoring the Bottom Navigation bar to the safe area layout guide. This API is available on iOS 9.0 and above. Example usage:if (@available(iOS 11.0, *)) { [navigationBar.barItemsBottomAnchor constraintEqualToAnchor:view.safeAreaLayoutGuide.bottomAnchor] .active = YES; }
FlexibleHeader
MDCFlexibleHeaderViewController
introduces a newsafeAreaDelegate
that can be used to change which view controller is used when extracting top safe area insets.API changes
BottomNavigation
MDCBottomNavigationBar
๐ new property:
sizeThatFitsIncludesSafeArea
inMDCBottomNavigationBar
๐ new property:
barItemsBottomAnchor
inMDCBottomNavigationBar
FlexibleHeader
MDCFlexibleHeaderSafeAreaDelegate
๐ new method:
-flexibleHeaderViewControllerTopSafeAreaInsetViewController:
inMDCFlexibleHeaderSafeAreaDelegate
๐ new protocol:
MDCFlexibleHeaderSafeAreaDelegate
MDCFlexibleHeaderViewController
๐ new property:
safeAreaDelegate
inMDCFlexibleHeaderViewController
ContainerScheme
MDCContainerScheming
modified property:
colorScheme
inMDCContainerScheming
Type of change: Swift declaration From: var colorScheme: Any? { get }
To: var colorScheme: Any { get }
modified property:
colorScheme
inMDCContainerScheming
Type of change: Declaration From: @property (readonly, nonatomic, nullable) id colorScheme;
To: @property (readonly, nonatomic, nonnull) id colorScheme;
modified property:
typographyScheme
inMDCContainerScheming
Type of change: Swift declaration From: var typographyScheme: Any? { get }
To: var typographyScheme: Any { get }
modified property:
typographyScheme
inMDCContainerScheming
Type of change: Declaration From: @property (readonly, nonatomic, nullable) id typographyScheme;
To: @property (readonly, nonatomic, nonnull) id typographyScheme;
MDCContainerScheme
modified property:
colorScheme
inMDCContainerScheme
Type of change: Swift declaration From: var colorScheme: UnsafeMutablePointer<Int32>? { get set }
To: var colorScheme: UnsafeMutablePointer<Int32> { get set }
modified property:
colorScheme
inMDCContainerScheme
Type of change: Declaration From: @property(nonatomic, nullable, readwrite) MDCSemanticColorScheme *colorScheme
To: @property (assign, readwrite, nonatomic, nonnull) int *colorScheme;
modified property:
shapeScheme
inMDCContainerScheme
Type of change: Declaration From: @property(nonatomic, nullable, readwrite) MDCShapeScheme *shapeScheme
To: @property (assign, readwrite, nonatomic, nullable) int *shapeScheme;
modified property:
typographyScheme
inMDCContainerScheme
Type of change: Swift declaration From: var typographyScheme: UnsafeMutablePointer<Int32>? { get set }
To: var typographyScheme: UnsafeMutablePointer<Int32> { get set }
modified property:
typographyScheme
inMDCContainerScheme
Type of change: Declaration From: @property(nonatomic, nullable, readwrite) MDCTypographyScheme *typographyScheme
To: @property (assign, readwrite, nonatomic, nonnull) int *typographyScheme;
Component changes
๐ Changes
BottomAppBar
- hide swift example from Catalog. (#6725) (Wenyu Zhang)
BottomNavigation
- Make Controller available on iOS 8. (#6719) (Robert Moore)
- ๐ Remove deprecation notice from sizeThatFitsIncludesSafeArea (#6727) (featherless)
- sizeThatFits: ignores safe area (#6717) (Robert Moore)
๐ Dialogs
- Fix presented corner radius in custom view controllers (#6696) (Galia Kaufman)
FlexibleHeader
- FlexibleHeader changes (#6748) (Andrew Overton)
NavigationDrawer
- ๐ remove beta references from navigation drawer (#6742) (Yarden Eitan)
PageControl
- ๐ Fixes MDCPageControl not properly revealing page indicators. (#6714) (Yarden Eitan)
Multi-component changes
- ๐ Add autolayout support (#6612) (Robert Moore)
- Fix colorScheme and typographyScheme to be nonnull. (#6699) (Cody Weaver)
- ๐ Move shapes from components/private to components/ - Part 3 (last part) (#6734) (Yarden Eitan)
- Slight changes to Cards targets + rewrite rules (#6749) (Andrew Overton)
- ๐ Support titlePositionAdjustment (#6721) (Robert Moore)
- โก๏ธ updated jazzy yaml files to include framework root (#6750) (Yarden Eitan)
-
v78.0.1 Changes
๐ In this patch release we have provided a ChipTextField example along with some Beta theming bug fixes.
๐ Changes
ActionSheet
- Removing theming extensions dependency on themers (#6654) (Cody Weaver)
- ๐ Remove Beta test from Ready component (#6677) (Cody Weaver)
๐ Dialogs
- Fix button font in Theming Extension (#6638) (Robert Moore)
Ripple
- ๐ Add Ripple snapshot test target to BUILD file (#6698) (Andrew Overton)
Multi-component changes
- โ Fixing Snapshot Tests (#6618) (Andrew Overton)
- Use MDCChipTextFieldScrollView to replace leftView functionality for flexibility and extensibility (#6686) (Wenyu Zhang)
-
v78.0.0 Changes
๐ This major release promotes the Shape libraries from private to ready, as well as promoting Action Sheet to ready by migrating it from the MaterialComponentsBeta podspec to the MaterialComponents main podspec. Lastly, we've increased our snapshot test coverage across multiple components.
๐ฅ Breaking changes
โก๏ธ Moving both Shape libraries, Shapes and ShapeLibrary, from components/private/ to components/ is a breaking change. Clients need to migrate over and update their imports to point to the new location of the Shape libraries.
API changes
ActionSheet
๐ New component - promoted to Ready.
ShapeLibrary
๐ New component - Migrated to components/ from components/private.
Shapes
๐ New component - Migrated to components/ from components/private.
Component changes
Multi-component breaking changes
- ๐ฅ Breaking: Move shapes from components/private to components/ - Part 2 (#6664) (Yarden Eitan)
๐ Changes
ActionSheet
- Promote to Ready (#6613) (Cody Weaver)
BottomAppBar
- Fix FAB location when RTL changes. (#6644) (Robert Moore)
- โ Add basic snapshot tests. (#6643) (Robert Moore)
ButtonBar
- โ Add basic snapshot tests. (#6662) (Robert Moore)
Buttons
- โ Add states snapshot tests. (#6639) (Robert Moore)
Cards
๐ Dialogs
- add an example for custom dialog view controller themed by theming extension (#6601) (Wenyu Zhang)
- โ Add snapshot tests to MDCAlertController (#6641) (Robert Moore)
NavigationDrawer
- โ Expose the a11y identifier so it can be reached for testing purposes. (#6659) (Yarden Eitan)
- add a11y identifier for the nav drawer scrollview (#6629) (Yarden Eitan)
Ripple
Shapes
- shape path nil check (#6616) (Yarden Eitan)
Slider
- โ Add basic snapshot tests. (#6640) (Robert Moore)
TextFields
- โก๏ธ Updates to SimpleTextFIeld and InputChipView prototype (#6647) (Andrew Overton)
Multi-component changes
- โก๏ธ Fix snapshot testing after Cocoapods 1.6.0 update (#6611) (Andrew Overton)
- โก๏ธ Revert "[Cocoapods] Fix snapshot testing after Cocoapods 1.6.0 update (#6611)" (#6619) (Andrew Overton)
-
v77.0.0 Changes
๐ In this release we made improvements to BottomNavigationBar and landed stateful ripple in the ripple (beta) component.
๐ฅ Breaking changes
BottomNavigationBar
โ Removed a deprecated API:
@property(nonatomic, assign) UIEdgeInsets itemsContentInsets
๐ New features
BottomNavigationBar
Blur
BottomNavigation can use blur in its background when not fully opaque
self.bottomNavBar.backgroundBlurEnabled = YES;
Long item titles
We automatically truncate titles that go out of bounds but added a flag to allow some clients to still overflow.
self.navigationBar.truncatesLongTitles = NO;
Stateful Ripple
We added this new component that simplifies the intersection of states and ripples.
You can set the state of the ripple like so:
statefulRippleView.isRippleHighlighted = true ... statefulRippleView.isSelected = true
API changes
BottomNavigation
MDCBottomNavigationBar
๐ new property:
backgroundBlurEffectStyle
inMDCBottomNavigationBar
๐ new property:
backgroundBlurEnabled
inMDCBottomNavigationBar
๐ new property:
truncatesLongTitles
inMDCBottomNavigationBar
โ removed property:
itemsContentInsets
inMDCBottomNavigationBar
Ripple
MDCRippleState
๐ new enum:
MDCRippleState
๐ new enum value:
MDCRippleStateSelected
inMDCRippleState
๐ new enum value:
MDCRippleStateDragged
inMDCRippleState
๐ new enum value:
MDCRippleStateHighlighted
inMDCRippleState
๐ new enum value:
MDCRippleStateNormal
inMDCRippleState
๐ new typedef:
MDCRippleState
MDCStatefulRippleView
๐ new class:
MDCStatefulRippleView
๐ new method:
-rippleColorForState:
inMDCStatefulRippleView
๐ new property:
selected
inMDCStatefulRippleView
๐ new property:
allowsSelection
inMDCStatefulRippleView
๐ new property:
rippleHighlighted
inMDCStatefulRippleView
๐ new method:
-setRippleColor:forState:
inMDCStatefulRippleView
๐ new property:
dragged
inMDCStatefulRippleView
Component changes
๐ Changes
BottomNavigation
- Add blur example (#6589) (Robert Moore)
- Badge size grows with value (#6594) (Robert Moore)
- ๐ Add support for blur effect. (#6587) (Robert Moore)
- Delete
itemsContentInsets
API (#6584) (Robert Moore) - Extend ripple to bar bounds. (#6586) (Robert Moore)
- Fix "centered" alignment. (#6604) (Robert Moore)
- Fix Item View layout. (#6603) (Robert Moore)
- Fix badge position and font. (#6602) (Robert Moore)
๐ Dialogs
- ๐ Remove internal usage of Themers. (#6572) (Robert Moore)
- add an example for themed button with emphasis (#6600) (Wenyu Zhang)
- hide non main examples in Catalog (#6576) (Wenyu Zhang)
Ripple
- [Ripple] Provides a Stateful Ripple implementation (#6591) (Yarden Eitan)
Multi-component changes
- Fix ripple layout issues with autolayout (#6588) (Yarden Eitan)
- {kokoro} Fix develop (#6575) (Robert Moore)