Skip to content

Commit

Permalink
chore(switch): Merge master into feat/switch-update (#3215)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlfriedman authored Jul 25, 2018
1 parent 4584f00 commit 6d61cb9
Show file tree
Hide file tree
Showing 83 changed files with 3,210 additions and 1,732 deletions.
19 changes: 10 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ matrix:
- node_js: 8
env:
- TEST_SUITE=screenshot
git:
depth: 200
script: npm run screenshot:test -- --no-fetch
before_install:
# Source the script to run it in the same shell process. This ensures that any environment variables set by the
# script are visible to subsequent Travis CLI commands.
# https://superuser.com/a/176788/62792
- source test/screenshot/infra/commands/travis.sh
install:
- rm -rf node_modules
- npm install
#- npm ls # Noisy output, but useful for debugging npm package dependency version issues
before_install:
# Source the script to run it in the same shell process. This ensures that any environment variables set by the
# script are visible to subsequent Travis CLI commands.
# https://superuser.com/a/176788/62792
- source test/screenshot/infra/commands/travis.sh
install:
- npm install
#- npm ls # Noisy output, but useful for debugging npm package dependency version issues
98 changes: 46 additions & 52 deletions demos/list.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demos/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@import "../packages/mdc-form-field/mdc-form-field";
@import "../packages/mdc-list/mdc-list";
@import "../packages/mdc-ripple/mixins";
@import "../packages/mdc-typography/mixins";

a.material-icons {
text-decoration: none;
Expand Down
6 changes: 3 additions & 3 deletions demos/switch.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ <h2>Enabled</h2>
<div class="mdc-switch__track"></div>
<div class="mdc-switch__thumb-underlay">
<div class="mdc-switch__thumb">
<input type="checkbox"
id="basic-switch-custom"
class="mdc-switch__native-control"
<input type="checkbox"
id="basic-switch-custom"
class="mdc-switch__native-control"
role="switch" checked>
</div>
</div>
Expand Down
15 changes: 15 additions & 0 deletions demos/typography.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
padding: 24px;
border: 1px solid #ddd;
}

.demo-typography--heading-baseline {
margin-left: 24px;
}
</style>
</head>
<body class="mdc-typography">
Expand Down Expand Up @@ -77,6 +81,17 @@ <h6 class="mdc-typography--subtitle2">Subtitle 2</h6>
<div><span class="mdc-typography--overline">Overline text</span></div>

</section>

<h6 class="mdc-typography--headline6 demo-typography--heading-baseline">Baseline</h6>
<section class="demo-typography--section-baseline">
<h2 class="demo-typography__title mdc-typography--headline6">Our Changing Planet</h2>
<h3 class="demo-typography__subtitle mdc-typography--subtitle2">by Kurt Wagner</h3>
<div class="demo-typography__body mdc-typography--body2">Visit ten places on our planet that are undergoing the biggest changes today.</div>

<line class="demo-typography-line-1">+34px</line>
<line class="demo-typography-line-2">+22px</line>
<line class="demo-typography-line-3">+28px</line>
</section>
</main>
</body>
</html>
53 changes: 53 additions & 0 deletions demos/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,56 @@
//

@import "./common";
@import "../packages/mdc-typography/mixins";

$ruler-color: #FD2549;

.demo-typography--section-baseline {
position: relative;
margin: 24px;
padding: 0 24px 24px 24px;
border: 1px solid #ddd;
max-width: 350px;
}

.demo-typography__title {
@include mdc-typography-baseline-top(34px);
@include mdc-typography-baseline-bottom(22px);
}

.demo-typography__subtitle {
@include mdc-typography-baseline-top(22px);
@include mdc-typography-baseline-bottom(28px);

@include mdc-theme-prop(color, text-secondary-on-background);
}

.demo-typography__body {
@include mdc-typography-baseline-top(28px);
@include mdc-theme-prop(color, text-secondary-on-background);
}

.demo-typography-line-1,
.demo-typography-line-2,
.demo-typography-line-3 {
position: absolute;
border-top: 1px solid $ruler-color;
width: 100%;
left: 0;
right: 0;
color: $ruler-color;
font-size: 10px;
text-align: right;
}

.demo-typography-line-1 {
top: 34px;
}

.demo-typography-line-2 {
top: calc(34px + 22px);
}

.demo-typography-line-3 {
top: calc(34px + 22px + 28px);
}
41 changes: 21 additions & 20 deletions docs/open_source/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,26 +128,13 @@ git commit -am "chore: Publish"

### For Pre-Releases and Patch Releases

Simply run the post-release script to update and commit the changelog and apply an annotated vX.Y.Z git tag:

```
./scripts/post-release.sh
```

Make sure that a CHANGELOG commit actually appears in your `git log`! If you need to retry the process:

```
git tag -d <tag> # Delete the tag that the script created
git reset --hard HEAD^ # Rewind to the previous commit
```

Alternatively, if you would like to be extra sure of the changelog, you can generate it manually prior to running the
post-release script, in which case it will skip `npm run changelog` and commit your local changes:
It's recommended to generate the changelog prior to running the post-release script so you can double-check the changes
before it creates a tag:

```
npm run changelog
git diff # Review the changelog and make sure it looks OK
./scripts/post-release.sh
./scripts/post-release.sh # This will commit the changelog diff and then create a tag
```

### For Minor Releases
Expand Down Expand Up @@ -188,13 +175,13 @@ You will need to temporarily alter Github's master branch protection in order to
1. Perform the process outlined in one of the sections below
1. Don't forget to re-enable "Include administrators" & click "Save changes" afterwards

### For Pre-releases and Feature/Breaking-Change Releases
### For Pre-releases and Minor Releases

`git push origin master && git push origin <tag>`

This will ensure the new commits *and* tag are pushed to the remote git repository.

### For Bugfix Releases
### For Patch Releases

`git push origin <tag>`

Expand All @@ -212,13 +199,27 @@ git push

## Update and Deploy Catalog Repository

We maintain a `next` branch on the MDC Web Catalog repository to keep ahead of breaking changes in new releases.
### For Patch Releases

1. Update the `material-components-web` dependency in the catalog's `package.json` to the new patch version
1. Run `npm start` and glance through the catalog pages to make sure everything looks normal
1. Send a PR for the dependency update, then run `npm deploy` once it's merged to master

### For Minor Releases

We typically maintain a `next` branch on the MDC Web Catalog repository which follows MDC Web pre-releases, to keep
ahead of breaking changes in new releases.

In the event no pre-releases were tagged, the above process for patch releases would be followed, but would require
checking for necessary updates to accommodate breaking changes in MDC Web.

Below is the process when a `next` branch is used:

1. Ensure you have the latest `master` checked out: `git checkout master && git pull`
1. Create a new branch, e.g.: `git checkout -b chore/0.36.0`
1. Merge `next` into the branch: `git merge next`
1. Deal with any conflicts if necessary
1. Update `package.json` to reference the newly-released final versions of MDC Web packages
1. Update `package.json` to reference the newly-released minor version of `material-components-web`
1. `rm -rf node_modules && npm i` to cause `package-lock.json` to update
1. `npm start` and test the catalog, in case any further breaking changes occurred since the last pre-release
1. `npm run build` to double-check that there are no unforeseen errors when building resources for deployment
Expand Down
Loading

0 comments on commit 6d61cb9

Please sign in to comment.