Skip to content

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenyu Zhang committed Jun 29, 2020
2 parents bb82074 + ea08067 commit 50a0d4c
Show file tree
Hide file tree
Showing 66 changed files with 1,042 additions and 1,101 deletions.
126 changes: 126 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,129 @@
# 110.1.0

In this minor release, we deprecated `visibleAreaInsets` from `MDCChipView` and added `centerVisibleArea` API. We annotated several APIs as to be deprecated in Buttons. Ripple support is added to CollectionCells and Collections as well.

## New deprecations

### Chips

`visibleAreaInsets` is deprecated.

## New features

### CollectionCells

Ripple is supported as an opt-in behavior.

**Objective-C**

```objc
MDCCollectionCell *cell= [[MDCCollectionCell alloc] init];
cell.enableRippleBehavior = YES;
```

**Swift**

```swift
let cell = MDCCollectionCell()
cell.enableRippleBehavior = true
```

### Chips

Chips supports `centerVisibleArea`, which is often used to configure invisible part of frame for tappable area.

**Objective-C**

```objc
MDChipView *chip = [[MDCChipView alloc] init];
chip.centerVisibleArea = YES;
```

**Swift**

```swift
let chip = MDCChipView()
chip.centerVisibleArea = true
```

## API changes

### Chips

*new* property: `centerVisibleArea` in `MDCChipView`

### CollectionCells

*new* property: `enableRippleBehavior` in `MDCCollectionViewCell`

*new* property: `rippleView` in `MDCCollectionViewCell`

### Collections

*new* property: `enableRippleBehavior` in `MDCCollectionViewController`

*new* method: `- collectionView:rippleTouchController:rippleViewAtIndexPath:` in `MDCCollectionViewStylingDelegate`

### TextFields

*new* property: `useConstraintsForIntrinsicContentSize` in `MDCMultilineTextField`

## Component changes

### ActionSheet

* [Fix broken links](https://github.com/material-components/material-components-ios/commit/4cc338ac65a02d7999013e0865474bea386411fd) (Andrew Overton)

### AppBar

* [Remove redundant To Be Deprecated annotation.](https://github.com/material-components/material-components-ios/commit/2445d525894be3ce63b97f8c116eb08ee600c644) (Jeff Verkoeyen)

### BottomNavigation

* [Add check for existence of UIPointerInteraction to prevent iOS 13 beta crashes.](https://github.com/material-components/material-components-ios/commit/7e252891630355519879ef0fe5d1b305061e9f18) (Bryan Oltman)

### Buttons

* [Mark more apis as to-be-deprecated.](https://github.com/material-components/material-components-ios/commit/89477800f19d3fff1162d6cad164ae9248379ae2) (Jeff Verkoeyen)

### Chips

* [Add centerVisibleArea to MDCChipView and deprecate visibleAreaInsets.](https://github.com/material-components/material-components-ios/commit/87422cf14f454ce8c0c9f4a9c3233f2aa73ef6b4) (Wenyu Zhang)

### Dialogs

* [Modify dialogs docs](https://github.com/material-components/material-components-ios/commit/9806cab151bf8feb7b22e431cb032d247b76a965) (Andrew Overton)

### NavigationDrawer

* [Updated documentation](https://github.com/material-components/material-components-ios/commit/b9e03824255ce734cf4741d19d25696f5108bf7f) (Josue Lopes)

### ProgressView

* [Fix RTL support on MDCProgressGradientView.](https://github.com/material-components/material-components-ios/commit/39de3e3efbabda3e20aabf14485f872979b8d230) (Wenyu Zhang)
* [Reimplement animation on indeterminate mode to meet specification.](https://github.com/material-components/material-components-ios/commit/989635ba8b6663eda33534c464c12cd4cf4ec1e2) (Wenyu Zhang)
* [Reverse the start point and end point of indeterminate progress stroke to make it aligning with the animation direction.](https://github.com/material-components/material-components-ios/commit/a411506026c6a27b5439264dba552900ef7fb11a) (Wenyu Zhang)

### Snackbar

* [Use the ToBeDeprecated convention for to-be-deprecated APIs.](https://github.com/material-components/material-components-ios/commit/55a51fad9a00327350489e9c4bec4f1ff2824fd9) (Jeff Verkoeyen)

### TextFields

* [Updates MDCMultilineTextField to better support being embedded in self-sizing cells.](https://github.com/material-components/material-components-ios/commit/b3a632da4654d30ffa6f152bf4954951305c84d6) (Nobody)
* [Updates MDCMultilineTextField's bottom textfield constraint to use the textInsets as the constant.](https://github.com/material-components/material-components-ios/commit/e214be3b2d4a945dcb8e3e0c4fe914c9e628b327) (Nobody)

### private/ThumbTrack

* [Move private MDCDiscreteDotView class into its own header and implementation files.](https://github.com/material-components/material-components-ios/commit/ba636497272b28ec28d2fbc65fb673b673bfa2cb) (Bryan Oltman)

## Multi-component changes

* [Add Ripple as an opt-in for MDCCollections and MDCCollectionCells](https://github.com/material-components/material-components-ios/commit/f8465c8fb3e68bc950c9991d803c223cdc82b60c) (Yarden Eitan)
* [Delete obsolete markdown files](https://github.com/material-components/material-components-ios/commit/b2051644778785099ed79f1c718191f69c3d1177) (Andrew Overton)

---

# 110.0.0

In this major release we removed an API from `MDCProgressView` and fixed bugs in ActionSheet, Dialogs, ProgressView, Ripple, and TextControls.
Expand Down
4 changes: 3 additions & 1 deletion MaterialComponents.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'

Pod::Spec.new do |mdc|
mdc.name = "MaterialComponents"
mdc.version = "110.0.0"
mdc.version = "110.1.0"
mdc.authors = "The Material Components authors."
mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
mdc.homepage = "https://github.com/material-components/material-components-ios"
Expand Down Expand Up @@ -669,6 +669,7 @@ Pod::Spec.new do |mdc|
component.dependency "MDFInternationalization"
component.dependency "MaterialComponents/CollectionLayoutAttributes"
component.dependency "MaterialComponents/Ink"
component.dependency "MaterialComponents/Ripple"
component.dependency "MaterialComponents/Typography"
component.dependency "MaterialComponents/Palettes"
component.dependency "MaterialComponents/private/Icons/ic_check"
Expand Down Expand Up @@ -723,6 +724,7 @@ Pod::Spec.new do |mdc|
component.dependency "MaterialComponents/CollectionLayoutAttributes"
component.dependency "MaterialComponents/Ink"
component.dependency "MaterialComponents/Palettes"
component.dependency "MaterialComponents/Ripple"
component.dependency "MaterialComponents/ShadowElevations"
component.dependency "MaterialComponents/ShadowLayer"
component.dependency "MaterialComponents/Typography"
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsBeta.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |mdc|
mdc.name = "MaterialComponentsBeta"
mdc.version = "110.0.0"
mdc.version = "110.1.0"
mdc.authors = "The Material Components authors."
mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution."
mdc.homepage = "https://github.com/material-components/material-components-ios"
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsEarlGreyTests.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsEarlGreyTests"
s.version = "110.0.0"
s.version = "110.1.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests."
s.description = "This spec is made for use in the MDC Catalog."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsExamples.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsExamples"
s.version = "110.0.0"
s.version = "110.1.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components examples."
s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsSnapshotTests.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end

Pod::Spec.new do |s|
s.name = "MaterialComponentsSnapshotTests"
s.version = "110.0.0"
s.version = "110.1.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components snapshot tests."
s.homepage = "https://github.com/material-components/material-components-ios"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
110.0.0
110.1.0
4 changes: 2 additions & 2 deletions catalog/MDCCatalog/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>110.0.0</string>
<string>110.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>110.0.0</string>
<string>110.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down
59 changes: 28 additions & 31 deletions catalog/MDCCatalog/MDCCatalogComponentsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import CatalogByConvention
import MaterialCatalog

import MaterialComponents.MaterialFlexibleHeader
import MaterialComponents.MaterialIcons_ic_arrow_back
import MaterialComponents.MaterialInk
import MaterialComponents.MaterialLibraryInfo
import MaterialComponents.MaterialRipple
import MaterialComponents.MaterialShadowElevations
import MaterialComponents.MaterialShadowLayer
import MaterialComponents.MaterialThemes
import MaterialComponents.MaterialTypography
import MaterialComponents.MaterialIcons_ic_arrow_back

import UIKit

class MDCCatalogComponentsController: UICollectionViewController, UICollectionViewDelegateFlowLayout, MDCInkTouchControllerDelegate {
class MDCCatalogComponentsController: UICollectionViewController,
UICollectionViewDelegateFlowLayout, MDCRippleTouchControllerDelegate
{

fileprivate struct Constants {
static let headerScrollThreshold: CGFloat = 30
Expand All @@ -39,10 +39,10 @@ class MDCCatalogComponentsController: UICollectionViewController, UICollectionVi

fileprivate lazy var headerViewController = MDCFlexibleHeaderViewController()

private lazy var inkController: MDCInkTouchController = {
let controller = MDCInkTouchController(view: self.collectionView!)
controller.delaysInkSpread = true
private lazy var rippleController: MDCRippleTouchController = {
let controller = MDCRippleTouchController()
controller.delegate = self
controller.shouldProcessRippleWithScrollViewGestures = false
return controller
}()

Expand Down Expand Up @@ -146,7 +146,7 @@ class MDCCatalogComponentsController: UICollectionViewController, UICollectionVi
override func viewDidLoad() {
super.viewDidLoad()

inkController.addInkView()
rippleController.addRipple(to: self.collectionView!)

let containerView = UIView(frame: headerViewController.headerView.bounds)
containerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
Expand Down Expand Up @@ -318,45 +318,42 @@ class MDCCatalogComponentsController: UICollectionViewController, UICollectionVi
return node.children.count
}

func inkViewForView(_ view: UIView) -> MDCInkView {
let foundInkView = MDCInkView.injectedInkView(for: view)
foundInkView.inkStyle = .bounded
foundInkView.inkColor = UIColor(white:0.957, alpha: 0.2)
return foundInkView
}

// MARK: MDCInkTouchControllerDelegate
// MARK: MDCRippleTouchControllerDelegate

func inkTouchController(_ inkTouchController: MDCInkTouchController,
shouldProcessInkTouchesAtTouchLocation location: CGPoint) -> Bool {
return self.collectionView!.indexPathForItem(at: location) != nil
func rippleTouchController(
_ rippleTouchController: MDCRippleTouchController,
shouldProcessRippleTouchesAtTouchLocation location: CGPoint
) -> Bool {
return self.collectionView?.indexPathForItem(at: location) != nil
}

func inkTouchController(_ inkTouchController: MDCInkTouchController,
inkViewAtTouchLocation location: CGPoint) -> MDCInkView? {
if let indexPath = self.collectionView!.indexPathForItem(at: location) {
let cell = self.collectionView!.cellForItem(at: indexPath)
return inkViewForView(cell!)
func rippleTouchController(
_ rippleTouchController: MDCRippleTouchController,
rippleViewAtTouchLocation location: CGPoint
) -> MDCRippleView? {
if let indexPath = self.collectionView?.indexPathForItem(at: location) {
let cell = self.collectionView?.cellForItem(at: indexPath)
return MDCRippleView.injectedRippleView(for: cell!)
}
return MDCInkView()
return MDCRippleView()
}

// MARK: UICollectionViewDelegate

override func collectionView(_ collectionView: UICollectionView,
cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell =
collectionView.dequeueReusableCell(withReuseIdentifier: "MDCCatalogCollectionViewCell",
for: indexPath)
collectionView.dequeueReusableCell(withReuseIdentifier: "MDCCatalogCollectionViewCell",
for: indexPath)
cell.backgroundColor = AppTheme.containerScheme.colorScheme.backgroundColor

let componentName = node.children[indexPath.row].title
if let catalogCell = cell as? MDCCatalogCollectionViewCell {
catalogCell.populateView(componentName)
}

// Ensure that ink animations aren't recycled.
MDCInkView.injectedInkView(for: view).cancelAllAnimations(animated: false)
// Ensure that ripple animations aren't recycled.
MDCRippleView.injectedRippleView(for: view).cancelAllRipples(animated: false, completion: nil)

return cell
}
Expand Down
4 changes: 2 additions & 2 deletions catalog/MDCDragons/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>110.0.0</string>
<string>110.1.0</string>
<key>CFBundleVersion</key>
<string>110.0.0</string>
<string>110.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion catalog/MaterialCatalog/MaterialCatalog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialCatalog"
s.version = "110.0.0"
s.version = "110.1.0"
s.summary = "Helper Objective-C classes for the MDC catalog."
s.description = "This spec is made for use in the MDC Catalog."
s.homepage = "https://github.com/material-components/material-components-ios"
Expand Down
8 changes: 4 additions & 4 deletions components/ActionSheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,21 @@ The layout of the Action Sheet list items can be adjusted with the
`contentEdgeInsets` API. Positive values will inset the content and negative
values will outset the conent. The insets apply to all action items.

<img src="docs/assets/actionsheet-default appearance.png" alt="Action Sheet showing three items with default edge content insets." width="375">
<img src="docs/assets/actionsheet-default-appearance.png" alt="Action Sheet showing three items with default edge content insets." width="375">
<!--{: .article__asset.article__asset--screenshot }-->
Action Sheet showing three items with default content insets.

For example, setting top and bottom insets (positive values) will reduce the
height of the Action list items.
height of the Action list items.

<img src="docs/assets/actionsheet-top and bottom insets.png" alt="Action Sheet showing three items with top and bottom content edge insets." width="375">
<img src="docs/assets/actionsheet-top-and-bottom-insets.png" alt="Action Sheet showing three items with top and bottom content edge insets." width="375">
<!--{: .article__asset.article__asset--screenshot }-->
Action Sheet showing three items with top and bottom content edge insets.

Setting a left outset (negative value) and right inset (positive value) will
shift the Action's content to the trailing edge.

<img src="docs/assets/actionsheet-left outset right inset.png" alt="Action Sheet showing three items with a left content edge outset and right inset shifting content to the right." width="375">
<img src="docs/assets/actionsheet-left-outset-right-inset.png" alt="Action Sheet showing three items with a left content edge outset and right inset shifting content to the right." width="375">
<!--{: .article__asset.article__asset--screenshot }-->
Action Sheet showing three items with a left content edge outset and right inset shifting content to the right.

Expand Down
Loading

0 comments on commit 50a0d4c

Please sign in to comment.