15 Commits

Author SHA1 Message Date
Robert Moore
c3ad8fb9f5
[Icons] Correct icons scripts and integration. (#8501)
Icons were not fully integrated into the catalog project and the relevant
scripts were out of date. This PR addressed the following issues:

*   The Icons source files had been hand-modified and did not match the
    script outputs.
*   The Icons unit tests were not included in the Catalog or Dragons
    projects.

It addresses these issues through the following:

*   Updates `scripts/sync_icons.sh` to:
    -   Match the copyright header format used by the project.
    -   Run clang-format on each generated source file.
    -   Add Icons unit tests to the MaterialComponents podspec.
    -   Remove duplicate import of `MaterialIcons.h` in the source
        implementation files.
*   Adds the Icons unit test targets to the Catalog and Dragons Xcode schemes.

Discovered while working on #8498
2019-09-25 12:21:04 -04:00
Robert Moore
565ae15cdb [Collections] Use image cache for selection icons (#1638)
* [Icons] Add icon method for use with imageNamed

Icon images are currently loaded manually from a path in a bundle and therefore bypass the internal UIImage caching mechanism. This change will add new methods that provide the icon images via the -imageNamed family of methods.

Closes #1637, #1606
2017-07-14 16:50:39 -04:00
Adrian Secord
db3c563ad3 Fixed mysterious CocoaPods header_mapping_dir issue that was blocking CocoaPods linting. 2016-12-15 17:05:40 -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
Adrian Secord
a045b07bcc Fix internal builds.
Summary:
- Adds missing dependencies to the podspec.
- Fixes private import paths.
- Adds dummy variable to "empty" static library targets to suppress build warnings.
- Suppresses string concatenation warnings in valid contexts.
- Lint changes.

Reviewers: iangordon, O1 Material components iOS

Reviewed By: iangordon, O1 Material components iOS

Subscribers: junius

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1074
2016-06-30 13:19:16 -04:00
Ian Gordon
13c8cf72b8 Add support for Cocoapods 1.0.0.
Summary:
DO NOT LAND until after we have finalized our May 25 2016 release.

Cocoapods 1.0.0 was used to generate Pod* and xcode* files.

These changes are NOT compatible with 0.39.0.
These changes may NOT be compatible with version of Xcode 7.2 and earlier.

pod lib lint generates a list of issues that should be addressed.

--OLD INFO--

Cocoapods 0.39 was used to generate the Podfile.locks.

MaterialComponents - Build properly
MaterialUnitTests - Test properly
MaterialCatalog - Fails to Build

The errors (cut after the first 20) are similar to:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/MaterialComponentsCatalog-umbrella.h"
        ^
/Users/iangordon/projects/material-components-ios/catalog/Pods/Target Support Files/MaterialComponentsCatalog/MaterialComponentsCatalog-umbrella.h:10:9: note: in file included from /Users/iangordon/projects/material-components-ios/catalog/Pods/Target Support Files/MaterialComponentsCatalog/MaterialComponentsCatalog-umbrella.h:10:
#import "CollectionCellsLayoutExample.h"
....

Reviewers: featherless, randallli, ajsecord, #material_components_ios

Reviewed By: featherless, randallli, ajsecord, #material_components_ios

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D873
2016-05-31 11:17:53 -04:00
Louis Romero
8c046ad42c Remove icons' assets catalog.
Summary:
Assets catalogs require to use imageNamed:. Since we want Icons to let clients
handle the caching, we only provide the path for the resource in our bundle.

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

Test Plan:
Build the catalog and verify that CollectionCells' accessory images are
displayed correctly for all resolutions and configurations.

Reviewers: ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Subscribers: featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D793
2016-04-29 18:49:30 +02:00
Jeff Verkoeyen
63c3dc6ac5 Icons bundles use _ instead of +.
Summary: Closes https://github.com/google/material-components-ios/pull/293.

Reviewers: ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D513
2016-04-07 13:15:48 -04:00
Jeff Verkoeyen
f804e66ec3 [Icons] MDCIcons+BundleLoader.h must be a protected header.
Summary: In order for Icon targets to import this header the header can't be truly private.

Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D340
2016-03-24 18:37:13 -04:00
Jeff Verkoeyen
0697f063a9 [Icons] Base source needs its own explicit target.
Summary: This allows icon targets to correctly identify their dependency on the root Icons code.

Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D339
2016-03-24 17:44:35 -04:00
Jeff Verkoeyen
8d72cc0217 [Icons] Add missing header search paths in pod specs.
Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D338
2016-03-24 16:47:27 -04:00
Jeff Verkoeyen
93bc9fca2a Bundles must live within the src/ directory of a component.
Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D336
2016-03-24 16:15:53 -04:00
Jeff Verkoeyen
21001552dc Bundles can't have plusses in their names.
Summary:
Otherwise you get errors like this:

```
link_stat "Build/Products/Debug-iphonesimulator/MaterialIcon\+ic_arrow_back.bundle" failed: No such file or directory (2)
```

Reviewers: #mdc_ios_owners, randallli, junius

Reviewed By: #mdc_ios_owners, randallli, junius

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D323
2016-03-23 17:54:34 -04:00
Jeff Verkoeyen
4ad6efb6a0 Add private/ directory to Icons target.
Reviewers: #mdc_ios_owners, junius

Reviewed By: #mdc_ios_owners, junius

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D315
2016-03-23 13:22:34 -04:00
Jeff Verkoeyen
57558b2dbd Icons component
Summary: Closes https://github.com/google/material-components-ios/issues/168

Reviewers: randallli, #mdc_ios_owners, ajsecord

Reviewed By: randallli, #mdc_ios_owners, ajsecord

Subscribers: iangordon, ajsecord, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D295
2016-03-23 12:20:51 -04:00