14 Commits

Author SHA1 Message Date
Robert Moore
5879c18c26
[ButtonBar, NavigationBar] Add BUILD file for kokoro (#2598)
* [ButtonBar, NavigationBar] Add BUILD file for kokoro

ButtonBar ColorThemer depends on NavigationBar
NavigationBar depends on ButtonBar
2017-12-11 17:49:26 -05:00
Robert Moore
0ee27517d0 [ButtonBar] Make ButtonBarButton insets in method (#1797)
Refactoring App Bar button builder to be more testable/modular.  Pulling
out a method to create the content edge insets for a button in a button
bar.
2017-08-14 16:36:01 -04:00
Robert Moore
1441a01113 [ButtonBar] Refactor ButtonBarBuilder for testing (#1796)
* [ButtonBar] Refactor ButtonBarBuilder for testing

Pulling out part of the ButtonBarBuilder logic to start making it more
testable.  Extracting the initial configuration of MDCButton from a
UIBarButtonItem into a class method and adding unit tests.
2017-08-14 14:59:12 -04:00
Adrian Secord
7ff646b58a [Swiftlint] Moar swiftlint fixes (#1155)
* Quieted swiftlint down in scripts/format_all.

* BONUS clang-format for ObjC code.

* Fixed two stray ObjC warnings (not swiftlint related).

* Fixed remaning swiftlint warnings.

* Fixed typos in Shrine fixes.

* Swift cleanups, again.

This reverts commit 7489fca4e4741ae02b406cdaacaf1dae26e19837.
2017-01-25 17:23:20 -05:00
Adrian Secord
7489fca4e4 Revert "Swift cleanups."
This reverts commit 129789c601a2bb6b09648af953c5433ebe3cebe0.
2017-01-25 16:58:40 -05:00
Adrian Secord
129789c601 Swift cleanups. 2017-01-25 16:56:24 -05:00
Sam Symons
bb561ac257 [Scripts] SwiftLint integration (#1129)
* Integrate SwiftLint in the Catalog.

* Update the disabled SwiftLint rules.

* Reference a local swiftlint.yml symlink.

This prevents us from getting warnings about code style violations from the other demos.

* Fix SwiftLint violations in the Catalog and Components.

* Ignore the `third_party` directory when running the linter.

We should not have to deal with warnings in code we may not be able to fix easily.

* Integrate SwiftLint into Shrine.

Additionally, fix a number of warnings introduced.

* Run SwiftLint on Travis.

* Enable many of the previously disabled rules and correct them.

* Fix control statement violations from SwiftLint.
2017-01-06 16:37:23 -05:00
Adrian Secord
4842a362f5 Convert component examples to Swift 3 (#1002)
* WIP

* WIP

* Simplified build script and fixed it to build all schemes.

* WIP

* Renamed script to build_all and added better output.

* Add scripts/list_xcode_workspaces.

* Filtered out the CocoaPods schemes.

* Use Xcode to update Swift to v3.

* Updated tracked touches map from NSNumber to Int.

* Fixed button sorting that was not actually sorting.

* targetContentOffset no longer allowed to be nil.

* "Fixed" failing test by reducing random number range?

* Swift 3 syntax change.

* Swift 3 syntax change.

* Removed invalid center-aligning tests.

Fixed default nav bar alignment test.
2016-12-12 09:55:36 -05:00
Adrian Secord
2997e50c4c Updated refs to GitHub repo with new location. (#885)
* Updated refs to GitHub repo with new location.

* Reverted chagnes to JSON files.
2016-11-22 14:32:50 -05:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...

Summary:

We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.

Changed copyright statement to include non-Google authors.

Command run:

find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods  \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Added non-source files.

Command run:

grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Reviewers: featherless, O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1415
2016-08-08 08:16:37 -07:00
Louis Romero
56561b40b6 [ButtonBar]? Layout bar button items based on the layout position.
Summary:
When the layout position is trailing, button items are now laid out in the
reverse order, to match UINavigationBar implementation.

This closes https://github.com/google/material-components-ios/issues/516.

Test Plan:
Have a button bar with MDCButtonBarLayoutPositionTrailing and 2 buttons.
Buttons should be laid out in the reverse order.

Reviewers: junius, #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D875
2016-05-21 02:00:56 +02:00
Jeff Verkoeyen
916866a525 [ButtonBar] Update tests to reflect that titleTextAttributes appearance only works on iOS 9.
Summary: Part of https://github.com/google/material-components-ios/issues/370.

Reviewers: #mdc_ios_owners, junius, iangordon

Reviewed By: #mdc_ios_owners, junius, iangordon

Subscribers: iangordon

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D685
2016-04-20 12:49:11 -04:00
Jeff Verkoeyen
e3a56fe962 [ButtonBar] Check UIBarButtonItem global appearance configuration when creating the buttons.
Summary: Related to https://github.com/google/material-components-ios/issues/370.

Reviewers: randallli, #mdc_ios_owners, larche

Reviewed By: randallli, #mdc_ios_owners, larche

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D625
2016-04-16 00:10:05 -04:00
Jeff Verkoeyen
792c128c8b [ButtonBar] Icon-only buttons use unbounded ink. Buttons with text us bounded ink.
Summary: Closes https://github.com/google/material-components-ios/issues/328.

Reviewers: #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D576
2016-04-12 14:40:25 -04:00