221 Commits

Author SHA1 Message Date
Robert Moore
675235ed05
{Tests} Deallocate test objects at the end of tests. (#5397)
Deallocating many of the properties created for each unit test. Since all
XCTestCase instances survive until the end of the test suite, any properties
created for a test will be preserved as well. This frees up around 3.7 MB
(~6%) of memory from the entire test suite, as measured on my desktop.

|Before|After|
|----|----|
|![test-objcs-before](https://user-images.githubusercontent.com/1753199/46813473-c3b9bd00-cd44-11e8-990c-28dff4ab5ad2.png)|![test-objcs-after](https://user-images.githubusercontent.com/1753199/46813481-c7e5da80-cd44-11e8-90e4-2e6d532ebbfb.png)|

See also: https://qualitycoding.org/xctestcase-teardown/

Closes #5395
2018-10-12 08:33:58 -04:00
featherless
32fe4e191a
[NavigationBar] Update layout when button bar sizes change. (#4992)
Prior to this change, changing the title of a button would often result in the button's label being clipped because the navigation bar was not updating its button bar frames when needed.

After this change, the navigation bar makes use of 471936b842e7473e51b5dc02df619a7e67a0c5b2 to react to changes in the intrinsic content size of the button bar.

## Before

| Before changing title | After changing title |
|:----------|:------------|
| ![simulator screen shot - iphone x - 2018-08-31 at 16 20 30](https://user-images.githubusercontent.com/45670/44934442-d51dab80-ad3a-11e8-9313-056e135de150.png) | ![simulator screen shot - iphone x - 2018-09-07 at 09 29 39](https://user-images.githubusercontent.com/45670/45221807-9d55bd00-b280-11e8-92c4-07e0bc409d64.png) |

## After

| Before changing title | After changing title |
|:----------|:------------|
| ![simulator screen shot - iphone x - 2018-08-31 at 16 20 30](https://user-images.githubusercontent.com/45670/44934442-d51dab80-ad3a-11e8-9313-056e135de150.png) | ![simulator screen shot - iphone x - 2018-08-31 at 16 20 32](https://user-images.githubusercontent.com/45670/44934447-d64ed880-ad3a-11e8-9c67-67e50995fce0.png) |

Closes https://github.com/material-components/material-components-ios/issues/1717
2018-09-10 16:17:23 -04:00
Robert Moore
ed819a8304
[NavigationBar] Tint leading, trailing button bars. (#5064)
To prepare for tinting the leading and trailing button bar items in the
Bottom App Bar, the MDCNavigationBar should support an API that allows
separate tint colors for the leading and trailing button bar items.

**Extreme Example**

<img width="374" alt="screen shot 2018-09-07 at 11 23 02 pm" src="https://user-images.githubusercontent.com/1753199/45249812-024afa80-b2f5-11e8-920b-c32dccd8d3a5.png">

Part of #3928
2018-09-08 23:24:02 -04:00
featherless
d5c064fdff
[automated] Fix more copyright stanzas. (#4990)
Our creativity knows no bounds.

### Find

```
/\*
 *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 *
 *Licensed under the Apache License,? Version 2\.0 \(the "License"\);
 *you may not use this file except in compliance with the License\.
 *You may obtain a copy of the License at
 *
 *http://www\.apache\.org/licenses/LICENSE-2\.0
 *
 *Unless required by applicable law or agreed to in writing,? software
 *distributed under the License is distributed on an "AS IS" BASIS,?
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,? either express or implied\.
 *See the License for the specific language governing permissions and
 *limitations under the License\.
 *\*/
```

```
/\*
 *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 *Licensed under the Apache License, Version 2\.0 \(the "License"\);
 *you may not use this file except in compliance with the License\.
 *You may obtain a copy of the License at
 *http://www\.apache\.org/licenses/LICENSE-2\.0
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 *See the License for the specific language governing permissions and
 *limitations under the License\.
 *\*/
```

```
/\*

 *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 *
 *Licensed under the Apache License, Version 2\.0 \(the "License"\);
 *you may not use this file except in compliance with the License\.
 *You may obtain a copy of the License at
 *
 *http://www\.apache\.org/licenses/LICENSE-2\.0
 *
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 *See the License for the specific language governing permissions and
 *limitations under the License\.

 *\*/
```

```
/\*
 *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 *
 *Licensed under the Apache License, Version 2\.0 \(the "License"\);
 *you may not use this file except in compliance with the License\.
 *You may obtain a copy of the License at
 *
 *http://www\.apache\.org/licenses/LICENSE-2\.0
 *
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 *See the License for the specific language governing permissions and
 *limitations under the License\.
 *\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 +Licensed under the Apache License, Version 2\.0 \(the "License"\);
 +you may not use this file except in compliance with the License\.
 +You may obtain a copy of the License at

 +http://www\.apache\.org/licenses/LICENSE-2\.0

 +Unless required by applicable law or agreed to in writing, software
 +distributed under the License is distributed on an "AS IS" BASIS,
 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 +See the License for the specific language governing permissions and
 +limitations under the License\. *\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 +Licensed under the Apache License, Version 2\.0 \(the "License"\);
 +you may not use this file except in compliance with the License\.
 +You may obtain a copy of the License at

 +http://www\.apache\.org/licenses/LICENSE-2\.0

 +Unless required by applicable law or agreed to in writing, software
 +distributed under the License is distributed on an "AS IS" BASIS,
 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 +See the License for the specific language governing permissions and
 +limitations under the License\.
 *\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\)
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

### Replace

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 16:09:12 -04:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
Jeff Verkoeyen
9854044c96 Revert "[automated] Standardize our open source license stanza to what Xcode generates. (#4982)"
This reverts commit b45bc2fdd4dfe12fc76751a45c9cf7b0d6c1261f.
2018-08-31 12:01:24 -04:00
featherless
b45bc2fdd4
[automated] Standardize our open source license stanza to what Xcode generates. (#4982)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on https://github.com/material-components/material-components-ios/pull/4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

### Find

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

### Replace

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 11:49:00 -04:00
Yarden Eitan
3480c50c67
updated to newest CbC standard (#4956)
Move to the new CbC standard released in CatalogByConvention v2.5.0. See PR: material-foundation/cocoapods-catalog-by-convention#27 for more info on the change.
2018-08-29 20:45:13 -04:00
featherless
059cbfaebb
[NavigationBar] Add uppercasesButtonTitles API for modifying title casing behavior. (#4936)
This allows an owner of a navigation bar to configure the title casing behavior for both the leading and trailing button bars.

Closes https://github.com/material-components/material-components-ios/issues/2968
2018-08-29 10:22:05 -04:00
featherless
bbe4a23fe0
Remove all __IPHONE_11_0 checks now that we no longer support Xcode 8. (#4915)
We can now make use of @available throughout our codebase.

We support Xcode 9 and up, which includes the iOS 11 SDK. This means we can remove any guards for SDKs prior to iOS 11.

This was cleaned up by running a global find-and-replace with the following regular expression:

```
Find:#if defined\(__IPHONE_11_0\) && \(__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\)\n(.+if \(@available\(iOS 11.0, \*\)\) \{(?:.|\n)*?)(?:#else(?:.|\n)*?)?\n#endif
Replace:$1
```

With some additional cleanup for stragglers that didn't match this pattern. Note that else clauses were intentionally dropped.

Closes https://github.com/material-components/material-components-ios/issues/4909
2018-08-28 09:57:30 -04:00
featherless
56e8c4fd27
[NavigationBar] Add a flag that makes it possible to set any font size. (#4879)
This new flag allows a client to remove the 20pt font size restriction on MDCNavigationBar. This restriction was somewhat arbitrary and could cause problems with accessibility for certain font families.

Prior to this change, any font set on MDCNavigationBar would be restricted to 20pt size.

After this change, if the allowAnyTitleFontSize property is enabled on an MDCNavigationBar instance, then the font will be used directly and no sizes will be enforced.

This is required to support internal needs to set a navigation bar title font size of 18.
2018-08-24 13:36:28 -04:00
Randall Li
555bc1938e Merge branch 'release-candidate' into develop 2018-08-23 12:59:14 -04:00
featherless
e89ece3bb8
[ButtonBar|NavigationBar] Remove custom iPad heights. (#4874)
Historically we had given navigation bars different heights on iPads. We no longer intent to make this distinction.

This change also fixes a bug related to this difference in behavior on iPads. The repro case for this bug is:

- Launch MDCDragons on an iPad Pro running 10.3.1.
- Open the App Bar typical use example.
- Scroll the content down somewhat.

Expected behavior: the navigation bar does not change its height or shift.
Actual behavior: the navigation bar shifts slightly as the scroll view is scrolled.

After this change, the navigation bar's height will always default to the same fixed height on all devices. This reflects the fact that Flexible Header's default minimumHeight and maximumHeight values are constant across all devices.

Closes https://github.com/material-components/material-components-ios/issues/4840
2018-08-23 09:48:10 -04:00
Randall Li
5df5229171 Revert "[NavigationBar] Remove restriction for 20pt fonts. (#4851)"
This reverts commit 2c3f97a98f20645d780aa1b3bccd78646f224059.
2018-08-22 12:45:25 -04:00
featherless
2c3f97a98f
[NavigationBar] Remove restriction for 20pt fonts. (#4851)
This restriction is somewhat arbitrary and could cause problems with accessibility for certain font families.

Prior to this change, any font set on MDCNavigationBar would be restricted to 20pt size.

After this change, the font will be used directly and no sizes will be enforced.

This is required to support internal needs to set a navigation bar title font size of 18.
2018-08-21 09:29:20 -04:00
Robert Moore
8aeb618d1a
{Swift} Fix remaining imports (#4792)
A few straggling imports were missing when building internally.
2018-08-14 16:44:21 -04:00
Robert Moore
175942d9e0
[Catalog] Fix Swift example imports (#4780)
Many of our Swift examples are either missing imports or are importing all of
MaterialComponents. Both of these will cause failures during internal builds.
2018-08-14 13:26:37 -04:00
Cody Weaver
e018f4ab40
[NavigationBar] Update swift example to not depend on objc (#4784)
Update the example to not depend on the objective-c examples


Partially closes #4781
2018-08-14 13:04:32 -04:00
featherless
e14b90e829
[schemes/Color] Formally mark all to-be-deprecated APIs as "ToBeDeprecated". (#4738)
This change further formalizes our pattern of annotating APIs that will be or are deprecated using class categories. Moving an API into such a category has the benefit of being picked up by the API diff toolchain and elevated into our release notes as a result.
2018-08-09 16:39:56 -04:00
Jeff Verkoeyen
4a9df7c8cb [automated] Regenerate all readmes. 2018-08-09 16:36:23 -04:00
ianegordon
e3e6dd39e2
[NavigationBar] ButtonBar example with associated UIButton (#4677)
Demonstrate a button bar item action selector that takes the source UIButton as a parameter.
2018-08-01 10:51:14 -04:00
Ali Rabbani
4438b441b2 Mainline the YES behaviour for useFlexibleTopBottomInsets, and remove the already deprecated API. (#4570)
Mainline the YES behavior for useFlexibleTopBottomInsets, and remove the already deprecated API.

Closes https://github.com/material-components/material-components-ios/issues/3924
2018-07-16 13:29:51 -04:00
featherless
de0d57e8e3
[NavigationBar] Remove NSCoding support. (#4560)
Closes https://github.com/material-components/material-components-ios/issues/3944
2018-07-16 08:33:49 -04:00
featherless
c7ee146de2
[NavigationBar] Add a titleViewLayoutBehavior API. (#4371)
This property allows a client to configure the title view layout behavior to be one of either "fill" or "center". The fill behavior is the default and existing behavior, which sets the title view's frame to fill the available navigation bar space. The center behavior will always attempt to center the title view within the navigation bar's bounds.

The center behavior is desired by teams in the simple cases of when they want their title view to be centered within the navigation bar as best as possible. This is also the default behavior of UINavigationBar.

Closes https://github.com/material-components/material-components-ios/issues/1650

### Screenshots

"Fill" behavior:

![simulator screen shot - iphone se - 2018-06-06 at 09 13 03](https://user-images.githubusercontent.com/45670/41040247-d71e762c-6969-11e8-8584-f86c0c6fe514.png)

"Center" behavior:

![simulator screen shot - iphone se - 2018-06-06 at 09 11 53](https://user-images.githubusercontent.com/45670/41040226-cb1bc244-6969-11e8-815b-145e2e40b98b.png)

"Center" behavior in RTL languages:

![simulator screen shot - iphone se - 2018-06-06 at 10 39 37](https://user-images.githubusercontent.com/45670/41045233-f9fc3948-6975-11e8-9e9d-48ca5ed7342c.png)
2018-06-06 13:32:57 -04:00
Ali Rabbani
b9086c94c4 [NavigationBar] Deprecate useFlexibleTopBottomInsets (#4358)
Deprecate useFlexibleTopBottomInsets and change the default behavior to YES.
2018-06-06 09:47:53 -04:00
featherless
e1e6d249a4
[Docs] Add badges to all components. (#4278)
As part of our readme generator, components can now opt in to displaying badges in their readme.

The badges are generated from https://shields.io/ and are focused on an individual component. We're currently generating the following badges:

- Open bug count.
2018-05-25 11:12:48 -04:00
John Detloff
0c0ce4248e
Initialize default color and typography schemes in examples (#4200)
Ensure a default colorScheme and typographyScheme is initialized for examples.
2018-05-21 12:44:43 -04:00
Jeff Verkoeyen
ead0ae4936 Fix ordering of header stack view and navigation bar intro text. 2018-05-03 16:49:17 -04:00
Jeff Verkoeyen
087d22f441 Update header stack view and navigation bar screenshots. 2018-05-03 16:25:53 -04:00
featherless
a078a9722d
Standardize the casing for all components to match spec. (#3693) 2018-05-03 15:02:36 -04:00
featherless
da21941afa
Regenerate component docs with automatic API links. (#3673)
Example output:

<img width="468" alt="screen shot 2018-05-02 at 10 33 23 pm" src="https://user-images.githubusercontent.com/45670/39557914-d9512f38-4e58-11e8-824d-60f03bcd1b76.png">
2018-05-02 22:33:55 -04:00
featherless
037bf7d0f0
Flatten all +Extensions CocoaPods targets into standalone targets. (#3572)
This discourages depending on all of a component's extensions and aligns our targets more closely with how we expect them to be imported and depended upon.

This is a breaking change.

Pivotal story: https://www.pivotaltracker.com/story/show/157118721
2018-05-02 10:20:01 -04:00
featherless
c541893c30
[AppBar] Nest all of the implementation detail components under AppBar.
This nests HeaderStackView and NavigationBar under AppBar in the docs.

Pivotal story: https://www.pivotaltracker.com/story/show/157205667
2018-05-01 23:11:20 -04:00
featherless
3e2cca9e98
[ButtonBar] Remove from the website. (#3638)
This component is an implementation detail of NavigationBar and should probably be private.
2018-05-01 23:03:19 -04:00
featherless
574e115a7b
[NavigationBar] Fix broken link. (#3632) 2018-05-01 21:28:58 -04:00
featherless
7ebaeb51be
[NavigationBar] Split the documentation into separate articles and run the readme generator. (#3622) 2018-05-01 16:52:12 -04:00
featherless
d0866fc6f0
Mark all of the AppBar implementation component examples as dragons. (#3596)
ButtonBar, FlexibleHeader, HeaderStackView, and NavigationBar are all implementation details of AppBar. While these components can be used on their own, in practice we expect most typical usage to rely on AppBar. FlexibleHeader is a bit blurry in that there is often value in relying on it solely, but because it is not a true concept in the spec and its behavioral demos largely overlap with AppBar's, it is now a dragons demo.

Pivotal story: https://www.pivotaltracker.com/story/show/156982162
2018-05-01 16:46:13 -04:00
Adrian Secord
7a7293883f
Remove space after triple-backtick Markdown syntax. (#3577) 2018-04-29 09:00:53 -04:00
featherless
d3c5316db0 Generate all themer documentation. (#3562)
* Generate all themer documentation.

* Fix Snackbar vars.

* Fix textfields vars.

* Fix link.

* Fix bottom app bar vars.

* Fix more vars.

* Add home page links.

* Fix typos.

* Fix more links.

* Add ink.

* Tabs.

* Cleanup.
2018-04-27 16:59:03 -04:00
Mohammad Cazi
81aca79c69 Adding .vars files for each component. (#3561) 2018-04-27 12:42:50 -04:00
featherless
0cc7e9860f
Standardizing API docs. (#3481)
This standardizes the themer API docs for every component.

Pivotal story: https://www.pivotaltracker.com/story/show/157066083
2018-04-26 22:25:57 -04:00
featherless
8395836c98
Remove all UIAppearance references from documentation. (#3480)
We do not intend to actively support UIAppearance any further. This change removes any references to supporting UIAppearance from our public documentation.

Pivotal story: https://www.pivotaltracker.com/story/show/157048342
2018-04-26 12:55:35 -04:00
Yarden Eitan
7f7bc36202
[Catalog] Expose colorScheme + typographyScheme properties for all examples to use app wide theming (#3478)
Made colorScheme and typographyScheme properties in the class interfaces for all our examples.
Moved theming away from example inits and into viewDidLoad
Small update for slider example to allow it to grab the theming properly.
Related Pivotal: https://www.pivotaltracker.com/story/show/156616695
2018-04-25 15:15:17 -04:00
featherless
e5679888fe
[NavigationBar] Add umbrella headers for all extension targets. (#3471)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 15:57:24 -04:00
featherless
23110ef116
[Catalog] Make all swift copycat demos be dragons. (#3443)
Also removed "(Swift)" from any examples that remained as non-dragons. The catalog does not need to advertise which language a given demo is in.

Pivotal story: https://www.pivotaltracker.com/story/show/156939611

## Screenshots

Before:
![simulator screen shot - iphone se - 2018-04-23 at 14 04 14](https://user-images.githubusercontent.com/45670/39144588-36095450-46ff-11e8-868d-bdb7e8ee5438.png)

After:
![simulator screen shot - iphone se - 2018-04-23 at 13 53 39](https://user-images.githubusercontent.com/45670/39144567-2ad7bf9a-46ff-11e8-9fd5-ef0739d427b3.png)
2018-04-24 15:52:13 -04:00
featherless
bd05a69c88
[NavigationBar] Fix the surface variation themer's text/icon colors to match spec. (#3416)
For the variant themer, text is supposed to be onSurface @ 87% opacity, while icons are onSurface @ 54% opacity.

Closes pivotal story: https://www.pivotaltracker.com/story/show/156934328
Closes pivotal story: https://www.pivotaltracker.com/story/show/156934114

Before:

![simulator screen shot - iphone se - 2018-04-19 at 21 04 58](https://user-images.githubusercontent.com/45670/39065696-aa4df430-44a0-11e8-897f-3bc71b8b4c7e.png)

After:

![simulator screen shot - iphone se - 2018-04-19 at 21 04 03](https://user-images.githubusercontent.com/45670/39065699-ad47ffaa-44a0-11e8-9a40-e2d2cb92f908.png)
2018-04-20 15:15:23 -04:00
featherless
8d3f54246e
[NavigationBar] Add a stateful buttons title color API. (#3415)
This API allows a client to customize the title color for buttons for a given control state.

Related to https://www.pivotaltracker.com/story/show/156934328

Screenshot shows a button with a custom normal and highlighted state. The button on the left is highlighted.

![simulator screen shot - iphone se - 2018-04-19 at 19 51 59](https://user-images.githubusercontent.com/45670/39024065-786db638-440c-11e8-97e8-f6bf3e6c2af7.png)
2018-04-20 13:41:13 -04:00
featherless
610d1ab58a
[NavigationBar] Add an API for customizing button fonts. (#3412)
Pivotal story: https://www.pivotaltracker.com/story/show/156769836
2018-04-19 19:55:21 -04:00
featherless
6b2de0f3a3
[NavigationBar] Add surface variant theme. (#3376)
![simulator screen shot - iphone 8 plus - 2018-04-16 at 20 40 39](https://user-images.githubusercontent.com/45670/38842189-9ed9c6a2-41b6-11e8-9149-08f945c673d2.png)

Pivotal story: https://www.pivotaltracker.com/story/show/156826560
2018-04-17 08:02:09 -04:00
featherless
d259ebed7d
[NavigationBar] Fix bug where system font traits would be lost. (#3360)
### Context

When setting a font on MDCNavigationBar, we force the font to have a size of 20.

### Prior to this change

We were enforcing the font size by using an older UIFont API - fontWithName:size:. This API does not preserve font descriptor attributes from the provided font, it only preserves the font name and size.

This was resulting in the loss of an important system font descriptor attribute, namely `NSCTFontUIFontDesignTrait` which was set to `NSCTFontUIFontDesignDefault`. This font attribute affects the kerning of fonts when displayed on screen.

### After this change

We are now using the iOS 7 API - fontWithDescriptor:size:. This API preserves all of the underlying font descriptor attributes.

The result of this change is an intentional visual change.

As part of this behavioral change, I've also updated the related unit tests to enforce this behavior in the future.

To see a visual depiction of the change in behavior, open the following two screenshots and flip between them:

Before this fix:
![lossy](https://user-images.githubusercontent.com/45670/38755649-8a172a22-3f34-11e8-9f53-15ca6789e351.png)

After this fix:
![notlossy](https://user-images.githubusercontent.com/45670/38755654-8d998fa0-3f34-11e8-8112-49e3d4b7d76e.png)

Visual delta:
![difference](https://user-images.githubusercontent.com/45670/38755656-91d02f5c-3f34-11e8-8032-36d3ffc8f52e.png)
2018-04-13 16:25:17 -04:00