80 Commits

Author SHA1 Message Date
Andrew Overton
8d8763ef71 [Multiple components] Audit recent docs changes, part 1
Closes https://github.com/material-components/material-components-ios/pull/10132

PiperOrigin-RevId: 345256835
2020-12-02 10:10:55 -08:00
Andrew Overton
91595a819a [Buttons] Replace Buttons documentation
This PR replaces the existing Buttons documentation with different Buttons documentation.

Closes https://github.com/material-components/material-components-ios/pull/9952

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/9952 from andrewoverton:buttons-docs 4f0b6761428a5efbb8676f71d49e5f8ed21b996b
PiperOrigin-RevId: 303727221
2020-03-30 06:28:59 -07:00
Jeff Verkoeyen
d11159f59c Internal change.
PiperOrigin-RevId: 303172030
2020-03-26 12:56:17 -07:00
Bryan Oltman
14c9d903cf
[Buttons] Deletes deprecated MDCFloatingButtonShapeThemer (#9746)
* [Buttons] Deletes deprecated MDCFloatingButtonShapeThemer

* Remove MDCFloatingButtonShapeThemer from tests

* Update docs

* clang
2020-02-18 10:12:36 -05:00
featherless
172cf73a40
[Buttons] Fix theming headers and copy. (#7236)
Fixed the headers throughout the content.

Adjusted the "typical use" copy to call out that MDCButtons should be initialized with alloc/init.

Follow-up to https://github.com/material-components/material-components-ios/issues/6592
2019-04-22 21:32:44 +03:00
featherless
0c175b46a3
[Buttons] Copy-edit the documentation. (#7206)
This change annotates the button Themer documentation as "to be deleted" and edits the copy for conciseness.

Closes https://github.com/material-components/material-components-ios/issues/6592
2019-04-22 18:56:32 +03:00
featherless
c8f3973d4a
[scripts] Fix relative link rewriting. (#7205)
Context is in the associated issue.

This affects the perl expression that prepends `docs/` to local urls. Specifically, it makes the perl expression only modify urls that link to a sibling markdown file composed of `\w` characters (e.g. `theming.md`). This is not perfect, but it addresses our needs for now. If/when we encounter other types of local urls that we can address them separately.

For now, this change fixes the incorrect behavior described in the associated bug.

Closes https://github.com/material-components/material-components-ios/issues/7203
2019-04-22 15:45:10 +03:00
featherless
8a8ddc94d7
[Buttons] Copy-edits on the theming documentation for clarity. (#7192)
Specifically:

- Removed a fair amount of duplicated text.
- Link to other articles where applicable.

Part of https://github.com/material-components/material-components-ios/issues/6592
2019-04-20 00:12:47 +03:00
Robert Moore
af00416ce3 [Buttons] Remove broken link. (#6518)
Fix the website job by removing a broken link.
2019-01-29 16:13:25 -05:00
Cody Weaver
2248b33aeb [Buttons] Update theming docs for theming extensions (#6467)
## Related links
* Related bug: #5772 
* Blocking PR: #6460 

## Introduction
The team has decided to pivot to theming extensions instead of _Themer_ objects. As we pivot we need to document how these new extensions work, for clients to use them.  This adds documentation for buttons with the new theming extensions.

_Note_ This is blocked by #6460 until that is resolved and merged then some of these links will not work.

## The problem
We don't have documentation on theming extensions for buttons.

## The fix
Add theming extension documentation for clients to see how we intend for them to use our new theming extensions within the button component.

## Remaining work
- [x] Add documentation for container scheme
- [ ] README updates for Buttons using Material Theming Extensions
- [x] README updates for Dialogs using Material Theming Extensions
2019-01-29 15:22:11 -05:00
Robert Moore
372d6b24f9
No longer using -init for Color Scheme. (#5734)
{MDC iOS} No longer using `-init` for Color Scheme.

Based on the discussions in go/mdc-ios-theming, we should not use the `-init` default initializer. Instead, we should use an explicit set of defaults.

Search regex: '\[\[MDCSemanticColorScheme alloc\] init\]'
2018-11-12 12:54:47 -05:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
Yarden Eitan
d7f566994a
[Docs] Adds the shape themer API to the supporting components using the doc generation (#5464)
This PR adds the shape theming API documentation using the doc generation script improvements that were added in PR #5463 .

To achieve this, I added into the .vars files of the supported components the missing variables, and ran the script `scripts/apply_all_templates`. Then I ran `scripts/generate_readme component` for the components that have been added the `shape-theming.md` file, so it is seen in the actual README.md of the component.

Specifically, Bottom Sheet was using the old method of documentation, and wasn't using the right generation method, so it's doc content was just copied to the right location to allow its generation to work well as well.

Closes #5319
2018-10-19 17:05:50 -04:00
Randall Li
3d665a45b8
Removed internal links from docs. (#4559) 2018-07-17 10:35:56 -04:00
Cody Weaver
4e7db26ccb Fix button README (#4547)
Remove the duplicate heading for the accessibility section of the README and remove the {a11y} tag.
Closes #4545
2018-07-13 13:55:18 -04:00
Cody Weaver
88dabcfac9 [Buttons] Make accessibility docs match other components (#4501)
[Buttons] Make accessibility docs match other components
2018-07-11 16:45:16 -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
Jeff Verkoeyen
f059a37d50 Avoid picking up class properties in the API table for READMEs. 2018-05-04 09:16:24 -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
0666763935
[Buttons] Add outlined button gif. (#3639) 2018-05-01 23:41:37 -04:00
featherless
91eca05769
[scripts] Ensure that asset urls are remapped when generating readmes. (#3640) 2018-05-01 23:39:10 -04:00
featherless
5ec3e78a50
[Buttons] Break the docs into separate articles and run the readme generator. (#3605) 2018-05-01 16:21:45 -04:00
featherless
c061444df2
[Buttons] Add floating action button documentation. (#3592)
This change also updates the button gifs to match the catalog style.

Pivotal story: https://www.pivotaltracker.com/story/show/157199233
2018-04-30 16:02:12 -04:00
featherless
7086086e50
[Buttons] Minor copy edits to the main readme. (#3589) 2018-04-30 13:52:10 -04:00
featherless
1766e1790f
[Buttons] Copy-edit pass of the readme. (#3587)
- Removes outdated documentation.
- Adds animations of text and contained buttons.
- Structures the documentation around "typical usage" and "customization".
- Theming is now documented as the most typical use.

Pivotal story: https://www.pivotaltracker.com/story/show/157119329
Closes https://github.com/material-components/material-components-ios/issues/3586
2018-04-30 13:42:57 -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
Yarden Eitan
6df22d2cd6
Update MaterialComponents podspec to separate extensions from component. Breaking change, please see description when sending out a new release (#2748)
* [Catalog] Update catalog readme to reflect podspec filename change

* upate podspec

* update spec to extension

* more specific dependency

* added documentation
2018-01-02 16:51:58 -05:00
Robert Moore
2d8333d7d8 [Buttons] Extended FAB (#2563)
* [Buttons] Remove .largeIcon shape from FloatingButton (#2513)

The LargeIcon shape is not required, since the same behavior (support
for 36-point images) can be achieved by setting the contentEdgeInsets to
.zero.

Also updates one of the button examples to use a 36-point icon.

* [Buttons] Add extended FAB layout code (#2528)

Creating (internal for now) the required properties and layout code to support
the extended FAB. Unit tests to confirm the behavior and some minor
adjustments to existing values like default contentEdgeInsets values.

Implements #2495

* [Buttons] Expose Extended FAB properties (#2543)

Making the new properties public and also migrating away from simple
property setters to the new forShape:inMode: setters required for
UIAppearance support.

* minimumSize
* maximumSize
* contentEdgeInsets
* hitAreaInsets

Implements #2495

* [Buttons] Add basic Floating Button example (#2554)

Includes automatic adjustment of extended/normal layout depending on size
classes.

Demonstrates #2495

* [Buttons] Update README for Extended FAB (#2561)

The README includes usage examples for the FAB. Adding a section to
demonstrate how to configure the FAB in its different shapes and modes.

Documents #2495
2017-12-04 12:55:55 -05:00
Martin Petrov
3762aecee3 use modern selectors (#2207) 2017-10-17 10:29:14 -04:00
Adrian Secord
fb32dccf2d Replace usage of new with alloc init to match the style guide. (#2033)
https://github.com/google/styleguide/blob/gh-pages/objcguide.md#avoid-new
2017-09-25 10:46:44 -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
Randall Li
d7cf7999ed [Buttons, Page Control, Typography] Removed video demos (#1387)
* removed link to videos

* deleted videos
2017-05-05 16:58:17 -04:00
Randall Li
d48a3dae3e [Buttons, Page Control, Typography] Fixed screenshots (#1380)
* Fixed screenshots

* fixed readme.md files for 375 width images instead of 320
2017-05-05 16:37:19 -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
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
Will Larche
3c4e905598 [Readmes] Snippets in Swift 3 (#1039)
* [ActivityIndicator] Snippets in Swift 3

* [AnimationTiming] Snippets in Swift 3.

* [AppBar] Snippets in Swift 3 and corrections to snippets.

* [ButtonBar] Snippets in Swift 3 and corrections to snippets.

* [ButtonBar] Removing TODO.

* [Buttons] Snippets in Swift 3.

* [Collections] Snippets in Swift 3 and snippet corrections.

* [CollectionLayoutAttributes] Snippets in Swift 3.

* [Dialogs] Snippets in Swift 3 and snippets corrections.

* [FeatureHighlight] Snippets in Swift 3 and snippets corrections.

* [FeatureHighlight] Missing import specification.

* [FlexibleHeader] Snippets in Swift 3 and snippet corrections.

* [Dialogs] Corrections to snippets.

* [HeaderStackView] Adding import specifier.

* [Ink] Snippets in Swift 3 and snippets corrections.

* [NavigationBar] Snippets in Swift 3.

* [NavigationBar] Removing TODO.

* [OverlayWindow] Snippets in Swift 3 and snippets corrections.

* [PageControl] Snippets in Swift 3 and snippet corrections.

* [OverlayWindow] Snippets in Swift 3 and snippet corrections.

* [Palettes] Snippets in Swift 3 and snippet corrections..

* [ProgressView] Snippets in Swift 3 and snippet corrections.

* [Readmes] Snippet alignment corrections.
2016-12-13 17:17:57 -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
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
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