-
Notifications
You must be signed in to change notification settings - Fork 947
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
134 changed files
with
1,982 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,3 @@ | ||
Want to contribute? Great! First, read this page (including the [small print](#the-small-print)). | ||
Please see [contributing page](./contributing/README.md) for more information. | ||
|
||
## Pull requests | ||
|
||
Pull requests can be hard to review if they try to tackle too many things | ||
at once. Phabricator's | ||
"[Writing Reviewable Code](https://secure.phabricator.com/book/phabflavor/article/writing_reviewable_code/)" | ||
provides a set of guidelines that help increase the likelihood of your | ||
pull request getting merged. | ||
|
||
In short (slightly modified from the original article): | ||
|
||
- A pull request should be as small as possible, but no smaller. | ||
- The smallest a pull request can be is a single cohesive idea: don't | ||
make pull requests so small that they are meaningless on their own. | ||
- Turn large pull requests into small pull requests by dividing large | ||
problems into smaller problems and solving the small problems one at | ||
a time. | ||
- Write sensible pull request descriptions. | ||
|
||
Our additions: | ||
|
||
- A pull request should affect as few components as possible. | ||
- Pull requests must include a modification to the CHANGELOG.md summarizing the | ||
change. | ||
|
||
### Conventions | ||
|
||
This repository follows a file layout convention that ensures consistency and | ||
predictability across all of our components. The conventions are described in | ||
the [GOS-conventions](https://github.com/google/GOS-conventions) repository. | ||
|
||
### Before you contribute | ||
|
||
Before we can use your code, you must sign the | ||
[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1) | ||
(CLA), which you can do online. The CLA is necessary mainly because you own the | ||
copyright to your changes, even after your contribution becomes part of our | ||
codebase, so we need your permission to use and distribute your code. We also | ||
need to be sure of various other things—for instance that you'll tell us if you | ||
know that your code infringes on other people's patents. You don't have to sign | ||
the CLA until after you've submitted your code for review and a member has | ||
approved it, but you must do it before we can put your code into our codebase. | ||
Before you start working on a larger contribution, you should get in touch with | ||
us first through the issue tracker with your idea so that we can help out and | ||
possibly guide you. Coordinating up front makes it much easier to avoid | ||
frustration later on. | ||
|
||
### Code reviews | ||
|
||
All submissions, including submissions by project members, require review. We | ||
allow pull requests to be filed, but we perform code reviews on codereview.cc. | ||
|
||
### The small print | ||
|
||
Contributions made by corporations are covered by a different agreement than | ||
the one above, the | ||
[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). | ||
|
||
# Component checklist | ||
|
||
This checklist describes the process by which Material components are built. | ||
|
||
## API review | ||
|
||
API reviews work like typical code reviews with the added constraint of only reviewing the | ||
component's **public APIs**. | ||
|
||
To initiate an API review, send a pull request that only includes the public APIs you wish to | ||
review. | ||
|
||
TODO(featherless): Flesh this out with some concrete examples of existing API reviews. | ||
|
||
## Minimize dependencies | ||
|
||
The work: avoid non-essential dependencies. | ||
|
||
The why: the team has had many discussions on this topic. Generally speaking, we use the following | ||
considerations as a basis for minimizing dependencies: | ||
|
||
- dependencies increase cost of maintenance and cost of usage for a component, and | ||
- dependency-less components are much easier to drop in and, most importantly, to remove from a | ||
project. | ||
|
||
[Reach out to the team directly](contributing/#questions) for advice or questions on this matter. | ||
|
||
Recommendations: | ||
|
||
- Aim for zero non-platform dependencies. | ||
- Reasonable exceptions can be made, but must be justified. | ||
- Do not create "Core" or "Utility" libraries. | ||
|
||
## Nullability annotations | ||
|
||
The work: add nullability annotations to every header of your component. | ||
|
||
The why: nullability annotations improve Swift usage of a component's APIs. | ||
[Learn more](https://developer.apple.com/swift/blog/?id=25) | ||
|
||
Recommendations: | ||
|
||
We **explicitly** annotate all public APIs rather than use `NS_ASSUME_NONNULL_BEGIN`. This is an | ||
intentional deviation from Apple’s practice of using the `ASSUME` macros. | ||
|
||
Further reading: | ||
|
||
- http://nshipster.com/swift-1.2/#nullability-annotations | ||
Github directs to this page when you create an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb' | |
|
||
Pod::Spec.new do |s| | ||
s.name = "MaterialComponents" | ||
s.version = "12.2.0" | ||
s.version = "13.0.0" | ||
s.authors = { 'Apple platform engineering at Google' => '[email protected]' } | ||
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." | ||
s.homepage = "https://github.com/google/material-components-ios" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "MaterialComponentsCatalog" | ||
s.version = "12.2.0" | ||
s.version = "13.0.0" | ||
s.authors = { 'Apple platform engineering at Google' => '[email protected]' } | ||
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." | ||
s.homepage = "https://github.com/google/material-components-ios" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "MaterialComponentsUnitTests" | ||
s.version = "12.2.0" | ||
s.version = "13.0.0" | ||
s.authors = { 'Apple platform engineering at Google' => '[email protected]' } | ||
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." | ||
s.homepage = "https://github.com/google/material-components-ios" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.