195 Commits

Author SHA1 Message Date
featherless
1eee555258
Remove extension. (#4328)
It lives here now: https://github.com/material-foundation/github-squash-and-merge-pr-descriptions
2018-05-30 16:46:32 -04:00
featherless
34ad585cec
[scripts] Add a squash-and-merge Chrome extension. (#4313)
This extension will automatically populate the suggested squash-and-merge description with the pull request's description.

## Before

![before](https://user-images.githubusercontent.com/45670/40694806-1cd8d65a-638c-11e8-97ed-0aacc5949bd4.gif)

## After

![after](https://user-images.githubusercontent.com/45670/40694816-371ae7b0-638c-11e8-9a1b-961dee011410.gif)
2018-05-30 15:42:52 -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
featherless
56dfdbbc89
[kokoro] Add new apidiff CI command. (#4245)
This command will generate an API diff for the current pull request. In a follow-up PR it will also post the results of the API diff to the PR as a comment.

This is the first of two changes to the `apidiff` branch that will add support for API diff reporting to our PRs. The second PR will add the github comment reporting tool.

This was previously reviewed in https://github.com/material-components/material-components-ios/pull/4181.
2018-05-23 12:25:50 -04:00
featherless
dcc7561c28 [scripts/release] Add support for generating API diffs to an arbitrary sha. (#4164)
E.g. to generate an API diff from v54.0.0 to HEAD:

    ./scripts/release apidiff v54.0.0
2018-05-15 13:34:31 -04:00
Adrian Secord
17db9933ed Bumped version number to 55.0.3. 2018-05-04 18:39:00 -04:00
Jeff Verkoeyen
f059a37d50 Avoid picking up class properties in the API table for READMEs. 2018-05-04 09:16:24 -04:00
Adrian Secord
8cf0cb3e14 Update material.io/go/design-theming shortlink to material.io/go/design-color-theming. 2018-05-03 18:25:37 -04:00
featherless
5019be81da
[scripts] Add support for API list generation and improve the script's messages. (#3672)
./scripts/generate_readme will now generate the Design & API documentation section if desired.

Adding the following snippet to docs/README.md will result in the design & API links section being generated. This section is auto-generated from the jazzy API output and includes all classes, protocols, and enumerations. These links were a pain in the butt to add and maintain before, and now we don't have to 🎉.

```
<!-- design-and-api -->
```

Also updated the docs docs accordingly.

Also changed the order of operations so that articles are expanded inline and then pretty lists are generated. This will ensure that articles with pretty lists also get prettified.

---

## Example input (in ActivityIndicator)

```
<!-- design-and-api -->
```

## Example output

<ul class="icon-list">
  <li class="icon-list-item icon-list-item--spec"><a href="https://material.io/go/design-progress-indicators">Material Design guidelines: Progress & Activity</a></li>
  <li class="icon-list-item icon-list-item--link">Class: <a href="https://material.io/components/ios/catalog/progress-indicators/activity-indicators/api-docs/Classes/MDCActivityIndicator.html">MDCActivityIndicator</a></li>
  <li class="icon-list-item icon-list-item--link">Class: <a href="https://material.io/components/ios/catalog/progress-indicators/activity-indicators/api-docs/Classes/MDCActivityIndicatorTransition.html">MDCActivityIndicatorTransition</a></li>
  <li class="icon-list-item icon-list-item--link">Protocol: <a href="https://material.io/components/ios/catalog/progress-indicators/activity-indicators/api-docs/Protocols/MDCActivityIndicatorDelegate.html">MDCActivityIndicatorDelegate</a></li>
  <li class="icon-list-item icon-list-item--link">Enumeration: <a href="https://material.io/components/ios/catalog/progress-indicators/activity-indicators/api-docs/Enums/MDCActivityIndicatorMode.html">MDCActivityIndicatorMode</a></li>
</ul>
2018-05-02 22:31:59 -04:00
Jeff Verkoeyen
e2c611703a Update templates to match latest style changes. 2018-05-02 20:01:55 -04:00
Jeff Verkoeyen
31a29729c4 Extract component name from .vars when generating readme.
This fixes the generator for components that live in sub-directories.
2018-05-02 18:18:57 -04:00
featherless
91eca05769
[scripts] Ensure that asset urls are remapped when generating readmes. (#3640) 2018-05-01 23:39:10 -04:00
featherless
ed19233170
[scripts] Hide readmes from the site if the component has no path. (#3637)
This allows a component to exist in the repo but not in the website. This is helpful in the case of components that should be private but aren't.
2018-05-01 22:57:41 -04:00
featherless
b3fcaf1c8c
[scripts] Ignore #\w when extracting table of content headers. (#3611)
This ignores #pragma and #include statements.
2018-05-01 15:04:40 -04:00
featherless
18617943ab
[scripts] Implement a templatized readme generator. (#3601)
This PR adds a new script, `scripts/generate_readme`, which will generate a root README.md file for a component from the component's docs/ content.

The advantages of this script over our current process of writing readmes:

- Documentation articles can be broken out into separate files, making it easier to generate and apply templates.
- Our component readmes now have auto-generated table of contents.
- Our documentation can be written in plain markdown with minimal material.io html magic.
- Having docs in separate files doesn't result in multiple "component pages" on material.io - everything ends up in a single component document on the site. E.g. the "Color Theming" article no longer shows up as its own link on material.io.

Example usage:

```bash
./scripts/generate_readme ActivityIndicator
```

---

The script makes the following assumptions:

A component has the following directory structure:

```
components/
  Component/
    README.md <- The component's main readme.
                 This is the readme that will show up on material.io.
    docs/
      README.md       <- A skeletal readme with links to other docs files.
      some-article.md <- An article that may be linked to.
```

`components/Component/docs/README.md` is treated as a standard markdown file, with the additional interpretations:

```
* [Text](url)
Treated as an icon list for the material.io website.
If the url links to any go/design- url, the link will use the spec icon

- [Text](some-article.md)
Indicates that the linked article should be added verbatim to the main README.md

<!-- toc -->
A table of contents should be generated here.
```

The script then does the following:

1. Generates a template README from the component's .vars file.
2. Appends the component's docs/README.md to the readme.
3. Rewrites any asset and relative url paths.
4. Transforms all `* [text](link)`-formatted link lists into icon-list lists.
4b. If an icon list url points to a design site, the spec icon will be used for the list item.
5. Replaces every `- [text](link)`-formatted link list item with the contents of the file.
6. Generates a table of contents if `<!-- toc -->` is found. The table of contents will include all level 2 and 3 headers found after the toc tag.
7. Copies the output to the component's root README.md.

The implication of this script is that we can now write documentation as small files which are easier to templatize. These smaller files can be aggregated together into a single larger README.md that is consumable by the material.io website.

Example of table of contents on material.io:

<img width="460" alt="screen shot 2018-05-01 at 9 07 31 am" src="https://user-images.githubusercontent.com/45670/39473887-1fa6c85c-4d1f-11e8-8620-d6b151a315c6.png">
2018-05-01 14:24:29 -04:00
Adrian Secord
7a7293883f
Remove space after triple-backtick Markdown syntax. (#3577) 2018-04-29 09:00:53 -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
featherless
262c71a692
[scripts/apply_template] Ignore comments in .vars files. (#3558)
Lines prefixed with # will be ignored.
2018-04-27 12:12:08 -04:00
featherless
39d0de4055
Add initial doc templates for theming and a script for applying them. (#3555)
The added script allows a component to apply the template in an automated fashion.

```
Usage: ./scripts/apply_template <ComponentName> <path_to_.template_file>

Copies the template into the component directory and replaces all of the symbols defined
in the component's .vars file.

.vars files should be placed in the root of the component's directory.
Example: components/ActivityIndicator/.vars

Each line of the .vars file should be of the form symbol=replacement.
Example:
component=ActivityIndicator
component_name=Activity Indicator

This script will replace all instances of <#symbol#> in the .template with the given
replacement.

Example usage: ./scripts/apply_template ActivityIndicator scripts/templates/component/docs/ColorTheming.md.template
```
2018-04-27 11:29:28 -04:00
featherless
7ae31a6ba8
[kokoro] Add website generator command (#3541)
This will allow our PRs to generate the documentation website as part of our presubmits. This will let us catch any errors that might otherwise affect the ability for the website to be deployed.

This PR also updates the site generator's git url to an https one so that the kokoro instance can clone the repo.
2018-04-27 09:28:20 -04:00
Yarden Eitan
23a752db2c
[Catalog] One more icon needed for the menu in our catalog (#3492)
pivotal: https://www.pivotaltracker.com/story/show/156997977
2018-04-25 15:43:18 -04:00
Yarden Eitan
9a64164bed
[Catalog] Addition of Icons for our Catalog app settings menu (#3487)
pivotal: https://www.pivotaltracker.com/story/show/156997977
2018-04-25 15:02:29 -04:00
featherless
6ef33306a7
Add a stories command to the release tool. (#3296)
Generates a list of pivotal stories included in the release.
2018-04-09 13:42:18 -04:00
Randall Li
14c9041c12 [release script] Minor white space nit change (#3199)
the heading
## Component changes
had to many new lines after and to few new lines before.
2018-03-30 14:14:29 -04:00
Randall Li
c116344fd8
Release script: checking out stable before pushing to cocopods. (#3099)
Keeping the error log when the push fails.
2018-03-16 14:55:39 -04:00
Randall Li
0abff8eb58 Update release tool instructions to use command release notes (#3075)
* Update release tool instructions to use command `release notes`

* Update README-release.md
2018-03-09 16:59:30 -05:00
Adrian Secord
1969731cfe Fix version number updating. Fixes #2754. 2018-01-08 07:39:43 -05:00
Yarden Eitan
34ced9ee9a update our release script to support CocoaPods publishing (#2802)
* update release script to have a podspec push

* remove linting

* checking pod permission before, removing --allow-warnings
2018-01-05 16:52:42 -05:00
featherless
88a93244ab
Reduce error output from the bump command. (#2754)
The following changes were made:

- The global grep is now a non-regular expression search. This will avoid treating the version '.' as a wildcard.
- We ignore any of the bazel output directories.
- We pipe stderr to null so that invalid directories don't appear in the output.
2017-12-22 11:02:11 -05:00
Randall Li
fe88c3dfb0 [Release] Make release test not check for release-candidate (#2758)
Release instructions ask us to run it after we have merged.

https://github.com/material-components/material-components-ios/blob/develop/contributing/releasing.md#merge-the-release-candidate-branch

We also may want to just test without having created a release candidate.
2017-12-22 10:30:16 -05:00
Jeff Verkoeyen
a0ba8ed55a Fix minor typos in the release publish command. 2017-12-12 10:54:13 -05:00
Jeff Verkoeyen
fb90cb8acc Remove references to scripts/release/ paths. 2017-12-11 13:45:18 -05:00
Jeff Verkoeyen
1663ee2edc Update the Material Motion API diff tool checkout. 2017-12-11 12:50:48 -05:00
Jeff Verkoeyen
d45978aff1 Fix one more minor typo in the release scripting. 2017-12-11 12:48:41 -05:00
Jeff Verkoeyen
f86fa7b2b6 Fix bug where scripts/release cut wouldn't extract the API diff changes file properly.
It was extracting a string with a leading space - this is no longer the case.
2017-12-11 12:45:34 -05:00
featherless
98338f58cc
Migrate Material Motion's release toolchain to MDC (#2627) 2017-12-11 10:17:48 -05:00
Adrian Secord
6da7d0af51
[LibraryInfo] Fix version numbers for statically-compiled components. (#2544)
* Switched to hard-coded version string.

* Updating to current version and clarifying comments.

* Updated bump script to update LibraryInfo source version.

* Added actual replacement to bump script.

* Documented constants, changed version file name to a path.

* Fixed single-value tuple issue.

* Added note about string copy.
2017-11-30 14:25:27 -05:00
Adrian Secord
f5d3e30844
Move source of truth for version numbers outside of Cocoapods (#2442)
* Added VERSION, scripts/print_version, and updated docs.

* Updating script.

* Stop invoking `pod install` after the first time.

* Remove unneeded `pod install` steps.

* Added ref to print_version.

* Updated instructions in contributing/releasing.md.
2017-11-16 07:52:36 -05:00
Yurii Samsoniuk
d18cb18174 Added a script to check that umbrella header are used between components (#2241) 2017-10-25 18:50:56 -04:00
Adrian Secord
5f8d94f1bb Merge branch 'release-candidate' 2017-10-05 15:59:09 -04:00
featherless
c4160415f0 Add authors release script. (#2101)
Dumps the list of authors involved in a given release.
2017-10-05 14:57:15 -04:00
Adrian Secord
8f2e5bf821 80-character limit. 2017-10-03 15:24:25 -04:00
Adrian Secord
8637620eb2 Fix prep_all script to not update the CocoaPods repo in each directory. 2017-10-03 15:21:59 -04:00
featherless
286adf335c Use not instead of ! in manage_pods.py. (#2082) 2017-10-03 09:32:33 -04:00
featherless
d7a7e9a524 Default CocoaPods install to update the pods repo. (#2081)
CocoaPods updated their default install behavior some time ago to not update the pods repo, but our pods management script still appeared to be assuming that it did update the repo. This change inverts our pod install logic so that it updates the spec repo by default.

This resolves some Travis CI failures we've seen when downstream pod releases get published but not picked up by the Travis CI instance's pre-imaged pods repo.
2017-10-03 09:01:36 -04:00
Adrian Secord
5445fb2110 [Scripts] Add readme metadata config check (#1775)
* Added script to list the directories of our components.

* Add check for metadata to the readme check.

* Improved the output format for `list_components` on the terminal.

* Switched `check_components` script to use `list_components`.

* Update list_components
2017-08-11 10:02:19 -04:00
Robert Moore
87f57ae554 [Scripts] Only lint catalog, components, and demos (#1744)
The lint_all script should stick to the MDC-iOS code and not the docs,
scripts, etc. that are included in the repository.  Specifically, we are
only linting the Components, Catalog, and Demos that we ship.

Closes #1578
2017-08-07 12:27:10 -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
Will Larche
cf6da2e8c9 [Testing] Travis testing devices updates. (#1595)
* [Testing] Updating test_all for multiple devices.

* [Testing] Setting Travis device matrix to use a 32-bit device.

* [Testing] Comments in Travis file.

* [Testing] Bumping Travis testing 'latest' version to 10.3.

* [Testing] Correcting Travis device target.
2017-07-05 14:40:45 -04:00
Adrian Secord
508deb4262 Modified scripts/test_all to use latest simulator available. (#1559) 2017-06-29 13:33:23 -04:00