954 Commits

Author SHA1 Message Date
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
featherless
d238c86d47
[CocoaPods] Remove our tests podspec in favor of official test_spec targets. (#5204)
See docs for test_spec here: https://blog.cocoapods.org/CocoaPods-1.3.0/

test_spec is an official CocoaPods mechanism for associating tests with a component. tests_spec has several advantages over our prior "tests as a podspec" hack:

- We can finally run individual tests from Xcode's inline green "test" button that shows up alongside each test in the editor.
- Tests can import private header files from components from .h files in the test target (because tests are no longer treated as frameworks). We were not previously able to do this, making it impossible to create .h/.m files that were shared across multiple test .m files.
- We no longer need MDCUnitTests - everything lives in the MDCCatalog target.
- The tests/ folder now appears as a sub-group for each component in the MaterialComponents development pod group. This will have a big impact on day-to-day workflow. Previously our tests lived in a sibling group to our components, making it somewhat difficult to navigate back-and-forth in Xcode.
- pod lib lint is now able to run our unit tests.
- Our tests can now explicitly declare their dependencies.

Some caveats:

- Each component now needs a test_spec subspec definition. This is a minor detail and one that doesn't add much extra work when creating a new component (we continue to just copy the existing templates).
- When adding a new test_spec, we also need to add the test_spec to our MDCCatalog Podfile under the `:testspecs` list. This is a bit annoying, but only happens when new components are created (very infrequent). This is a good case of the cost here being outweighed by the benefits above (which affect our daily workflow).

## Screenshot

<img width="405" alt="screen shot 2018-09-22 at 9 40 17 pm" src="https://user-images.githubusercontent.com/45670/45920647-33f4c180-beb0-11e8-94bc-88f3450c9e0a.png">
2018-09-24 21:54:54 +03:00
Randall Li
d0536a4bf9 Revert "[MDCItemBar] Fix an issue where the protocol method itemBar:shouldSelectItem: does not behave correctly (#5071)"
This reverts commit 255541a4e5009daf57113fc7fcdac7d3aac4fe08 and f4b8ed3e20de0f543e5da0d7d51d3a23a3d7b775
2018-09-21 14:15:36 -04:00
Randall Li
30a3d9ce4b Bumped version number to 64.0.0. 2018-09-20 13:32:42 -04:00
Galia Kaufman
faea5d127b
[Dialogs] Add a dialog themer
A new Alert Themer which is used to apply an Alert Scheme to an Alert Controller.
2018-09-18 10:46:16 -04:00
ianegordon
255541a4e5
[ShadowLayer] Mark shadowPath invalid on cornerRadius change (#4921) 2018-09-17 16:28:53 -04:00
Yarden Eitan
b27c6f5654
[Buttons]! Integrate the shape themer into the MDCButton themer (#5120)
This PR is a follow up and has the code of #5119 

Here we are adding the shape themer into the MDCButton themer.
2018-09-14 13:20:34 -04:00
Yarden Eitan
d884aeccf1
[Buttons] Addition of a Shape Themer for MDCButton (#5119)
This resolves #5056   .

In this PR I am adding an MDCButton shape themer along with unit tests.
2018-09-13 18:02:47 -04:00
Yarden Eitan
67ddf9b6ca
[Chips]! Integrate the shape themer into the chip themer (#5112)
This PR is a follow up and had the code of #5111 

Here we are adding the shape themer into the chip themer.
2018-09-13 13:52:57 -04:00
Yarden Eitan
9faa1295b8
[Chips] Addition of a Shape Themer (#5111)
This resolves #5053 .

In this PR I am adding a Chip shape themer along with unit tests.
2018-09-13 12:53:03 -04:00
Jeff Verkoeyen
ff51dd49d9 Bump the release. 2018-09-12 09:16:42 -04:00
Yarden Eitan
3dc5721da3
[BottomSheet] Addition of a Bottom Sheet Shape Themer (#5062)
In this PR I am adding a Bottom Sheet shape themer along with unit tests.

This closes issue #5057
2018-09-07 19:02:00 -04:00
Jeff Verkoeyen
4ed9fd09ce Merge branch 'release-candidate' into develop 2018-09-07 16:42:21 -04:00
Jeff Verkoeyen
95e62040dd Bump to minor. 2018-09-07 16:36:09 -04:00
Jeff Verkoeyen
a1daebd783 Bump the release. 2018-09-07 12:58:22 -04:00
Cody Weaver
93c73b9052 Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)" (#5040)
Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)"

This reverts commit 84d5dfbb83d0118ff26921318df8cc549d919809.

This commit resulted in undesired behavior for a client, this change reverts to the old desired behavior.
2018-09-07 12:56:11 -04:00
Cody Weaver
1e51e97249
Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)" (#5040)
Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)"

This reverts commit 84d5dfbb83d0118ff26921318df8cc549d919809.

This commit resulted in undesired behavior for a client, this change reverts to the old desired behavior.
2018-09-07 12:46:13 -04:00
Yarden Eitan
c036e22a7d
[Cards]! Add a card shape themer (#5031)
Added a card shape themer to our cards component. This includes adding a shape themer, and adding that to the card themer logic to apply the shape themer as well. Also added unit tests.

This PR is blocked on PR #5030
2018-09-07 11:01:21 -04:00
Yarden Eitan
97b830a1e3
[Shapes] Initial Shape Scheme implementation (#5014)
This PR implements the initial Shape Scheme that is essential for allowing shape theming for components (*this doesn't include any themers and that will be included as a separate PR once this is approved*). More information can be seen in go/mdc-ios-shape-theming and go/material-shapes-eng

This closes #4609 #4612 #4613
2018-09-06 13:35:05 -04:00
Jeff Verkoeyen
944be857d4 Bump the release. 2018-09-05 09:22:16 -04:00
Jeff Verkoeyen
1d2845b582 Merge branch 'release-candidate' into develop 2018-09-05 08:58:53 -04:00
Andrew Overton
cf09971831
[List] Add Self Sizing Stereo Cell (#4953)
* Four prototypes: (#4382)

Two have manual layout and two have auto layout.
Two have configurable supporting views, two don't.

* Manual Layout prototype 3

* Fix project by adding initial List Item Cell Demo

* Add other List Item example

* Make view properties readonly and make cellWidth private

* Make cellWidth public again and make more efficient

* Rename MDCListItemCell to MDCBasicStereoCell

* Rename to MDCSelfSizingStereoCell

* Small nits

* Set cellWidth in preferredLayoutAttributes

* Some Jeff feedback

* Extract layout code

* Delete all the prototypes from forever ago

* Fix copyright messages

* Get rid of __IPHONE_11_0 checks

* PR feedback

* Move layout to its own file

* Add dependencies

* Tweak documentation

* Fix copyright stanzas

* Clang format

* Move numberOfLines logic to cell
2018-09-04 11:34:56 -04:00
featherless
3b34e97f5b
[FlexibleHeader] Add new canAlwaysExpandToMaximumHeight behavior. (#4978)
This rolls forward #4794 which was rolled back in v62.0.0.

All runtime logic introduced by #4794 has bee gated behind the new behavioral flag in an effort to maintain existing functionality.

Closes https://github.com/material-components/material-components-ios/issues/4393
2018-08-31 14:11:14 -04:00
Yarden Eitan
c959322480 bumped version number to 62.0.0 2018-08-30 18:11:49 -04:00