95 Commits

Author SHA1 Message Date
Cody Weaver
5db5057aaf
[BottomNavigation] Change badge position (#5339)
<h4>

```diff
- Warning - This may break screenshot testing -
```
</h4>

### Context
Currently the badge is centered on the top of the `iconImageView`. The `iconImageView`'s  `origin.y` is at 8.883 in MDC because we vertically center the _content_ in the MDCBottomNavigationItemView. We get the _content_ height by:

_contentHeight_ = icon.height + label.height + contentVerticalMargin

_contentVerticalMargin_ is the spacing between the icon and label.

The **_badge_** is 14dp tall. Centering the badge on the `iconImageView`'s `origin.y` puts the badge at 1.883.
### The problem
The badge is too high in relation to the top of the bottom navigation bar and doesn't match internal guidance.
### The fix
Make the badge and iconImageView have the same origin y, giving users more separation between the top of the navigation bar and the top of the badge.
### Related PR
Closes #4731 
### Screenshots
| Before | After |
| - | - |
|![simulator screen shot - iphone x - 2018-10-06 at 11 10 04](https://user-images.githubusercontent.com/7131294/46572709-65fa2f00-c958-11e8-8f57-5c0d389ae7c0.png)|![simulator screen shot - iphone x - 2018-10-06 at 11 09 29](https://user-images.githubusercontent.com/7131294/46572711-698db600-c958-11e8-838e-ee6ec31c7c50.png)|
2018-10-09 16:09:15 -04:00
Cody Weaver
e0fef69db3
Fix example (#5242)
### Context
In working on #4042 I discovered that Bottom Navigation (Swift) example isn't working as intended
### The problem
No elements were on screen
### The fix
Call the common init in the initializer

### Screenshots
| Before | After |
| ----- | ----- |
|![simulator screen shot - iphone xs max - 2018-09-25 at 15 18 57](https://user-images.githubusercontent.com/7131294/46037525-5ff18c00-c0d6-11e8-9b70-d43a98626acf.png)|![simulator screen shot - iphone xs max - 2018-09-25 at 15 14 18](https://user-images.githubusercontent.com/7131294/46037533-63851300-c0d6-11e8-8253-cc99f7db504c.png)|
2018-09-26 09:25:19 -04:00
andrewplai
388a057ad5 [BottomNavigation] Expose UIView for a given UITabBarItem. (#5061)
This will allow MDCBottomNavigationBar to work with popover / tooltip libraries which require an anchor view for positioning (i.e, if we want to display a tooltip over one of the tabs).

Closes [#4824](https://github.com/material-components/material-components-ios/issues/4824)
2018-09-10 08:11:29 -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
Robert Moore
09505ec920
[BottomNavigation] Update ripple color for unselected items. (#4950)
All items should share the same (ink) ripple color, based on the
`selectedItemTintColor`. For currently-unselected items, the ripple color
would only be updated if the `unselectedItemTintColor` property was set.

The problem was caused by earlier behavior where the ripple color would be
derived from the current state of the button. If an unselected item were
pressed, its ripple color would be based on the `unselectedItemTintColor`.
That behavior was changed so that the `selectedItemTintColor` was used for the
ripple color in all states, but the logic was not moved outside of the
state-based conditional logic.

||Animated Screenshot|
|--|--|
|Before | ![bn-ink-before](https://user-images.githubusercontent.com/1753199/44802070-bd9ec100-ab88-11e8-86c9-48658f8adcc0.gif)|
|After | ![bn-ink-after](https://user-images.githubusercontent.com/1753199/44802075-c2fc0b80-ab88-11e8-872f-ad586408b928.gif)|

Closes #4937
2018-08-30 23:50:27 -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
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
Robert Moore
7307a8c5c0
[BottomNavigation] Button for badge increment. (#4857)
The BottomNavigation main demo has an infinite loop of badgeValue
updates, making EarlGrey testing difficult. Instead, we can use the
AppBar's rightBarButton to provide a button for incrementing the badge
value manually.

|Before|After|
|--|--|
|![mdc-bn-before](https://user-images.githubusercontent.com/1753199/44378402-1d350680-a4cf-11e8-891d-b70d8fc395b4.gif)|![mdc-bn-after](https://user-images.githubusercontent.com/1753199/44378408-21612400-a4cf-11e8-88c9-6d6dde20b7aa.gif)|

Closes #4836
2018-08-21 08:32:03 -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
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
Robert Moore
057c72429f
[BottomNavigation] Fix accessibilityValue for badgeValue updates (#4734)
When the `badgeValue` property is updated, the `accessibilityValue` of the
item view should also be updated. However, recent changes to improve
accessibility resulted in the first badge value persisting forever as the
accessibilityValue (unless accessibilityValue was updated manually).

Fixes #4733
2018-08-08 11:38:29 -04:00
John Detloff
120c93d329
Fix safe area insets on bottom nav example (#4637) 2018-08-07 15:55:07 -04:00
Robert Moore
5721ba816f
[BottomNavigation] Remove duplicate tab position descriptions (#4679)
When adding the UIAccessibilityTraitTabBar to MDCBottomNavigationBar, don't add custom "tab" and "1 of 4" strings.
2018-08-07 12:58:58 -04:00
featherless
50e1fd091d
[Catalog] Conversion to new App Bar View Controller API (#4696)
This PR updates the catalog to use the new MDCAppBar API throughout.
2018-08-07 09:30:37 -04:00
Andrew Overton
203160c80e
[BottomNavigation] Explicitly update label visibility after titleVisibility is set (#4635)
* Explicitly update label visibility after titleVisibility is set

* Add unit test for titleVisibility

* Make switch statement less explicit and fewer lines
2018-07-27 15:08:14 -04:00
Robert Moore
9d16a4a894
[BottomNavigation] Fix delayed ink ripple (#4625)
Ink ripple animations were being delayed. It appears that the root cause is
somewhere in how UIButton forwards `UIControlEventTouchDown`. Migrating to
MDCInkTouchController fixed the issue.

Closes #4586
2018-07-26 09:04:33 -04:00
Andrew Overton
87496292ff
[BottomNavigation] Give UITabBarItems' accessibilityIdentifiers to MDCBottomNavigationBa… (#4599)
* Give UITabBarItems' accessibilityIdentifiers to MDCBottomNavigationBar's items' buttons

* KVO tab bar item accessibilityIdentifier in MDCBottomNavigationItemView

* Add unit test for tracking UITabBarItem accessibilityIdentifier

* Fix KVO and associated spec

* Move accessibilityIdentifier spec
2018-07-25 10:55:40 -04:00
featherless
001fbfac55
[BottomNavigation]! Remove encoding/decoding behavior for custom properties (#4562)
Closes https://github.com/material-components/material-components-ios/issues/3939
2018-07-25 09:48:35 -04:00
Jeff Verkoeyen
025f7f4dc4 Ignore Wtautological-pointer-compare errors on min iOS 10 builds.
We were seeing the following error on builds of apps that support iOS 10 and up:
components/BottomNavigation/src/MDCBottomNavigationBar.m:200:8: Comparison of address of 'UIAccessibilityTraitTabBar' not equal to a null pointer is always true

We still support iOS 8 and up, so the code's behavior is valid when building against pre-iOS 10 SDKs. For 10 and up, the error is true (the comparison will always return true), but this is intentional, so we are disabling the warning.
2018-07-18 09:58:27 -04:00
Randall Li
ad872244e1
Removed internal links from docs. (#4558) 2018-07-17 10:36:51 -04:00
John Detloff
5c88af59d1
[BottomNavigation] Parameterize top padding and vertical margin (#4432)
Expose parameters for the top padding of the nav bar items and the vertical spacing between the icon and title. 

Before:
![simulator screen shot - iphone x - 2018-06-22 at 17 17 13](https://user-images.githubusercontent.com/1418389/41799614-269ce57a-7640-11e8-9f75-8c4c057101ed.png)

After:
![simulator screen shot - iphone x - 2018-06-22 at 17 16 33](https://user-images.githubusercontent.com/1418389/41799621-2b13c7ea-7640-11e8-88f1-30ae38220b05.png)

Closes #4042
2018-07-13 13:42:04 -04:00
Cody Weaver
e7b30aa449
[BottomNavigation] Add a11y to README (#4497)
* Add a11y to README

* Update other files needed

* Clear white space

* Fix issues

* Fix issues

* Remove headings

* Fix issues

* Add div

* Fix issues

* Fix issue
2018-07-13 10:10:12 -04:00
Andrew Overton
541a7af867
[BottomNavigation] Give MDCBottomNavigationBar a TabBar accessibilityTrait (#4510)
* Give MDCBottomNavigationBar a TabBar accessibilityTrait

* Use @available instead of #if defined blah blah blah

* Go back to #if defined blah blah blah

* Try adding some warning suppressions
2018-07-12 11:46:04 -04:00
Cody Weaver
684f96c9f3
[BottomNavigation] AccessibilityValue and Selected icon support (#4444)
Added support for custom accessibility value within bottom navigation tabs and selected icon.
2018-06-28 09:42:34 -04:00
Robert Moore
f1bb92ee92 [BottomNavigation, Math] Fix BOOL types (#4436)
Two files were using C99 `bool` instead of Objective-C `BOOL` types. This
could lead to breakages in the future if the `BOOL` type were redefined by the
Objective-C headers.
2018-06-26 13:42:22 -04:00
Cody Weaver
c9fb2d91a4
[BottomNavigation] Test cases when we reset the bottom navigation items array (#4431)
Added an example to showcase when items are reset to an new array.

Fixed the bug when we reset items and they don't layout correctly.

After a reset, set the selected tab to Null to mirror UITabBar
https://developer.apple.com/documentation/uikit/uitabbar/1623453-selecteditem?language=objc

Added two test to check for selection being Null after a reset and frames not being zero after a reset.

Closes #4429
2018-06-26 09:40:21 -04:00
Cody Weaver
a9d508c681 [BottomNavigation] Add example when we explicitly set color (#4420)
* Add example when we explicitly set color of bottom navigation bar

* Clean up app bar stuff and move code out of init.

* Fix error with appBar

* Remove lines where I set color and remove extra example from this PR.

* Fix whitespace issue

* Adjust colors and tags.

* Change tags and colors, forgot to add this to the last commit.
2018-06-22 15:29:41 -04:00
Cody Weaver
beecea91ef
[BottomNavigation] Update ripple color to match spec. (#4422)
Update spec to match what designer said


Closes #4403
2018-06-21 15:50:47 -04:00
Andrew Overton
1dd5ee9e4a
Use size classes instead of device orientation to determine layout in bottom navigation (#4424) 2018-06-21 15:28:39 -04:00
Cody Weaver
1d6444634a [BottomNavigation] Fix bug when setItems does not correctly set items (#4398)
* Fix setItems bug

* Clean up changes I didn't intend to include

* Add test to make sure when we add items they don't just continue to append to the array but reset it back to empty then add the items.

* Update the test so we set  twice.

* Add line.

* Update test to use same type in comparison.

* Use NSUInt instead of unsigned int.

* Undo whitespace changes.
2018-06-15 17:12:18 -04:00
Robert Moore
4975c38a41 [BottomNavigation] Correct long title layout (#4303)
When title strings are very long (as may be common in localization to
non-default languages), MDCBottomNavigationBar was incorrectly computing the
expected height of the title label. Instead of querying the NSString for its
bounding rect, we can allow the UILabel to size itself and simply restrict
its width to the tab's width.

Closes #4040
2018-05-29 18:27:00 -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
Robert Moore
7bf1c4ad8f
[BottomNavigation] Fix shadow elevation value (#4195)
The Bottom Navigation should have an elevation of 8 dps instead of 6 based on
the latest design guidance.

**Before**
![bottomnav-ex-original](https://user-images.githubusercontent.com/1753199/40240442-92c9976e-5a86-11e8-9972-e5b6bfe07736.png)

**After**
![bottomnav-ex-after](https://user-images.githubusercontent.com/1753199/40240450-96201af0-5a86-11e8-9e1b-8a488cdc96c3.png)
2018-05-18 13:48:36 -04:00
Jeff Verkoeyen
e7b2b2c8e8 [BottomNavigation] Shrink the gif. 2018-05-03 17:09:56 -04:00
Jeff Verkoeyen
c8b8acabf8 [BottomNavigation] Remove redundant link and update copy. 2018-05-03 17:08:01 -04:00
Jeff Verkoeyen
72ccfa7342 Add gif for bottom navigation and fix alt text in bottom app bar. 2018-05-03 17:05:28 -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
e923d2d928
[Catalog] Make many examples be dragons. (#3642)
Pivotal story: https://www.pivotaltracker.com/story/show/156939988
Pivotal story: https://www.pivotaltracker.com/story/show/156804299
Pivotal story: https://www.pivotaltracker.com/story/show/156939962
Pivotal story: https://www.pivotaltracker.com/story/show/156982119
Closes: https://github.com/material-components/material-components-ios/issues/3183
2018-05-02 08:31:55 -04:00
featherless
91eca05769
[scripts] Ensure that asset urls are remapped when generating readmes. (#3640) 2018-05-01 23:39:10 -04:00
featherless
d2b8f7618e
[BottomNavigation] Split the documentation into separate articles and run the readme generator. (#3616) 2018-05-01 16:20:37 -04:00
Adrian Secord
7a7293883f
Remove space after triple-backtick Markdown syntax. (#3577) 2018-04-29 09:00:53 -04:00
Adrian Secord
72045ffd6d
[Docs] Updated known short link destination URLs to use short links. (#3575)
* Updated known shortlink destination URLs to use short links.

* Updated stray links in the CHANGELOG.md.

* Fixed FAB shortlink.

* Applied replacements to everything outside of components/.
2018-04-28 11:27:59 -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
featherless
4186de3733
Adding .vars files for each component. (#3557) 2018-04-27 12:20:05 -04:00