102 Commits

Author SHA1 Message Date
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Bryan Oltman
da4b8f7c7f Fix mdc_elevationDidChangeBlock block parameter types for Xcode 12
PiperOrigin-RevId: 331843566
2020-09-15 13:39:15 -07:00
Yarden Eitan
8d7bc88a11 [Ink] Official deprecation of Ink.
Please use the Ripple component.

PiperOrigin-RevId: 329771765
2020-09-02 13:07:40 -07:00
Andrew Overton
0ec073f1bc [List] Replace list docs
This PR replaces the List docs for b/152926192.

Closes https://github.com/material-components/material-components-ios/pull/10023

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10023 from andrewoverton:material-io-list-doc 365ad20f1c043386056acb7cb405857f745a83b3
PiperOrigin-RevId: 317154737
2020-06-18 12:21:05 -07:00
Yarden Eitan
f425b8995b [Ripple] Update alpha value of Ripple to 0.12 instead of 0.16
PiperOrigin-RevId: 316850177
2020-06-17 02:23:19 -07:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Jeff Verkoeyen
92254ea119 Rename all icons to an ic_<#name#> convention.
PiperOrigin-RevId: 308232277
2020-04-24 04:33:51 -07:00
Randall Li
0100cfe414 [MDC-iOS/BottomSheet] Fix dismissOnDraggingDownSheet behavior
The bottom sheet incorrectly allowed the sheet to be drag dismissed when `dismissOnDraggingDownSheet` was set to NO.

This change permits the gesture to dismiss to begin but prevents it from actually closing the sheet.

https://github.com/material-components/material-components-ios/issues/9723

Closes https://github.com/material-components/material-components-ios/pull/9885

PiperOrigin-RevId: 307802500
2020-04-22 06:21:26 -07:00
Dave MacLachlan
ebac2a8eb7 As of iOS 9/macOS 10.11 (circa 2015) removing objective C objects from the NSNotificationCenter in - (void)dealloc. is no longer required (the classic example is: [[NSNotificationCenter defaultCenter] removeObserver:self] but there are several variations).
In many cases this is the only thing being done in - (void)dealloc, so we can remove the whole thing.

PiperOrigin-RevId: 307663440
2020-04-21 13:00:30 -07:00
Jeff Verkoeyen
5957dd223a [Lists] Use standard "List Items" name for all Lists examples.
The CollectionListCellExampleTypicalUse was using "Lists" as its top-level breadcrumb instead of "List Items", which was causing it to appear in its own category in the catalog. This does not appear to be intentional, so this change aligns the example with the component's conventional name.

PiperOrigin-RevId: 306422785
2020-04-14 06:01:11 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
Andrew Overton
79c96ec26f
Add MDCSelfSizingLayoutAttributes (#9823)
Add MDCSelfSizingLayoutAttributes

This protocol allows custom UICollectionViewLayouts to let the cell know how to self-size. For example, a column layout might have fixed column widths, but allow the cells to self-size vertically, so it can return YES from isFixedWidth and the cell will then only resize vertically.

Cells can either manually implement this behavior, or subclass MDCBaseCell to get it automatically.

PiperOrigin-RevId: 298369495
2020-03-04 11:09:10 -05:00
Andrew Overton
f3c66548f7 This change makes rippleColor null_resettable on MDCBaseCell
PiperOrigin-RevId: 293430561
2020-02-05 12:56:37 -08:00
Andrew Overton
cea950de09 Make padding between title label and detail label smaller
This change gets rid of the dynamic padding between labels in MDCSelfSizingStereoCell. With larger fonts it's too big.

PiperOrigin-RevId: 293427754
2020-02-05 12:42:01 -08:00
featherless
162a063bda
[bazel] Remove all unused mdc_objc_library loads. (#9376)
Found by searching for all references to `\bmdc_objc_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/9363
2020-01-02 14:34:36 -05:00
featherless
b7cf0de915
[bazel] Remove all unused swift_library load statements. (#9369)
Found by searching for all references to `\bswift_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/5491
2020-01-02 11:01:31 -05:00
Galia Kaufman
71ee6bd77e
[List] Fix typo in doc (#9301)
Fix typo in MDCList readme.
2019-12-18 13:03:44 -05:00
Galia Kaufman
d5863ef1b5
[List] Remove MDCListTypographyThemer (#9190)
Delete symbol MDCListTypographyThemer from our library (b/145204420).
2019-12-18 12:38:16 -05:00
Galia Kaufman
ef9887f735
[List] Removing Themers from documentation (#9296)
Removing MDCList Themers from documentation, replacing them with theming extensions. (b/145204420, b/145204461)
2019-12-18 12:36:47 -05:00
Galia Kaufman
7119b49862
[List] Remove MDCListColorThemer (#9188)
* Removing MDCListColorThemer

* Removing ColorThemer targets from BUILD file
2019-12-16 14:56:03 -05:00
Galia Kaufman
6e8fdfff36
[List] Deprecaet MDCListColorThemer (#9265)
Deprecating MDCListColorThemer (b/145204461).
2019-12-13 12:40:13 -05:00
Galia Kaufman
20c4cad529
[List] Deprecate MDCListTypographyThemer (#9269)
Deprecate symbol MDCListTypographyThemer (Issue #9222)
2019-12-13 12:36:54 -05:00
Galia Kaufman
6271396e6c
Remove usage of MDCListTypographyThemer within our library (#9189)
Removing calls to MDCListTypographyThemer from within our library. (b/145204420)
2019-12-11 16:02:33 -05:00
Galia Kaufman
36f6a30fa6
[List] Removing MDCListThemer (#9187)
Removing MDCListThemer from within our library.
2019-12-09 19:49:21 -05:00
Galia Kaufman
5c4884261f
removing use of MDCListColorThemer before deprecating it. (#9145)
Removing calls to MDCListColorThemer from within our library (b/145204432).
2019-12-06 11:49:01 -05:00
Robert Moore
90fcc9281a [ListItems] Make Base Cell example more accessible. (#8982)
Provides accessibility labels and distinguishing colors for each cell. Voice
Over users can now scroll the example.

Closes #8898
2019-11-18 08:29:05 -05:00
Cody Weaver
f660c8a732
[List] Fix catalog compile issue (#8974)
This fixes a compile issue within the catalog where we were accidentally formatting a string wrong.

NO_BUG=Fast follow on #8953
2019-11-15 13:55:09 -08:00
Robert Moore
009af8be81 [List] Make Base Cell example more accessible. (#8947)
Allows for interaction using Voice Over and Switch Control.

|Before|After|
|---|---|
|![IMG_0100](https://user-images.githubusercontent.com/1753199/68967740-e96a8e80-07ae-11ea-8309-7abb3baa9b39.PNG)|![IMG_0101](https://user-images.githubusercontent.com/1753199/68967753-f5565080-07ae-11ea-88bc-bb18e1ef0bcf.PNG)|



Part of #8898
2019-11-15 16:13:06 -05:00
Galia Kaufman
722399ddce
[MDC Dragons] Fix MDCBaseCell Example to work with Voice Over (#8953)
Make sure List cells are accessible to Voice Over and have a label that distinguish them from each other, and have the selected trait when selected.
2019-11-15 15:27:26 -05:00
Bryan Oltman
c89ac31d2b
[Catalog] Fix accessibility labels and layout in CollectionListCellExampleTypicalUse (#8944)
* [Catalog] Fix accessibility labels and layout in CollectionListCellExampleTypicalUse

* clang
2019-11-15 14:06:08 -05:00
Yarden Eitan
6123da4c55
[List] Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8636)
This PR adds 2 snapshot tests to verify the behavior for setting preferredFont on the Banner's text elements when adjustsFontForContentSizeCategory is set to YES.

Closes #8637
2019-10-23 16:25:25 -04:00
Robert Moore
0f7758dda7
[TypographyScheme] Replace mdc_adjustsFontForContentSizeCategory with (#8476)
Replaces the deprecated API `mdc_adjustsFontForContentSizeCategory` with its
stated replacement, `useCurrentContentSizeCategoryWhenApplied`. Also makes the
replacement API required to ensure there is an available API to communicate
this information to theming code.

This change has already been tested internally and the necessary changes are captured in cl/270386732.

Closes #7618
2019-09-23 11:58:44 -04:00
Robert Moore
822cbcbfe0
[List] Fix docs rendering for snippet. (#8353)
Corrects a comment-based markup div ending tag that got broken.

Closes #8352
2019-08-21 15:44:31 -04:00
Robert Moore
39bcd3e651 [List] Fix remaining code blocks. (#8313)
The remaining code blocks should now be able to switch between Objective-C and
Swift on the material.io page once it's uploaded.

Part of #8291
2019-08-15 09:53:52 -04:00
Robert Moore
63ce18bfb3
[List] Fix missing images on material.io. (#8310)
The opening section [List article on
material.io](https://material.io/develop/ios/components/list/) were missing.
This corrects them to be `img` tags rather than markdown links to GitHub user
content.

Part of #8291
2019-08-14 13:06:56 -04:00
Robert Moore
70bb5995e7
[List] Fix typo in README (#8302)
"Objective-C" was misspelled.

Part of #8293
2019-08-13 12:52:50 -04:00
Robert Moore
ea2f2ca2eb
[List] Fix docs markdown. (#8294)
The List documentation was missing the material.io code markers. Many of the
snippets did not render at all in Swift. This PR adds some, but not all.

Improves #8293
2019-08-13 11:52:06 -04:00
Robert Moore
0d493b69cc
[List] Use Starlark macros in BUILD file. (#8174)
Use more Starlark macros in the BUILD file to make releasing easier.

Part of #8150
2019-08-02 10:22:10 -04:00
Robert Moore
1c0827f2ef
[*] Correct elevationDidChangeBlock type. (#8106)
The property type for `elevationDidChangeBlock` declared in `MDCElevatable` should not be changed when declaring the property in headers. If it is, the compiler can generate a warning or error because the types are incompatible.

Closes #8105
2019-07-29 08:08:39 -04:00
Robert Moore
cbeb6f5bc7
[List] Support MaterialElevation. (#8078)
Adds conformance to `MDCElevatable` and `MDCElevationOverriding` for the base
cell and self-sizing stereo cell.

Closes #8017
2019-07-25 09:25:20 -04:00
Cody Weaver
f75253d274
[List] Add traitCollectionDidChange block to MDCBaseCell (#8033)
Adds a traitCollectionDidChangeBlock to MDCBaseCell and its supclasses, called when its trait collection changes.

This change also does a mv operation to move the BaseCellRippleTests to BaseCellTests to make the test cell more generic to the type and less specific to the tests.
2019-07-23 11:28:01 -07:00
Yarden Eitan
b9ad888e6d
[List] Adds the Ripple behavior to List. (#7591)
## Related links
* Bug: Closes #7380 
* Ripple: [MDCRippleView](https://github.com/material-components/material-components-ios/tree/develop/components/Ripple)

## Introduction
This PR integrates [`MDCRippleView`](https://github.com/material-components/material-components-ios/blob/develop/components/Ripple/src/MDCRippleView.h) into [`MDCBaseCell`](https://github.com/material-components/material-components-ios/tree/develop/components/List). This behavior is an opt in flag property added to MDCBaseCell, `enableRippleBehavior`.  This improves the visual touch feedback for our users as MDCInkView didn't support our current motion guidelines. We are also marking any of the Ink APIs ToBeDeprecated as part of the [Deprecation Policy](cb6b8e9599/contributing/deprecation_policy.md (step-4-add-a-comment-to-the-api-indicating-that-it-will-be-deprecated)).

## Videos
| Before | After |
| - | - |
|![oldRipple](https://user-images.githubusercontent.com/4066863/59466835-43c88300-8dfc-11e9-9867-f97d48c5f7d2.gif)|![newRipple](https://user-images.githubusercontent.com/4066863/59466842-462add00-8dfc-11e9-8e69-b0e2602568de.gif)|
2019-06-15 14:32:48 -04:00
Andrew Overton
5836cd41ca
[List] Fix self sizing layout in iOS 13 (#7536)
List cell self sizing wasn't working in iOS 13. This PR fixes it.

Here's an iOS 13 before photo:
![Simulator Screen Shot - iPhone Xʀ - 2019-06-04 at 10 20 50](https://user-images.githubusercontent.com/8020010/58887161-1a4c8080-86b3-11e9-960d-f5f73be17349.png)

Here's an iOS 13 after photo:
![Simulator Screen Shot - iPhone Xʀ - 2019-06-04 at 10 21 27](https://user-images.githubusercontent.com/8020010/58887160-1a4c8080-86b3-11e9-8399-991551b794af.png)

Here's an iOS 11 after photo:
![Simulator Screen Shot - iPhone 8 - 2019-06-04 at 10 25 35](https://user-images.githubusercontent.com/8020010/58887159-1a4c8080-86b3-11e9-80f6-6b23a0a7961c.png)

Closes #7533.
2019-06-05 11:56:02 -04:00
Wenyu Zhang
461d475a3d
[List] Use UICollectionView as environment in List snapshot test. (#7508)
closes https://github.com/material-components/material-components-ios/issues/7487.

In the old List snapshot test, the cell didn't auto-size because it was initialized with a fixed size. The self sizing cell should work in a collection view environment. This PR fixes this issue and updated the golden image to reflect the test result.
2019-05-28 22:13:56 -04:00
featherless
1edfca18d5
[List] Refactor dynamic type support to use mdc_scaledFontForTraitEnvironment. (#7495)
Part of https://github.com/material-components/material-components-ios/issues/7470

The existing behavior is being replaced with the identical behavior implemented by UIFont's `-mdc_scaledFontForTraitEnvironment:`, shown below:

8a139a8732/components/Typography/src/UIFont%2BMaterialScalable.m (L56-L64)
2019-05-28 08:57:17 -04:00
Wenyu Zhang
0db87df9cf
[List] add Dynamic Type support on List Typography Themer. (#7491)
Part of https://github.com/material-components/material-components-ios/issues/7385.

This PR adds support for List Typography Themer to scale fonts on titleLabel and detailLabel if `useCurrentContentSizeCategoryWhenApplied` or `mdc_adjustsFontForContentSizeCategory` (legacy flag) is turned on.
2019-05-24 18:08:45 -04:00
Wenyu Zhang
13033cd0c7
[List] Update snapshot golden images for dynamic type change. (#7486)
Golden images didn't get updated when List dynamic type pull request was merged.
2019-05-24 14:26:03 -04:00
Wenyu Zhang
2f630d275a
[List] Add M2 Dynamic Type support for MDCSelfSizingStereoCell (#7440)
Follow-up of https://github.com/material-components/material-components-ios/pull/7413.

Part of #7385.
2019-05-23 23:34:10 -04:00
Wenyu Zhang
a21108979e
[List] Snapshot tests for upcoming Scalable Font behavior. (#7458)
Adding tests for the upcoming Scalable Fonts Dynamic Type work. This PR focuses on the use case where `mdc_adjustsFontForContentSizeCategory = YES;` and when Scalable Fonts are attached. 

A separate PR will handle the "fall-back" case (when a non-Scalable Font is used) and potentially a third PR for the current (legacy) behavior.

Pre-work of https://github.com/material-components/material-components-ios/issues/7385.
2019-05-23 15:49:27 -04:00
Wenyu Zhang
32d8d4d789
[List] Add basic snapshot tests for MDCSelfSizingStereoCell. (#7439) 2019-05-22 09:56:51 -04:00