954 Commits

Author SHA1 Message Date
Yarden Eitan
0b381e191f Revert "[AppBar] Use test Typography scheme (#6692)"
This reverts commit f7bbace1c0403760445ca02af97f171285d8c773.
2019-02-26 11:49:37 -05:00
Yarden Eitan
72be04af6b Revert "[ButtonBar] Use test Typography scheme (#6693)"
This reverts commit 84916db4360bd9b3db0a7fd5312f1760c840019b.
2019-02-26 11:49:22 -05:00
Yarden Eitan
07343a951b Revert "[Snackbar] Use test Typography scheme (#6695)"
This reverts commit b99025053836a0c97b6b453914f78d379d375f08.
2019-02-26 11:48:57 -05:00
Yarden Eitan
7665eba879 Revert "[Dialogs] Use test Typography scheme (#6694)"
This reverts commit 81bab4571f0c38efde43afaae3dc3b886bc2519a.
2019-02-26 11:48:35 -05:00
Yarden Eitan
8076d9fea9 Bumped version number to 78.0.1. 2019-02-26 10:24:29 -05:00
Robert Moore
81bab4571f
[Dialogs] Use test Typography scheme (#6694)
Using a test-specific Typography scheme to simplify custom scheme
creation. Removes a unit test that was testing the unit test setUp
method.
2019-02-22 11:11:12 -05:00
Robert Moore
b990250538
[Snackbar] Use test Typography scheme (#6695)
Using a test-specific Typography scheme to simplify custom scheme
creation.
2019-02-22 09:44:28 -05:00
Robert Moore
84916db436
[ButtonBar] Use test Typography scheme (#6693)
Using a test-specific Typography scheme to simplify custom scheme
creation.
2019-02-22 09:44:19 -05:00
Robert Moore
f7bbace1c0
[AppBar] Use test Typography scheme (#6692)
Using a test-specific Typography scheme to simplify custom scheme
creation.
2019-02-22 09:44:07 -05:00
Robert Moore
f1b5318d5e
[ColorScheme] Add test schemes. (#6690)
Adding test schemes useful for unit/snapshot tests where the baseline
scheme is insufficient (for example to verify bindings).
2019-02-22 09:43:42 -05:00
Yarden Eitan
7aaa270f19 Bumped version number to 78.0.0. 2019-02-20 13:57:48 -05:00
Yarden Eitan
136273636d
[Cards] [Ripple] Integrate the new ripple and states into the Cards component (#6621)
**Overview**
This PR integrates the new Ripple component and its state support into our existing Cards and CardCells components. It does so in an opt in form, where you must have MaterialComponentsBeta installed for one to have Cards use the new behavior. The PR also includes 2 examples showcasing the new behavior with MDCCard and MDCCardCollectionCell.

**Resolves**: #6463

**Acceptance Criteria:**
* The Cards have an opt in property (as ripple is in beta) to be able to activate the ripple and its states support in Cards. It will fallback to the existing (legacy) implementation by default.
* An MDC example that showcases the work for Cards.
* Interaction and animation with the card should follow the guidelines from the updated cards design doc.

**Implementation Explained**
This is a pioneer PR, trying to converge a beta component into a ready component. To do so we had to have our Card component not be aware of the existence of the beta component Ripple, but we needed the Ripple component to be able to plug in to the Card component.

To achieve this I created a few different things:
1. A ripple delegate that plugs into MDCCard and MDCCardCollectionCell that consists of methods that should be invoked in the component where the Ripple work needs to be inserted. A check for the existence of the delegate and the corresponding delegate method is checked in the Card component before invoked. This allows us to identify if Ripple should be used or not.

2. A MDCCard+Private and MDCCardCollectionCell+Private categories that expose the RippleView property in the implementation files of the Card component, and also exposing other methods that the Ripple integration needs to invoke but aren't exposed in the original Card header files.

3. An MDCCard+Ripple and MDCCardCollectionCell+Ripple categories under beta, that implement the delegate introduced in 1. and have knowledge and access to the beta component Ripple. This is where the actual implementation of the ripple integration sits.

4. Lastly, we need a way to set card.rippleDelegate = self for the +Ripple categories. However, there are a few issues in achieving this. If we create a BOOL property like `shouldIntegrateRipple`, we would need to be able to switch the state from `YES` to `NO` and back correctly. The state is very complicated when you have states, ripple vs ink, etc. Therefore the best way to do this is not to allow users to trigger a BOOL, but to have a separate initializer for `initWithRipple`. However, CardCollectionCells are reused and the dequeue method calls `initWithFrame` and we can't ask it to invoke `initWithRippleandFrame` instead. Therefore, I added performSelector logic in the init methods of the Card component that checks to see if the Cards+Ripple category is apparent (meaning Beta is integrated in the framework), and if so initializes the Ripple. Happy to find alternatives if better ones are offered.

**GIFs before and after**

Before:
![oldtop9card](https://user-images.githubusercontent.com/4066863/53095318-8501f380-34ea-11e9-8b79-328af61e0fc1.gif)

After:
![newtop9card](https://user-images.githubusercontent.com/4066863/53095334-8c290180-34ea-11e9-9767-73d74e8fefd8.gif)
2019-02-20 11:32:19 -05:00
Yarden Eitan
25ff47e248
[Shapes]! Move shapes from components/private to components/ - Part 2 (#6664)
This is the second part of the migration of moving the Shape libraries away from the private/ folder. Continuation to PR: #6495

**This is a breaking change**

Tracking bug, progress and more details can be found here: #6494

Because Shapes and ShapeLibrary have been used in production and are an integral part of the shape scheme and theming. Moreover, with to stop the confusion of clients that the library should not be imported as it is under private, we want to migrate the Shape libs to be under components/ instead of components/private.

The migration will be a 7 step migration to not break clients internally.
**We have completed steps 1 to 4, This PR concludes step 5**

1. move the folders to the new directory.
2. Make the old component's BUILD and Podspec targets depend on the new component (and nothing else).
3. Delete all implementation files from the old component.
4. Replace the contents of the old component's headers with import statements to the new component's header. If the new component has headers that match the old component's, then the new component's headers will need to be named uniquely for a period of time to allow clients to migrate over.
5. Once all clients have migrated from the old component, delete the old component. This is a breaking change.
6. If you had to create temporary header names in the new component, then in a separate release add the new headers that you want the new component to use. Move the content of the old headers into the new headers and replace the old headers with an import of the new headers. Migrate clients to the desired headers.
7. Once all clients have moved off of the old headers, delete the old headers.

Passes bazel build and pod build locally.
2019-02-20 11:31:59 -05:00
Yarden Eitan
bc281ff876
[NavigationDrawer] Expose the a11y identifier so it can be reached for testing purposes. (#6659)
Expose the a11y identifier so it can be reached for testing purposes.

Clients have asked for this to fully test the component in Earl Grey.
2019-02-20 08:34:51 -05:00
Randall Li
7b73a03e14 Merge branch 'release-candidate' into develop 2019-02-15 00:18:41 -05:00
Randall Li
85d3f991c8 Bumped version number to 77.0.0. 2019-02-13 13:38:03 -05:00
Cody Weaver
7614c80c26
[ActionSheet] Promote to Ready (#6613)
## Related links
* Component: [ActionSheet](https://github.com/material-components/material-components-ios/tree/develop/components/ActionSheet)
* Component readiness: [beta-components](https://github.com/material-components/material-components-ios/blob/develop/contributing/beta_components.md)

## Introduction
MDCActionSheet has been in the beta program [since last August](https://github.com/material-components/material-components-ios/pull/4830). I don't foresee any major API changes. 

## Motivation
This will allow clients to use MDCActionSheet through CocoaPods instead of having to clone our repo.

## Proposed solution
Update the Podspec to reflect the `MDCActionSheet` component as a _Ready_ component.
2019-02-13 12:34:35 -05:00
Ian Gordon
ac78d824a9 Bumped version number to 76.1.2. 2019-02-08 14:54:24 -05:00
Ian Gordon
fa686995c7 Bump Version 2019-02-07 13:11:55 -05:00
Ian Gordon
e650856240 Bumped version number to 76.1.0. 2019-02-06 17:49:09 -05:00
Robert Moore
388ccc3808
{CocoaPods} Format MaterialComponents.podspec (#6503)
Splitting up some of our comma-delimited arrays into explicit multi-line
arrays.

Follow-up work from #6501
2019-02-06 11:00:11 -05:00
Robert Moore
68794ae90a Bumped version number to 76.0.0. 2019-01-30 13:17:41 -05:00
Robert Moore
1b98e1ea21
[BottomNavigation] Move controller out of /beta. (#6501)
Instead of having separate `/beta` file paths for beta code, the beta files
can be excluded from CocoaPods. Also adding targets to bazel since it was trying to compile all of the source files (and failing).

Part of #4160
2019-01-29 11:33:51 -05:00
Yarden Eitan
de5d200599
[Shapes] Move shapes from components/private to components/ (#6495)
This is the first part of the migration of moving the Shape libraries away from the private/ folder.

Tracking bug, progress and more details can be found here: #6494 

"Because Shapes and ShapeLibrary have been used in production and are an integral part of the shape scheme and theming. Moreover, with to stop the confusion of clients that the library should not be imported as it is under private, we want to migrate the Shape libs to be under components/ instead of components/private.

The migration will be a 7 step migration to not break clients internally.

1. move the folders to the new directory.
2. Make the old component's BUILD and Podspec targets depend on the new component (and nothing else).
3. Delete all implementation files from the old component.
4. Replace the contents of the old component's headers with import statements to the new component's header. If the new component has headers that match the old component's, then the new component's headers will need to be named uniquely for a period of time to allow clients to migrate over.
5. Once all clients have migrated from the old component, delete the old component. This is a breaking change.
6. If you had to create temporary header names in the new component, then in a separate release add the new headers that you want the new component to use. Move the content of the old headers into the new headers and replace the old headers with an import of the new headers. Migrate clients to the desired headers.
7. Once all clients have moved off of the old headers, delete the old headers.

Passes bazel build and pod build locally.
2019-01-28 17:51:27 -05:00
Rob Moore
a7cb1d6a2e Bumped version number to 75.0.1. 2019-01-23 15:33:37 -05:00
Rob Moore
e13c926089 Bumped version number to 75.0.0. 2019-01-23 10:29:37 -05:00
Rob Moore
f843c11da4 Bumped version number to 74.0.0. 2019-01-16 13:16:29 -05:00
Yarden Eitan
c3b0246662 Merge branch 'release-candidate' into develop 2019-01-11 17:01:11 -05:00
Yarden Eitan
a622aa5a8d update changelog and version bump 2019-01-11 15:46:47 -05:00
Andrew Overton
056e4701f0
Make pod install work on Cocoapods 1.6.0.beta.2 (#5966)
# Original PR description:

On Cocoapods version 1.6.0 beta 2 we get an error on pod install because certain test targets don't have any sources to compile. This PR adds some skeleton unit test source files to get that working. Is everyone okay with these (for now) basically empty files?

Closes #5825

# FInal PR description:

The original aim of this PR was to get the project working with the Cocoapods 1.6 beta.

I initially didn't know where to begin getting it to work, so I used `pod lib lint` to get answers. `pod lib lint` had issues with the following things:

1. test_specs not having any sources to compile. This was due to our pattern of putting unit test test_specs inside of parent test_specs that didn't have anything else.

To address this I did two things. First, I moved away from the nested test_spec pattern. Now, instead of "Subspec/tests/unit_tests" it's "Subspec/UnitTests". This is more in line with the style Cocoapods uses [here](http://blog.cocoapods.org/CocoaPods-1.6.0-beta/). Secondly, I added some dummy files for things like UIMetrics and MaterialMath.

2. Importing headers across modules without using framework style imports.

I added framework style imports. This required some additional rewrite rules in the kokoro script.

3. Dependencies across subspecs being implicit.

I made them explicit by adding dependency statements to the podspecs where needed. 

`pod lib lint` didn't take issue with this, but I also saw that `MaterialComponents` was depending on `MaterialComponentsBeta` in various places. For example, all the theming extensions were in beta, but the tests for them weren't. I moved the tests to test_specs within the beta extensions. This required some directory structure changes. These changes then required some BUILD file changes. Making BUILD file changes made me realize that some swift unit tests weren't being accounted for by bazel. I took care of this too.

This PR also fixes some swift debugging stuff--"po" statements that weren't working before now do. I didn't rigorously verify this, but I also think this PR will lead to faster clean build times? It kinda seemed like it was while I was working on it.
2019-01-11 10:08:05 -05:00
Yarden Eitan
b9d3045d37 Bumped version number to 73.1.0. 2019-01-08 12:58:43 -05:00
rami-a
d442f89028
[Chips] Create theming extension for Chips (#6087)
### Context
As the team pivots to using theming within extensions we continue this work with Chips.

### The problem
We currently do not theme chips using a theming extension

### The fix
* Add theming extension for MDCChipView
* Write unit tests for new extension

In follow-up PRs, I will update the existing examples to utilize the new extension and write snapshot tests as well.

### Bug
Part of #6083
2018-12-20 16:13:09 -05:00
rami-a
5f579b09a7
Add back missing dependency for cards test spec (#6081) 2018-12-20 13:45:01 -05:00
Rob Moore
b29796f996 Release bump (again!) 2018-12-19 15:00:07 -05:00
Robert Moore
11a74d41ac Revert "[Cards] Add theming extension for Cards component (#6033)"
This reverts commit fdaf872c605cab44a4579cb8b7f0ea168c445318. The
container scheme import is missing in a Swift example.

```
material_components_ios/components/Cards/examples/EditReorderCollectionViewController.swift:38:24 use of undeclared type 'MDCContainerScheming'
  var containerScheme: MDCContainerScheming {
                       ^~~~~~~~~~~~~~~~~~~~
```
Reopens #6030
2018-12-19 14:59:14 -05:00
Robert Moore
430e37b0d1
Revert "[BottomNavigation]Adds Initial tests for MDCBottomNavigationBarController" (#6039)
Reverts material-components/material-components-ios#6012

The dependency on the `examples` directory in the `test_spec` target resulted in the removal of examples from the MaterialComponentsExamples development pod in Xcode.

![screen shot 2018-12-18 at 10 01 52 am](https://user-images.githubusercontent.com/1753199/50162384-377bc700-02ac-11e9-982d-8b2dcfa3b37f.png)
2018-12-18 10:32:23 -05:00
rami-a
fdaf872c60
[Cards] Add theming extension for Cards component (#6033)
### Context
As the team pivots to using theming within extensions we continue this work with Cards.

### The problem
We currently do not theme cards using a theming extension

### The fix
* Add theming extension for MDCCard and MDCCardCollectionCell
* Write unit tests for new extension
* Update existing examples to utilize the extension

### Bug
Closes #6030 

### Screenshots
Everything should be exactly the same visually.

| Before | After |
| - | - |
|![simulator screen shot - iphone 7 - 2018-12-17 at 13 59 52](https://user-images.githubusercontent.com/2364772/50110092-65f39680-0207-11e9-9a32-02161f7b2df4.png)|![simulator screen shot - iphone 7 - 2018-12-17 at 14 01 51](https://user-images.githubusercontent.com/2364772/50110130-7dcb1a80-0207-11e9-83d9-53bc98ad374b.png)|
2018-12-18 09:38:37 -05:00
Eric Lee
0f1a7c7fad [BottomNavigation]Adds Initial tests for MDCBottomNavigationBarController (#6012)
Some basic tests for the Bottom Navigation controller, focusing on view controller selection and indices.

Part of #4160
2018-12-18 09:26:35 -05:00
featherless
73bdc03c2b
[automated] Rename MaterialComponentsAlpha to MaterialComponentsBeta. (#6018)
This is an automated change generated by replacing all instances of MaterialComponentsAlpha with MaterialComponentsBeta. This is not a breaking change because changes to Alpha/Beta components (including renaming them) are not considered breaking.

The MaterialComponentsAlpha podspec was mistakenly named Alpha, when what we meant was more close to Beta. The distinction is that Alpha components are not expected to be used by clients, while Beta components are.
2018-12-14 10:47:31 -05:00
Yarden Eitan
23f14c67a4 Bumped version number to 72.2.0. 2018-12-11 14:03:50 -05:00
Cody Weaver
1ca10a8669
[Theming] Update our theming extensions (#5945)
### Context
All of our theming targets should be `MDC<#Component>+Theming` but all files should be `MDC<#Component>+MaterialTheming.m/h`. We got out of sync and caught this early.

### The problem
Our targets and file names weren't correct in some cases

### The fix
Update our targets and files to be what we have decided as a team.
2018-12-10 14:16:37 -05:00
Randall Li
47d4ea5e83 Merge branch 'release-candidate' into develop 2018-12-10 11:26:12 -05:00
Randall Li
eccdd7cf82 Bumped version number to 72.1.0. 2018-12-07 15:09:28 -05:00
Randall Li
ecfa760bb1 Merge branch 'release-candidate' into develop 2018-12-07 11:22:44 -05:00
Randall Li
80c32e075f Bumped version number to 72.0.1. 2018-12-07 11:07:53 -05:00
Randall Li
fe0099d65c Merge branch 'release-candidate' into develop 2018-12-06 16:36:03 -05:00
Randall Li
2a334c409a Bumped version number to 72.0.0. 2018-12-06 11:19:10 -05:00
Cody Weaver
e2b2240618 [NavigationDrawer] Fix jump when perferredContentSize changes (#5928)
### Context
Currently `MDCBottomDrawerViewController` _jumps_ if the preferredContentSize changes. A client is asking for this _jump_ to not happen but instead the drawer will look the same but have more content. 

#### Conditional checks

1. The check to see if `_contentVCPreferredContentSizeHeightCached` is zero is because on initial layout this value is 0 until we call `cacheLayoutCalculations` which sets this value. 
2. The check to see if `percentageFullScreen > 0.5` is there to make sure we never have an initial drawer factor more than design has specified.

### The problem
`MDCBottomDrawerViewController` _jumps_ if the preferredContentSize changes

### The fix
Set initialDrawerFactor to a custom value so that change doesn't cause a jump.

### Videos
| Before | After |
| - | - |
|![before](https://user-images.githubusercontent.com/7131294/49542847-a0267500-f8a4-11e8-90c9-e5304e5da9a2.gif)|![after](https://user-images.githubusercontent.com/7131294/49542855-a4eb2900-f8a4-11e8-9db3-3b163dbe5e9b.gif)|
2018-12-05 21:26:09 -05:00
Andrew Overton
68ea954882
[Dialogs] Add dialog category for theming (#5905)
* Add dialog category for theming

* Address PR feedback
2018-12-05 16:02:39 -05:00
Cody Weaver
f8d595ef04
[NavigationDrawer] Fix jump when perferredContentSize changes (#5928)
### Context
Currently `MDCBottomDrawerViewController` _jumps_ if the preferredContentSize changes. A client is asking for this _jump_ to not happen but instead the drawer will look the same but have more content. 

#### Conditional checks

1. The check to see if `_contentVCPreferredContentSizeHeightCached` is zero is because on initial layout this value is 0 until we call `cacheLayoutCalculations` which sets this value. 
2. The check to see if `percentageFullScreen > 0.5` is there to make sure we never have an initial drawer factor more than design has specified.

### The problem
`MDCBottomDrawerViewController` _jumps_ if the preferredContentSize changes

### The fix
Set initialDrawerFactor to a custom value so that change doesn't cause a jump.

### Videos
| Before | After |
| - | - |
|![before](https://user-images.githubusercontent.com/7131294/49542847-a0267500-f8a4-11e8-90c9-e5304e5da9a2.gif)|![after](https://user-images.githubusercontent.com/7131294/49542855-a4eb2900-f8a4-11e8-9db3-3b163dbe5e9b.gif)|
2018-12-05 15:49:44 -05:00