477 Commits

Author SHA1 Message Date
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
featherless
66b8a7edfe
Revert "[FlexibleHeader] Add new canAlwaysExpandToMaximumHeight behavior. (#4794)" (#4976)
This reverts commit 2b3722f7b8cc7df131a8b33695990c99931c0e1b.
2018-08-30 17:28:20 -04:00
Yarden Eitan
0ea7bf01ee Revert "[FlexibleHeader] Add new canAlwaysExpandToMaximumHeight behavior. (#4794)"
This reverts commit 2b3722f7b8cc7df131a8b33695990c99931c0e1b.
2018-08-30 15:37:15 -04:00
Randall Li
61c7863874 Bumped version number to 61.0.0. 2018-08-29 23:55:55 -04:00
Jeff Verkoeyen
2435bca478 Merge branch 'release-candidate' into develop 2018-08-27 12:21:55 -04:00
Jeff Verkoeyen
ce0fda4bba Bump the release. 2018-08-27 12:08:47 -04:00
featherless
bc6dfc007f
[ButtonBar] Add support for pure Swift class button invocations. (#4878)
Repro case:

Add the following code to a view controller with an App Bar:

```swift
class SomeObject {
  @objc func someEvent() {

  }
}

let object = SomeObject()

self.navigationItem.rightBarButtonItem =
  UIBarButtonItem(title: "Right", style: .done, target: object, action: #selector(SomeObject.someEvent))
```

Tap the button.

Expected behavior: the someEvent method is invoked.
Actual behavior: crash due to unrecognized selector `methodSignatureForSelector:`.

After this change the behavior works as expected, with the caveat being that we are not able to pass the button instance along as a third argument to pure Swift classes. The implication of this is that pure Swift classes will not be able to present popovers from the provided item instance. Supporting this case will require turning the pure Swift class into an Objective-C compatible class.

Closes https://github.com/material-components/material-components-ios/issues/2981
2018-08-24 10:51:40 -04:00
featherless
2b3722f7b8
[FlexibleHeader] Add new canAlwaysExpandToMaximumHeight behavior. (#4794)
### Release notes

`canAlwaysExpandToMaximumHeight` is a new behavior on the Flexible Header component that is available through an extension target, `FlexibleHeader+CanAlwaysExpandToMaximumHeight`.

Enabling this behavior on a flexible header instance will allow the flexible header to expand to its maximum height even when the flexible header is floating in front of its content.

---

We intend to keep usage of this API fairly restricted internally, so we have added the behavior as a separate target that we'll whitelist internally to clients. The API is still supported by the typical API contract for public clients.

The behavior is implemented using the same shift accumulator logic that enables header shifting. When the accumulator is positive, we're shifting off-screen. When the accumulator is negative, we're expanding the height of the flexible header.

Closes https://github.com/material-components/material-components-ios/issues/4393
2018-08-23 15:50:37 -04:00
Randall Li
a4f39d2c06 Bumped version number to 60.2.0. 2018-08-23 10:01:58 -04:00
Ian Gordon
6d9ca262df Bumped version number to 60.1.0. 2018-08-16 16:00:32 -04:00
Jeff Verkoeyen
fc09a8cf65 Bump the release. 2018-08-10 09:44:09 -04:00
Cody Weaver
84d5dfbb83
[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)
Remove all instances of MDCFlatButton within [Dialogs] component
Replace with MDCTextButtonThemer and MDCButton

MDCFlatButton is the old API and MDCTextButtonThemer/MDCButton are the modern APIs.


Closes #3914
2018-08-09 11:15:08 -04:00
Jeff Verkoeyen
31e5ab6356 Bump the release. 2018-08-09 09:07:48 -04:00
Jeff Verkoeyen
60224db573 Bump the release. 2018-08-08 17:19:03 -04:00
Jeff Verkoeyen
27901024aa Bump the release. 2018-08-08 11:23:09 -04:00
featherless
c1db980630
[Snackbar] Ensure that the bundle is loaded with CocoaPods. (#4702)
The bundle includes the snackbar "double-tap to dismiss" accessibility hint string.

Closes https://github.com/material-components/material-components-ios/issues/4685
2018-08-03 14:09:18 -04:00
Jeff Verkoeyen
e3cf9801be Bump the release. 2018-08-02 16:36:42 -04:00
Jeff Verkoeyen
85334ead24 Version bump. 2018-08-01 10:55:52 -04:00
Jeff Verkoeyen
e98a774e52 Bump the release. 2018-07-25 10:19:54 -04:00
Jeff Verkoeyen
ef9b71945a Bump the release. 2018-07-18 10:47:40 -04:00
Yarden Eitan
1db11dea41 Bumped version number to 57.0.0. 2018-07-11 17:02:23 -04:00
Andrew Overton
4b6eb9430c
[ListItems] Add Base Cell With Example (#4461)
This PR adds the MDCBaseCell with an accompanying example and readme.
2018-07-10 15:48:25 +02:00
Yarden Eitan
61e65488af
[BottomSheet] [Shapes] Added Shapes support for BottomSheet (#4486)
Added support for shaping a bottom sheet in multiple states.
A bottom sheet can either be collapsed (partially visible but not full screen) and expanded (sheet covering the whole screen). We wanted to allow support for shaping a sheet differently for each of its states.

Therefore the bottom sheet state was exposed rather than hidden and an API was defined to allow changing the shape for each state.
2018-07-09 17:32:24 -04:00
Randall Li
75605b60c5 Merge branch 'release-candidate' into develop 2018-06-27 08:14:18 -04:00
Will Larche
53876c3dca
[Typography] 3rd PR on font equality (#4435)
* [TextFields] Adding todos for #4331

* [TextFields] Creating simple equality files.

* [TextFields] Prevents fonts that are almost the same but not quite from messing up the rendering.

* [Typography] Adding tests for font equality.

* [TextFields] Formatting.

* [Typography] Adding Math to the bazel file.

* [Typography] PR feedback.

* [Typography] PR feedback.

* [Typography] Comment.

* [Typography] PR feedback.

* [Typography] PR feedback.

* [Typography] Updating podspec.

* [Typography] Asserts for bazel.

* [Typography] Logging for tests.

* [Typography] Loggin.g

* [Typography] Removing logging and the deeper check.

* [Typography] Making simple equality a category.

* [TextFields] Using new method.
2018-06-26 11:45:13 -07:00
Randall Li
0ace5e665c Bumped version number to 56.0.0. 2018-06-26 09:15:40 -04:00
Ian Gordon
02f792aad1 Bumped version number to 55.5.0. 2018-06-21 11:47:53 -04:00
Yarden Eitan
c3c738f6b0 Bumped version number to 55.4.0. 2018-06-08 10:09:38 -04:00