Improve API diffs for classes with new properties. (#23)

Authored by featherless on Aug 27 2018, 11:26 AM.

Description

Improve API diffs for classes with new properties. (#23)

Prior to this change, additions of properties to a class would result in a modification result that showed the before and after of the class's code, like so:

Type of change:Declaration
From:@interface MDCAlertControllerView : UIView @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *titleColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *messageFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *messageColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *buttonFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *buttonColor UI_APPEARANCE_SELECTOR; /* Indicates whether the view's contents should automatically update their font when the device’s UIContentSizeCategory changes. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; @end
To:@interface MDCAlertControllerView : UIView @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *titleColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *messageFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *messageColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIFont *buttonFont UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *buttonColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, nullable) UIColor *buttonInkColor UI_APPEARANCE_SELECTOR; /* Indicates whether the view's contents should automatically update their font when the device’s UIContentSizeCategory changes. This property is modeled after the adjustsFontForContentSizeCategory property in the UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10. Default value is NO. */ @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; @end

After this change, we will no longer output these types of modifications.

Source: https://github.com/material-components/material-components-ios/pull/4847

Details

Committed
GitHub <noreply@github.com>Aug 27 2018, 11:26 AM
Parents
R28:e17593e57945: fix for Xcode scheme name match and turn the Xcode project into a Swift Package…
Branches
Unknown
Tags
Unknown