527 Commits

Author SHA1 Message Date
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
featherless
8806821243
[ButtonBar] Add a Theming extension. (#5843)
This change makes use of MDCContainerScheme to provide a single theming-related API for ButtonBar.

Includes example updates unit tests.

This change is the first in a series of changes that will be required to add Theming extension support to AppBar:

- [x] ButtonBar
- [ ] NavigationBar
- [ ] HeaderStackView
- [ ] FlexibleHeader
- [ ] AppBar
2018-12-04 09:40:12 -05:00
Robert Moore
13781e6d45
[Catalog] Revert "Snapshot Testing Proof of Concept" (#5883)
Reverts material-components/material-components-ios#5754

Travis CI on `develop` branch testing has failed since snapshot testing was introduced. Rolling it back.

https://travis-ci.org/material-components/material-components-ios/builds
2018-11-30 09:20:03 -05:00
rami-a
c6a300ff2c
Snapshot Testing Proof of Concept (#5754)
### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.

### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components. 
* Integrate `git-lfs` to handle storage of the goldens.

This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`

Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.

### Related bugs
Closes #5740
2018-11-29 15:56:06 -05:00
Jeff Verkoeyen
7396e76419 Merge branch 'release-candidate' into develop 2018-11-29 13:16:47 -05:00
Cody Weaver
4f0786a2bf
[Buttons] Add themer for contained buttons with container scheme (#5849)
### Context
As the team pivots to using theming within extensions we have started off with buttons as a test run. This will be part fo the work with buttons only addressing the contained button type. This adds a new method to MDCButton - `applyContainedThemeWithScheme:(id<MDCContainerScheming>)scheme`

### The problem
We currently do not theme buttons the way the team has decided to theme them

### The fix
This themes Contained buttons with the new style we have all agreed on.

### Remaining Work
Theming for Text and Outlined buttons in this new style.
2018-11-28 18:11:11 -05:00
Jeff Verkoeyen
5f370a5096 Bump the version. 2018-11-28 10:45:52 -05:00
Jeff Verkoeyen
9b89e9be2f Bump the release. 2018-11-20 11:42:35 -05:00
Jeff Verkoeyen
c685a4f813 Merge branch 'release-candidate' into develop 2018-11-16 17:37:44 -05:00
Jeff Verkoeyen
9feca30fb8 Bump the release. 2018-11-16 17:32:22 -05:00
Andrew Overton
21dfce7f5f
[PageControl] Add respectsUserInterfaceLayoutDirection to MDCPageControl (#5711)
### The problem

The MDCPageControl has never respected user interface layout direction.

### The solution

Make the MDCPageControl capable of respecting user interface layout direction through the addition of a `respectsUserInterfaceLayoutDirection` property.

Here is a gif of the new RTL behavior, with `respectsUserInterfaceLayoutDirection` set to `YES`:
![after_rtl_2](https://user-images.githubusercontent.com/8020010/48214767-a7fb0400-e34e-11e8-902a-2585c1d5111f.gif)

Here is a gif of the preexisting LTR behavior, with `respectsUserInterfaceLayoutDirection` set to `NO`:
![after_ltr_2](https://user-images.githubusercontent.com/8020010/48214766-a7fb0400-e34e-11e8-974a-b202f600dbc9.gif)

Note that this PR also updates the PageControl typical use example to use this new API.

Closes #5608.
2018-11-14 09:50:54 -05:00
Yarden Eitan
43a996674a
[NavigationDrawer] Added a top handle to the drawer (#5591)
**Context:**
The Navigation Drawer should have an affordance to show scrollability in a shape of a top handle.

**The Problem:**
Currently we have no top handle in our drawer to show scrollability.

**The Fix:**
In this PR we are adding a top handle to our drawer. the top handle is hidden by default. when the top handle isn't hidden, it is visible when there is more scrolling to perform for the drawer, and then it fades away as the drawer reaches its full height, or when it goes to full screen.

**Testing:**
Unit Tests + Tested on an iPhone X and iPhone 7 on all examples, portrait and landscape.

**Related Bugs:**
Closes #5515 

**Screenshot**
![simulator screen shot - iphone x - 2018-11-05 at 14 22 10](https://user-images.githubusercontent.com/4066863/47997942-3e88b480-e106-11e8-9968-1e77f49014a5.png)

**Video of transition**
![2018-11-05 14-23-41 2018-11-05 14_24_27](https://user-images.githubusercontent.com/4066863/47998041-8dcee500-e106-11e8-8c64-552a149c2c7a.gif)
2018-11-07 23:30:56 +02:00
Yarden Eitan
aef137cbe9 Bumped version number to 68.2.0. 2018-11-07 17:21:17 +02:00
Yarden Eitan
0408eb62dc Bumped version number to 68.1.0. 2018-10-31 12:12:58 +02:00
Jeff Verkoeyen
b10ea77f84 Bump the version. 2018-10-24 11:03:54 -04:00
Jeff Verkoeyen
30fe5bb319 Merge branch 'release-candidate' into develop 2018-10-23 09:29:34 -04:00
Yarden Eitan
5dafdbaa86
graduate navigation drawer from Beta to Ready (#5470)
This PR is the last step in graduating the Navigation Drawer component from Beta to Ready.

We have resolved all the outstanding issues in the Navigation Drawer Project here: https://github.com/material-components/material-components-ios/projects/85 and hotlist: 1230549 .
The only outstanding issue is the unit tests ( #5466 , #5465 ) which were approved and are pending due to GitHub issues causing CI not to run.

We are essentially migrating here the NavigationDrawer component from the MaterialComponentsAlpha podspec to the MaterialComponents podspec so it can be used publicly using the normal means of installing our Pod.

This PR is blocked and can land once #5466 and #5465 land.

Closes #5333
2018-10-23 01:26:46 -04:00
Jeff Verkoeyen
21eb446963 Bump the version to 67.2.0. 2018-10-22 16:27:46 -04:00
Galia Kaufman
325772ba5e [Dialogs] Theming action buttons in DialogThemer (#5416)
Adding semantic emphasis to Dialog actions which allows conditional theming of buttons. The MDCDailogScheme now has a button scheme which can be used to theme buttons according to their action's assigned emphasis.
Issue: b/117608629
Design Review document (go/gmdc-ios-dialogs-design-doc).
2018-10-22 16:12:52 -04:00
Galia Kaufman
d55d7ab9f2
[Dialogs] Theming action buttons in DialogThemer (#5416)
Adding semantic emphasis to Dialog actions which allows conditional theming of buttons. The MDCDailogScheme now has a button scheme which can be used to theme buttons according to their action's assigned emphasis.
Issue: b/117608629
Design Review document (go/gmdc-ios-dialogs-design-doc).
2018-10-22 12:31:03 -04:00
Yarden Eitan
312dc31ee1 Bumped version number to 67.1.0. 2018-10-17 10:23:49 -04:00
Ian Gordon
379383a74f Bumped version number to 67.0.0 2018-10-11 12:28:38 -04:00
Andrew Overton
395825465a
[List] Add global themer for List component (#5378)
Closes #5375

Adds a global themer for Lists. The relevant subsystems are typography and color.
2018-10-10 10:22:42 -04:00
Ian Gordon
1863cf6882 Merge branch 'release-candidate' into develop 2018-10-04 13:56:04 -04:00
Ian Gordon
8185409c69 Bumped version number to 66.0.0. 2018-10-04 13:43:15 -04:00
Andrew Overton
0aabda44b3
Add MDCSelfSizingStereoCellColorThemer (#5311)
Add ColorThemer to MDCSelfSizingStereoCell. Closes #5303.
2018-10-03 15:16:41 -04:00
Andrew Overton
0fb7ec9712
[List] Add TypographyThemer to MDCSelfSizingStereoCell (#5298)
* Add TypographyThemer to MDCSelfSizingStereoCell

* Appease clang format

* Update BUILD file

* Fix copy/paste typo
2018-10-03 11:36:38 -04:00
Randall Li
b3f8d43f44 Bumped version number to 65.0.0. 2018-09-26 14:24:19 -04:00