92 Commits

Author SHA1 Message Date
ianegordon
49de50edae Consolidate installation requirements in the main README (#2809) 2018-01-05 13:50:38 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Sam Morrison
9b097023fb
[Shapes] Implicitly animate shape path on resizing (#2619)
* [Shapes] Implicitly animate shape path on resizing

* Remove MDCShapelayer
2017-12-07 19:25:09 -05:00
Robert Moore
7c86d12f5f
[Bazel] Fix BUILD files for bazel 0.8.0 and latest apple_rules (#2640)
Bazel and/or apple rules got stricter. Adding some missing SDK dependencies in
our components.
2017-12-07 12:33:40 -05:00
Sam Morrison
7e2d44522e [ShadowLayer] Animate shadow resizing (#2523)
* First pass animated shadows

* Make order of ZShadow demo views consistent

* Clean up MaterialShadowedView

* More cleanup

* Revert one example change

* Move everything in to MDCShadowLayer

* Revert MaterialShadowedView.m

* Only animate if the size change is animated

* Remove duplicate method

* Copy animation instance instead of copying each property

* Use CALayerDelegate instead of custom subclass

* animationSourceLayer
2017-11-30 14:18:51 -05:00
featherless
d24789f484
[Shadow*] Add BUILD files for shadow components. (#2510)
* [Shadow*] Add BUILD files for shadow components.

* Move test headers into src.
2017-11-22 16:37:44 -05:00
featherless
e38ac60ffd
[ShadowLayer] Add support for implicitly animating the shadow layer's elevation using MotionAnimator. (#2509) 2017-11-22 16:16:57 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Martin Petrov
6639fb4f70 Update shadow examples (#2174) 2017-10-13 13:07:31 -04:00
Martin Petrov
49fd0a07ea [ShadowElevations] Update ShadowElevations to be extensible. (#2145)
* [Collections] Modernize Swift in styling readme.

* [ShadowElevations] Update ShadowElevations to be extensible.

This defines a custom macro to get the typed enum behavior rather than
defining a system macro to prevent it from adversily affecting clients.

Redundant NS_SWIFT_NAME macros are removed.

Usage is updated to omit the optional rawValue: argument. Docs are also
updated to reflect the change.

* minor fixes

* need an extra clause for xcode8

* updated for xcode8 backwards compat
2017-10-13 11:36:31 -04:00
Junius Gunaratne
a9b08ce452 [ShadowElevations] Improve Swift support for shadow elevations (#2116)
* Shadow elevation swift

* Improve shadow elevation swift support

* Add const. Update formatting.
2017-10-06 15:01:41 -04:00
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`.  All examples in the same breadcrumbs path have only one primary demo.  There should be only one `-catalogDescription` attached to the primary demo.

Closes #1897
2017-08-31 08:46:10 -04:00
Robert Moore
2283e04f02 [ShadowLayer] Support layer copying (#1625)
* [ShadowLayer] Support layer copying

Implementing -initWithLayer: for Shadow layers

Closes #248

* Removing invalid TODO

* Reverting changes to -commonInit

Making sublayer initialization coniditional so that `-initWithLayer:`
doesn't end up calling `-addSublayer:`
2017-07-12 14:37:05 -04:00
Martin Petrov
1e14d41091 Explicitly annotating some known ObjC methods. (#1617)
This improves Swift4 compatibility, see:
https://help.apple.com/xcode/mac/current/#/deve838b19a1
2017-07-10 19:46:22 -04:00
Scott Hyndman
eed028eacb [Docs] Adds API documentation roots and tidies up here and there. (#1425)
* [Docs] Marks component files as API documentation roots.

Used by the site generator to determine where to build API docs. I
marked everything built by the previous version.

* [Docs] Adds a prefix to all Material guidelines links.

* [Docs] Adds API doc links to some components.
2017-05-12 16:03:56 -04:00
Scott Hyndman
1571a1b9ee [Docs] Nests components in the navigation as spec'd. (#1404)
Also took the opportunity to remove an unneeded liquid style
application.
2017-05-09 11:49:44 -04:00
Scott Hyndman
1bec0a903a [Docs] Misc. cleanup (#1403)
* [Docs] Changes an icon list class name.

* [Docs] Adds annotations to all installation code snippets.

* [Docs] Fixes screenshot sizes in PageControl README.

* [Docs] Fixes a broken link on the homepage.

* [Docs] Adds a stable repository branch field to the site metadata.

Used to link to the GitHub source tree.

* [Docs] Specify platform in docs root title.
2017-05-08 18:05:05 -04:00
ianegordon
fc4f2b763a [ShadowLayer] Screenshot (#1389)
* [ShadowLayer] Screenshot

* Remove label
2017-05-05 17:01:27 -04:00
Scott Hyndman
4a011e75a5 [Docs] Docstravaganza (#1330)
* [Docs] Adds platform configuration for the doc site.

* [Docs] Adds path metadata for documentation site.

This field is used to determine where the file will appear in the
doc site.

* [Docs] Updates Material guideline links to latest URL.

material.google.com -> material.io/guidelines

* [Docs] Introduces a separate component index for the docsite.

* [Docs] Changes the directory used for site generation.

* [Docs] Moves documentation-site-only Markdown into its own directory.

* [Docs] Changes material.io links to use https.

* [Docs] Renames the howto and contributing docsite sections to docs.

* [Docs] Adds a navTitle field to the collection editing/styling pages.

* [Docs] Changes the FAQ heading to be one size bigger.

* [Docs] Changes the tutorial title.

* [Docs] Adds icons to three more components.

* [Docs] Introduces a root component directory called /catalog/.

* [Docs] Adds an icon to the AnimationTiming component.

* [Docs] Adds an icon for the typography component.

* [Docs] Reformats the docsite index.
2017-05-01 17:27:38 -04:00
Will Larche
3f99ed2dd9 [All] replacing ~~~ with ```. (#1324) 2017-04-17 17:06:37 -04:00
Scott Hyndman
0913aa9aaf [Docs]: Updated link list classes. (#1320)
Link lists now use BEM notation across the board. It's more verbose, but is
aligned with the conventions of MDC-web and the docs site.
2017-04-13 17:25:23 -04:00
Scott Hyndman
69533578ca [docs] Associated icons with components (#1315)
* Adds icon IDs to most component READMEs.

The ones without icon IDs will default to a generic icon.

* Removes a space from front matter.
2017-04-12 18:22:08 -04:00
Scott Hyndman
9ed1d4349d Gigantic documentation update. (#1305)
There are more changes to come, but it's time we merged back.

Changes:
* Re-introduces the doc site scripts and files that had been deleted previously.
* Updates contributing docs to reflect doc structure changes.
* Applies common header structure across all component documentation.
* Fixes a bunch of liquid syntax bugs.
* Inlines Front Matter metadata in README.md files as HTML comments. Any file prefixed with

  <!--docs:
  ...yaml
  -->

  Will be converted into Front Matter when generating the site.
* .jekyll_prefix files, which previously stored the data, have been removed.
2017-04-05 10:53:34 -04:00
Adrian Secord
8bcb19781c More SwiftLint fixes for unit tests and example apps. (#1154)
* ClangFormat changes.

* Added swiftlint to scripts/format_all.`

* Fix scripts/lint_all to work from any directory.

* Fixed swiftlint invocation.

* Remove the checks for force casting (! operator).

* Some fixes.

* More Swift fixes.
2017-01-11 13:27:57 -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
7ba66bf09c Formatted all Objective-C sources with clang-format. (#1133) 2017-01-05 10:17:24 -05:00
Justin Shephard
7a19483569 [ReadMes] - First image of each component is too big (#1110)
* MDC_#917 - Activity Indicator Readme Update

* MDC_#917 - Updated remaining readme image links

* MDC_#917 - Fixed typo
2016-12-27 14:16:55 -05:00
Adrian Secord
e8c45d5394 Removed old refs to API docs. (#1084)
* Removed old refs to API docs.

* Removed outdated refs to API docs.
2016-12-15 15:35:13 -05:00
ianegordon
0f422df49a [Typography] Remove Font Loaders (#1035)
* [Typography] Remove Font Loaders

* Unit test cleanup

* Update storyboards
2016-12-13 23:37:19 -05:00
Junius Gunaratne
1696df81a3 Update ShadowElevation and ShadowLayer examples in README.md to Swift 3 (#1041)
* Update to ShadowElevation example in README.md to Swift 3

* Update Shadow Layer read me to Swift 3

* Update Swift syntax

* Update swift syntax
2016-12-13 17:45:11 -05:00
ianegordon
2c353f82c2 [ShadowLayer] Add NSCoder support. (Mark 2) (#1045)
* [ShadowLayer] Add NSCoding support

* [ShadowLayer] Add NSCoding support

* [ShadowLayer] Add encode/decode test

* Add commonInit

* Remove initWithLayer pending further investigation

* Add TODO.  Cleanup.

* [ShadowLayer] Add TODO #1021
2016-12-13 17:44:52 -05:00
Ian Gordon
e1f886db71 Revert "[ShadowLayer] Initial NSCoding support (#987)"
This reverts commit 4af729a8f3249f6d0511d97cce67a0edd7737747.
2016-12-13 17:18:49 -05:00
ianegordon
4af729a8f3 [ShadowLayer] Initial NSCoding support (#987)
* [ShadowLayer] Add NSCoding support

* Cut release candidate.

* Fixed double/CGFloat conversion error and formatting in MDCFlexibleHeaderView.m.

* Undid CGFloat cast for one property.

* Removed pod install and build cleaning from the build-all script.

* Added a "test_all" script.

* Added component changes.

* Fixed scripts/release/diff.

* Added API diffs.

* Fixed bump usage of manage_pods.

* Bumped version to 17.2.0.

* Added release version to CHANGELOG.md.

* [HeaderStackView] - Added IB_Designable, NSCoding support, swift example (#983)

* [NavigationBar] - Added NSCoding support (#985)

* Podfile.lock

* Fixed double/CGFloat conversion error and formatting in MDCFlexibleHeaderView.m.

* Bumped version to 17.2.0.

* [ShadowLayer] Add NSCoding support

* Podfile.lock

* FHV from develop

* [ShadowLayer] Add encode/decode test

* Add commonInit

* Remove initWithLayer pending further investigation

* Add TODO.  Cleanup.

* [ShadowLayer] Add TODO #1021
2016-12-13 17:15:08 -05:00
Adrian Secord
e93a16ca02 Capitalize "Material" in documentation (#1014)
* s/material design/Material Design/g

* s/material components/Material Components/g

* s/material\([ \t\n]\)/Material\1/g

* s/aterial design/aterial Design/g
2016-12-13 08:06:55 -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
Will Larche
1080e89422 [Documentation] Putting Swift snippets before Objc (#960)
* [ActivityIndicator] Swift first in README

* [AnimationTiming] Swift first in readme.

* [AppBar] Swift first in readme.

* [ButtonBar] Swift first in readme.

* [Buttons] Swift first in readme.

* [CollectionLayoutAttributes] Swift first in readme

* [Collections] Swift first in readme.

* [Dialogs] Swift first in readme.

* [FeatureHighlight] Swift first in readme.

* [FlexibleHeader] Swift first in readme.

* [FontDiskLoader] Swift first in readme.

* [HeaderStackView] Swift first in readme.

* [Ink] Swift first in readme.

* [NavigationBar] Swift first in readme.

* [OverlayWindow] Adding missing site comments. Swift first in readme.

* [PageControl] Swift first in readme.

* [Palettes] Swift first in readme.

* [ProgressView] Swift first in readme.

* [RobotoFontLoader] Swift first in readme.

* [ShadowElevations] Swift first in readme.

* [ShadowLayer] Swift first in readme.

* [Slider] Swift first in readme.

* [Snackbar] Swift first in readme.

* [SpritedAnimationView] Swift first in readme.

* [Switch] Swift first in readme.

* [Typography] Swift first in readme.

* [ShadowLayer] Reducing font size in readme.

* [Switch] Reducing font size in readme.
2016-12-07 10:31:34 -05:00
ianegordon
d8df058280 [Shadows] Scrub comments (#948)
* [Shadows] Scrub comments

* Mystery solved
2016-12-05 14:52:46 -05:00
Adrian Secord
850faf828b Fix .png and .mp4 file names to match scripts/check_components (#946)
* Fixed FeatureHighlight screenshot.

* Fixed NavigationBar.

* Fixed ShadowLayer.

* Fixed SpritedAnimationView.
2016-12-05 12:22:20 -05:00
Louis Romero
e7198c41e3 Fix the hero video appearance in GitHub. (#916)
* Comment image

* Handle site vs GitHub distinction. Also updates the alt texts to match the component.
2016-12-01 12:52:26 -05:00
Will Larche
5ca7c0bcf8 [Readme] Removing dead link in components. 2016-11-30 13:32:06 -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
Ian Gordon
f1b983465f Documentation Updates
Reviewers: O1 Material components iOS!, willlarche

Reviewed By: willlarche

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1714
2016-10-17 12:14:33 -04:00
Simon Forsyth
0b2b4feec8 Fix calculation of masks for the shadows. (#698)
Corner radius and shadow paths are set by the user on the parent, not the sublayers, and so those values need to be used in calculating the masks, not the values for the sublayer.

Before: https://screenshot.googleplex.com/MDS5fCKiJCy.png
After: https://screenshot.googleplex.com/ruzm32zwYRj.png
2016-09-21 15:01:22 -04:00
Will Larche
7a4c71801f Api docs links were broken in READMEs
Summary:
[Site] Api docs in README files are now explicit.
closes https://github.com/google/material-components-ios/issues/690

Reviewers: O1 Material components iOS, shepj

Reviewed By: O1 Material components iOS, shepj

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1552
2016-08-29 18:31:23 -04:00
Sam Morrison
592ce9d54d Small MDCShadowLayer fixes
Summary:
`renderInContext:`
This was broken for a number of reasons. This method generally doesn't need to be overriden, and calling it once will call renderInContext on all child layers. If you need to lay out a layer before using `renderInContext` you should also call `layoutIfNeeded`. Setting the `backgroundColor` on the MDCShadowLayers unfortunately did not cause them to render and would be incorrect anyway.

Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1526
2016-08-25 16:53:12 -04:00
Justin Shephard
f53506ea28 Site_Readme_Links - Added Jekyll conditional with links to site/github documentation
Summary:
Merge branch 'develop' into Site_Readme_Links

Site_Readme_Links - Change of variable name

Site_Readme_Links - Spelling correction on FontDiskLoader

Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Subscribers: randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1507
2016-08-23 10:54:23 -04:00
Justin Shephard
685ea43198 MDC_#546 - Start of separation of README.md and yaml
Summary: Created separate README.md and README.yaml files to remove the odd display of the md in GitHub.

Reviewers: O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1496
2016-08-18 16:55:20 -04:00
Sean O'Shea
bee2af6211 Removing the last few remaining references to using id as a return type (#671)
for initializers.
2016-08-16 12:08:31 -04: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
Ian Gordon
56a519186f Add additional detail clarifying the difference between CALayer.zPosition
and MDCShadowLayer.elevation.

Fixes MDC97.

Reviewers: featherless, O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1333
2016-07-26 11:35:52 -04:00