38 Commits

Author SHA1 Message Date
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
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
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -05:00
Yurii Samsoniuk
2a96682230 Replace unnecessary imports with forward declarations (#2429)
* [Themes] Remove unnecessary imports.

* [TextFields] Remove unnecessary imports.

* [Typography] Do not use an umbrella header inside of a component.

* [Snackbar] Do not use self umbrella header.

* [ActivityIndicator] Do not use self umbrella header.

* [AppBar] Use umbrella headers.

* [AppBar] Remove self import header.

* [ButtonBar] Removed self umbrella header imports.

* [Buttons] Removed self umbrella header imports.

* [Collections] Update imports.

* [Dialogs] Moved import into an m file.

* [Collections] Fixed imports.

* [FeatureHighlight] Removed self umbrealla imports.

* [HeaderStackView] Reordered imports.

* [Ink] Replaced imports with forward declarations.

* [Slider] Replaced self umbrella import use.

* [Snackbar] Removed self umbrella header import.

* [Tabs] Changed math import. Replaced self umbrella header import.

* [Icons] Removed unnecessary imports.

* [Overlay] Replaced umbrella header import.

* [ShapeLibrary] Replace Shapes imports with an umbrella header.

* [Shapes] Replaced imports with forward declarations.

* [AppBar] Replace import with a forward declaration.

* [Examples] Updated imports.

* Fixed conflicting imports

* Added space between different import categories
2017-11-16 18:25:06 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
Cody Weaver
a462a2ac4f [Mutliple components] Update components that use colors to use MDCPalette. (#2129)
* Update components that use colors to use MDCPalette.

* Update podspec to make palettes available to Collection Cell
2017-10-09 12:53:50 -04:00
Will Larche
96fb533554 [Catalog] Fixes improper use of Bundle and assets (#2118)
* [Catalog] Fixing bundle usage in some examples.

* [Examples] Correcting use of assets and bundles.

* [Examples] Formatting.
2017-10-08 15:04:48 -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
Junius Gunaratne
2873e798f2 [Themes] Add ability to change catalog theme (#1477)
Discussed merge with Ian offline. Issues with Travis CI may be resolved once the PR is merged.

* Add color to tiles.

* Add theming to catalog

* Update text field tile.

* Implementation method signatures should match those in header.

* Update MDCDrawFunc typedef

* Pass color scheme through NSNotification

* Add component theming

* Add tabbar themer

* Update tab example to use UIAppearance

* Theme sliders based on UIAppearance proxy

* Allow any class conforming to MDCColorScheme

* Override navigation bar color theme for imagery example.

* Update AppBar and ButtonBar color theming

* Update button bar themer comment

* Update button theming

* Remove theme imports where not necessary.

* Fix case of private
2017-06-23 11:36:48 -04:00
Will Larche
653aec06e9 [Site] Catalog colors (#1377)
* [Site] New screenshots

* [Catalog] Example styling.

* [Documentation] Readme image widths.
2017-05-05 16:27:32 -04:00
Alastair Tse
4a46c8c19e Monochromatic sweep of all catalog components (#1370)
* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* WIP: Updating TabBar example to use black/green theme.

* WIP: Monochoroming all examples.

* Switch MDC Catalog to a black and white theme (#1355)

* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Fix floats

* Make Catalog greyscale to match Material’s style.

* More black and whiting

* WIP: Snackbar and global style

* Simplify snack bar examples.

* Page control
2017-05-05 16:16:47 -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
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
Justin Shephard
2ebebab535 [HeaderStackView] - Added IB_Designable, NSCoding support, swift example (#983) 2016-12-08 14:45:26 -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
Justin Shephard
5c01be1f35 MDC_#391_Copy_Change - Made modifications to copy on limited number of controllers without a back button
Summary: Merge branch 'develop' into MDC_#391_Copy_Change

Reviewers: O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1374
2016-08-23 12:25: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
randallli
681cc2b6f7 [Docs] Replaced incorrect name of the product. Material Components *for* iOS
Summary:
s/material components ios/Material Components for iOS/
s/material components for ios/Material Components for iOS/

lint copy edit line length

Reviewers: ajsecord, O1 Material components iOS

Reviewed By: ajsecord, O1 Material components iOS

Subscribers: ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1372
2016-08-01 16:45:12 -07:00
Adrian Secord
65a05eed31 Lowercase "material design" in text.
Summary: "Material design" is not capitalized except when referring to the actual Material Design team at Google.

Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Subscribers: randallli, featherless

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1306
2016-07-25 14:13:08 -04:00
Adrian Secord
3aedace959 Re-enabled 100-character line limit.
Reviewers: randallli, O1 Material components iOS

Reviewed By: randallli, O1 Material components iOS

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D965
2016-06-13 13:34:57 -04:00
Louis Romero
e413820f83 [NavigationBar] Use leading/trailing wording in NavigationBar.
Summary:
Partially addresses https://github.com/google/material-components-ios/issues/515

It deprecates MDCNavigationBar APIs that used left/right.

Test Plan:
NavigationBar should not have its APIs using left/right lingo. Instead it
should use leading/trailing.

Note that as of this writing, this doesn't address RTL Layout per se. It merely
prepares for layout changes.

Reviewers: featherless, iangordon, O1 Material components iOS, #mdc_ios_owners, ajsecord

Reviewed By: O1 Material components iOS, #mdc_ios_owners, ajsecord

Subscribers: ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D863
2016-05-23 22:24:01 +02:00
Jeff Verkoeyen
b2639f397b Ran arc lint --everything --apply-patches.
Reviewers: #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D780
2016-04-27 14:59:05 -04:00
Junius Gunaratne
ed9c65c3d2 [Catalog] Fix color change issue in header stack view demo
Summary: Addresses https://github.com/google/material-components-ios/issues/383

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D748
2016-04-22 17:42:57 -04:00
Jeff Verkoeyen
a15bfbe35b Ran arc lint --everything --apply-patches.
Reviewers: #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D700
2016-04-21 10:24:52 -04:00
Junius Gunaratne
6206c48cb0 [Catalog] Add autoresize masks to header stack view demo for landscape orientation
Summary: Line formatting

Reviewers: #mdc_ios_owners, ajsecord, featherless

Reviewed By: #mdc_ios_owners, ajsecord, featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D663
2016-04-19 13:54:39 -04:00
Jeff Verkoeyen
03e0cdb057 [HeaderStackView] Rename mdc_theme.png to header_stack_view_theme.png.
Summary:
This is necessary because our example resources are contained in a "global" scope (the catalog), so all resource names must be unique.

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

Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D648
2016-04-18 17:15:42 -04:00
Junius Gunaratne
a147d7b359 [Catalog] Update AppBar demo design, table view should not have text
Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D640
2016-04-18 14:57:13 -04:00
Junius Gunaratne
cdc18fb8cc [Catalog] Update Header Stack View demo visuals, move layout code into supplemental
Summary: Screenshot http://codereview.cc/M23

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D624
2016-04-15 16:25:55 -04:00
Will Larche
2ab08f4133 [Catalog & Examples] Added navigationBar example in Swift (Supplemental POC) and corrected slight mistake in Catalog by Convention logic.
Summary: Merge branch 'develop' of https://github.com/google/material-components-ios into develop

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: ajsecord, featherless, #mdc_ios_owners

Subscribers: featherless, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D587
2016-04-13 14:56:49 -04:00
Junius Gunaratne
0411613c71 [Catalog] Demo selection screen updated with description and primary demo
Summary: Screenshot http://codereview.cc/M13

Reviewers: featherless, jstriegel, ajsecord, #mdc_ios_owners

Reviewed By: jstriegel, ajsecord, #mdc_ios_owners

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D514
2016-04-07 16:45:52 -04:00
Jeff Verkoeyen
61a895c5b1 [Catalog] Rename catalogHierarchy to catalogBreadcrumbs.
Reviewers: junius, #mdc_ios_owners

Reviewed By: junius, #mdc_ios_owners

Subscribers: junius

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D448
2016-04-01 12:40:17 -04:00
Adrian Secord
704f2a21aa Replaced [Foo new] with [[Foo alloc] init], per the style guide.
Reviewers: larche, #mdc_ios_owners

Reviewed By: larche

Subscribers: featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D421
2016-03-30 14:28:57 -04:00
Junius Gunaratne
b1abd0ece9 [Catalog] Update colors to blue branding color
Reviewers: ajsecord, #mdc_ios_owners, featherless

Reviewed By: #mdc_ios_owners, featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D335
2016-03-24 15:26:10 -04:00
Junius Gunaratne
90efa3fa07 [Catalog] Style and polish main component screen
Summary:
New component collection view screen. Uses generic spec colors.

Screen shot:
http://codereview.cc/M1

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D223
2016-03-08 16:11:46 -05:00
Jeff Verkoeyen
32acf6a953 [HeaderStackView] Add component.
Summary:
The MDCHeaderStackView class lays out a vertical stack of two views.

Both bars provided to this view must implement sizeThatFits and return their best-fit
dimensions.

# Layout Behavior

The layout behavior of the two bars is as follows:

topBar: top aligned, expands to fill all available vertical space not taken up by the bottomBar.
bottomBar: bottom aligned.

If no bottomBar is provided, top bar consumes the entire bounds of the stack view.

When resized, the top bar will shrink until it reaches its sizeThatFits dimensions.
If there is a bottom bar, then at this point the top bar will begin sliding off the top.
If there is no bottom bar, then at this point the top bar will stay put.

At no point in time will either the top or bottom bar shrink below their sizeThatFits height.

# sizeThatFits Behavior

sizeThatFits returns the fitted height for bottom bar if available, otherwise it returns the
fitted height for topBar. The width will be whatever width was provided.

Reviewers: randallli, ajsecord, #mdc_ios_owners

Reviewed By: randallli, ajsecord, #mdc_ios_owners

Subscribers: randallli, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D162
2016-03-01 13:04:33 -05:00