Skip to content

Commit 8a1074a

Browse files
committed
Merge branch 'dev' into avatar-stack
2 parents c2a392f + 97b7264 commit 8a1074a

File tree

160 files changed

+2121
-698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2121
-698
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[fork]: https://github.com/github/primer/fork
44
[pr]: https://github.com/github/primer/compare
5-
[style]: http://primercss.io/guidelines/
5+
[style]: http://primer.github.io/guidelines/
66

77
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
88

@@ -59,16 +59,16 @@ Good pull requests—patches, improvements, new features—are a fantastic help.
5959

6060
### Updating Primer modules
6161

62-
Anyone can open a pull request on Primer CSS. You do not need to work at GitHub or be a member of the org to open a pull request.
62+
Anyone can open a pull request on Primer. You do not need to work at GitHub or be a member of the org to open a pull request.
6363

64-
1. Fork and clone [this repository](https://github.com/primer/primer-css).
64+
1. Fork and clone [this repository](https://github.com/primer/primer).
6565
2. Configure and install the dependencies: `npm install`
6666
3. Check out the dev branch `git checkout dev`
6767
3. Create a new branch from dev `git checkout -b my-branch-name`
6868
4. Make your changes and commit them.
6969
5. Push your branch and open a pull request against `dev`. Add a comment describing your proposed changes and request a review from `@primer/ds-core`.
7070
6. Wait for CI tests to finish.
71-
- If the tests pass, you should see a status check telling you which alpha version of primer-css you can install with npm to test your work in other projects.
71+
- If the tests pass, you should see a status check telling you which alpha version of primer you can install with npm to test your work in other projects.
7272
- If the tests fail, review the logs and address any issues.
7373
- If the builds fail for any other reason (as they occasionally do), they may need to be manually restarted.
7474
7. When CI tests pass, a new npm alpha release will be posted under the CI checks, you can use this npm version for testing in your project or with a GitHub site if you are staff.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
build
77
_site
88
*.lerna_backup
9+
.changelog

.storybook/Octicon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react'
22
import {storiesOf} from '@storybook/react'
33
import octicons from 'octicons'
4-
import SVGInline from 'react-svg-inline'
54

6-
const Octicon = (props) => {
5+
export const Octicon = (props) => {
76
const {name} = props
87
if (name in octicons) {
9-
return <SVGInline svg={octicons[name].toSVG(props)} />
8+
const svg = octicons[name].toSVG(props)
9+
return <span dangerouslySetInnerHTML={ {__html: svg } } />
1010
} else {
1111
throw new Error(`No such octicon: "${name}"!`)
1212
}

.storybook/config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react'
22
import { configure, addDecorator } from '@storybook/react'
33
import { setOptions } from '@storybook/addon-options'
4-
import '../modules/primer-css/index.scss'
4+
import '../modules/primer/index.scss'
55

66
setOptions({
77
name: 'Primer',
8-
url: 'http://primercss.io/',
8+
url: 'http://primer.github.io/',
99
showDownPanel: false,
1010
})
1111

@@ -16,7 +16,6 @@ addDecorator(story => (
1616
))
1717

1818
const contexts = [
19-
require.context('.', true, /\.js$/),
2019
require.context('../modules', true, /stories.*\.js$/),
2120
]
2221

.storybook/lib/storiesFromMarkdown.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@ import select from 'unist-util-select'
44
import findBefore from 'unist-util-find-before'
55
import htmlToReact from 'html-to-react'
66
import parsePairs from 'parse-pairs'
7+
import React from 'react'
8+
import ReactDOMServer from 'react-dom/server'
9+
import {Octicon} from '../Octicon'
710

811
const htmlParser = new htmlToReact.Parser()
912

13+
const railsOcticonToReact = (html) => {
14+
// <%= octicon "tools" %> to <Octicon name="tools" />
15+
const octre = /<%= octicon ["']([a-z\-]+)["'][^%]*%>/gi
16+
html = html.replace(octre, (match, name) => {
17+
return ReactDOMServer.renderToStaticMarkup(<Octicon name={name} />)
18+
})
19+
return html
20+
}
21+
1022
const nodeToStory = (node, file) => {
11-
const html = node.value
23+
const html = railsOcticonToReact(node.value)
1224
const element = htmlParser.parse(html)
1325
const pairs = node.lang.replace(/^html\s*/, '')
1426
const attrs = pairs.length ? parsePairs(pairs) : {}

.storybook/preview-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<link rel="stylesheet" href="https://unpkg.com/primer-css@9.2.0/build/build.css">
1+
<link rel="stylesheet" href="https://unpkg.com/octicons@7.0.1/build/build.css">
22
<script src="https://github.com/site/assets/styleguide.js" async></script>

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ env:
88
- secure: "EZewKKWQXmtCwPtYrPZq4OQblv2OyXR61qBIl3pOxGNVG2BCjD6VOgSaiYqkA9Qbt+ihfwQkiiLvTB68gbvRSiBFV9i+XLzKzt4S8CDI5RhTLAxZB3eQFVZRYzldchzWI4sdNhTvYS1kYXmsXQZD6vJmPSnFvOI/ddfzqvnNL4M="
99
# github
1010
- secure: "J+1oWjvvXjyrwkY/4IFWKdN/weFmQcPwlRuFG4R0Gb3rYe4nqtC9l68sJvmS8asc8dQMhOhcUZCH6sjvo7l2WD4NuK4umPSbs+rJNUsfbvH4pZjStQIj/3ll1OfQelGDWAYQWhIfciYY4F3Bp0ZWTfKOppLQ2AVIYu1fPVXDdlo="
11+
# github changelog
12+
- secure: "KcGydAqL7ryDh2rTJJB4wU8NE5BRtnrRXDEcPBScSscO3zFsHXHBDvvO04B/9hFVatXzGYXmkn+FZ0P9QikhvebzdwwyqUG2SKFiHhMvbX0m0WtAhn5NqDuKU1r5qy5YQ18r/tiLfC9GSAlEpfLAH58pwpcn8srV3Mn/yKvlrfs="
1113

1214
script:
1315
- npm test
1416

1517
after_success:
1618
# this will short-circuit the publish step if it fails to interpolate $NPM_API_KEY
1719
- npm config set "//registry.npmjs.org/:_authToken=\${NPM_API_KEY}"
18-
# copy the CHANGELOG.md primer-css for publishing
19-
- cp CHANGELOG.md modules/primer-css
20+
# copy the CHANGELOG.md primer for publishing
21+
- cp CHANGELOG.md modules/primer
2022
- script/after_success
2123

2224
deploy:

CHANGELOG.md

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
# 10.0.0 (2017-11-10)
2+
3+
#### :boom: Breaking Change
4+
* [#379](https://github.com/primer/primer-css/pull/379) Deprecating primer-cards and form-cards. ([@jonrohan](https://github.com/jonrohan))
5+
6+
#### :rocket: Enhancement
7+
* [#371](https://github.com/primer/primer-css/pull/371) Add .details-reset. ([@muan](https://github.com/muan))
8+
* [#375](https://github.com/primer/primer-css/pull/375) New utilities & docs - fade out, hover grow, border white fade, responsive positioning, and circle. ([@sophshep](https://github.com/sophshep))
9+
* [#383](https://github.com/primer/primer-css/pull/383) Add 'Popover' component. ([@brandonrosage](https://github.com/brandonrosage))
10+
* [#377](https://github.com/primer/primer-css/pull/377) Refactor underline nav. ([@ampinsk](https://github.com/ampinsk))
11+
* [#337](https://github.com/primer/primer-css/pull/337) Add marketing buttons to primer-marketing-buttons. ([@gladwearefriends](https://github.com/gladwearefriends))
12+
* [#342](https://github.com/primer/primer-css/pull/342) Import Subhead component. ([@shawnbot](https://github.com/shawnbot))
13+
* [#341](https://github.com/primer/primer-css/pull/341) Import branch-name component from github/github. ([@shawnbot](https://github.com/shawnbot))
14+
15+
#### :bug: Bug Fix
16+
* [#360](https://github.com/primer/primer-css/pull/360) Removing ::before ::after padding hack on markdown. ([@jonrohan](https://github.com/jonrohan))
17+
* [#320](https://github.com/primer/primer-css/pull/320) remove -webkit-text-decoration-skip override. ([@antons](https://github.com/antons))
18+
* [#359](https://github.com/primer/primer-css/pull/359) Change markdown li break to handle Safari 10.x user stylesheet bug. ([@feministy](https://github.com/feministy))
19+
* [#388](https://github.com/primer/primer-css/pull/388) [WIP] Button border-radius fix. ([@broccolini](https://github.com/broccolini))
20+
* [#307](https://github.com/primer/primer-css/pull/307) Do not suppress opacity transition for tooltipped-no-delay. ([@astorije](https://github.com/astorije))
21+
22+
#### :house: Internal
23+
* [#382](https://github.com/primer/primer-css/pull/382) Update Button docs. ([@JasonEtco](https://github.com/JasonEtco))
24+
* [#390](https://github.com/primer/primer-css/pull/390) Updating storiesFromMarkdown to read in rails octicons helper and replace with react component. ([@jonrohan](https://github.com/jonrohan))
25+
* [#389](https://github.com/primer/primer-css/pull/389) Publish alpha release any time we're not on a release branch or master. ([@jonrohan](https://github.com/jonrohan))
26+
* [#384](https://github.com/primer/primer-css/pull/384) Adding a test to check for the current year in the license and source…. ([@jonrohan](https://github.com/jonrohan))
27+
* [#374](https://github.com/primer/primer-css/pull/374) Improve Pull Request template. ([@agisilaos](https://github.com/agisilaos))
28+
29+
#### Committers: 13
30+
- Agisilaos Tsaraboulidis ([agisilaos](https://github.com/agisilaos))
31+
- Amanda Pinsker ([ampinsk](https://github.com/ampinsk))
32+
- Anton Sotkov ([antons](https://github.com/antons))
33+
- Brandon Rosage ([brandonrosage](https://github.com/brandonrosage))
34+
- Catherine Bui ([gladwearefriends](https://github.com/gladwearefriends))
35+
- Diana Mounter ([broccolini](https://github.com/broccolini))
36+
- Jason Etcovitch ([JasonEtco](https://github.com/JasonEtco))
37+
- Jon Rohan ([jonrohan](https://github.com/jonrohan))
38+
- Jérémie Astori ([astorije](https://github.com/astorije))
39+
- Mu-An ✌️ Chiou ([muan](https://github.com/muan))
40+
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
41+
- Sophie Shepherd ([sophshep](https://github.com/sophshep))
42+
- liz abinante! ([feministy](https://github.com/feministy))
43+
144
# 9.6.0
245

346
### Added
@@ -24,7 +67,7 @@
2467
- Add deprecation warnings for `primer-cards` and `primer-forms/lib/form-validation.scss` #347 (these will be removed in v10.0.0)
2568

2669
### Changes
27-
- Update npm metadata for `primer-css`, `primer-core`, `primer-product`, and `primer-marketing` #328
70+
- Update npm metadata for `primer`, `primer-core`, `primer-product`, and `primer-marketing` #328
2871
- Remove `HEAD` heading from the changelog #327
2972

3073
# 9.3.0
@@ -36,7 +79,7 @@
3679
## Changes
3780
- Removes `docs` from `gitignore`
3881
- Removes the `^` from all dependencies so that we can publish exact versions
39-
- Consolidates release notes from various sources into one changelog located in `/modules/primer-css/CHANGELOG.md`
82+
- Consolidates release notes from various sources into one changelog located in `/modules/primer/CHANGELOG.md`
4083

4184
# 9.2.0
4285

@@ -47,7 +90,7 @@
4790
## Changes
4891

4992
- Remove per-module configurations (`.gitignore`, `.postcss.json`, `.stylelintrc.json`) and `CHANGELOG.md` files in #284
50-
- Replace most static `font-size`, `font-weight`, and `line-height` CSS property values with their [SCSS variable equivalents](https://github.com/primer/primer-css/blob/c9ea37316fbb73c4d9931c52b42bc197260c0bf6/modules/primer-support/lib/variables/typography.scss#L12-L33) in #252
93+
- Replace most static `font-size`, `font-weight`, and `line-height` CSS property values with their [SCSS variable equivalents](https://github.com/primer/primer/blob/c9ea37316fbb73c4d9931c52b42bc197260c0bf6/modules/primer-support/lib/variables/typography.scss#L12-L33) in #252
5194
- Refactor CI scripts to use Travis conditional deployment for release candidate and final release publish steps in #290
5295

5396
# 9.1.1
@@ -94,7 +137,7 @@ This release also includes major improvements to our Travis build scripts to aut
94137

95138
We discovered that `primer-core` specified and outdated version of `primer-base` in it's dependencies. The outdated version did not have `normalize.scss` included which could cause some issues. This has issue occurred during v7.0.0 when creating the new monorepo. Also fixes repo urls in `package.json` for individual packages.
96139

97-
See PR [#243](https://github.com/primer/primer-css/pull/243)
140+
See PR [#243](https://github.com/primer/primer/pull/243)
98141

99142
## Changes
100143

@@ -139,7 +182,7 @@ See PR [#243](https://github.com/primer/primer-css/pull/243)
139182

140183
# 8.0.0 - Imports
141184

142-
Fixes issues with the ordering of imports in each of our meta-packages. See PR [#239](https://github.com/primer/primer-css/pull/239)
185+
Fixes issues with the ordering of imports in each of our meta-packages. See PR [#239](https://github.com/primer/primer/pull/239)
143186

144187

145188
## Changes
@@ -155,7 +198,7 @@ Fixes issues with the ordering of imports in each of our meta-packages. See PR [
155198

156199
# 7.0.0 - Monorepo
157200

158-
In an effort to improve our publishing workflow we turned Primer CSS into a monorepo, made this repo the source of truth for Primer by removing Primer modules from GitHub, and setup Lerna for managing multiple packages and maintaining independent versioning for all our modules.
201+
In an effort to improve our publishing workflow we turned Primer into a monorepo, made this repo the source of truth for Primer by removing Primer modules from GitHub, and setup Lerna for managing multiple packages and maintaining independent versioning for all our modules.
159202

160203
This is exciting because:
161204

@@ -164,7 +207,7 @@ This is exciting because:
164207
- we no longer have files like package.json, scripts, and readme's in the GitHub app that don't really belong there
165208
- **we can accept pull requests from external contributors** again!
166209

167-
See PR for more details on this change: https://github.com/primer/primer-css/pull/230
210+
See PR for more details on this change: https://github.com/primer/primer/pull/230
168211

169212
## Other changes:
170213

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 GitHub Inc.
3+
Copyright (c) 2017 GitHub Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
# Primer CSS
1+
# Primer
22

3-
[![npm version](http://img.shields.io/npm/v/primer-css.svg)](https://www.npmjs.org/package/primer-css)
4-
[![Build Status](https://travis-ci.org/primer/primer-css.svg?branch=master)](https://travis-ci.org/primer/primer-css)
3+
[![npm version](http://img.shields.io/npm/v/primer.svg)](https://www.npmjs.org/package/primer)
4+
[![Build Status](https://travis-ci.org/primer/primer.svg?branch=master)](https://travis-ci.org/primer/primer)
55

6-
Primer is the CSS framework that powers GitHub's front-end design. Primer CSS includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.
6+
Primer is the design system that powers GitHub. Primer includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.
77

88
## Packages
99

10-
The Primer CSS repo is managed as a monorepo that is composed of many npm packages.
10+
The Primer repo is managed as a monorepo that is composed of many npm packages.
1111

1212
### Core Packages
1313

1414
| Package | Version |
1515
|---|---|
16-
| **[primer-css](/modules/primer-css)** <br />Includes all 23 packages | [![npm](http://img.shields.io/npm/v/primer-css.svg)](https://www.npmjs.com/package/primer-css) |
16+
| **[primer](/modules/primer)** <br />Includes all 23 packages | [![npm](http://img.shields.io/npm/v/primer.svg)](https://www.npmjs.com/package/primer) |
1717
| [primer-core](/modules/primer-core) | [![npm](http://img.shields.io/npm/v/primer-core.svg)](https://www.npmjs.com/package/primer-core) |
1818
| [primer-product](/modules/primer-product) | [![npm](http://img.shields.io/npm/v/primer-product.svg)](https://www.npmjs.com/package/primer-product) |
1919
| [primer-marketing](/modules/primer-marketing) | [![npm](http://img.shields.io/npm/v/primer-marketing.svg)](https://www.npmjs.com/package/primer-marketing) |
2020

2121
## Install
2222

23-
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-css` with this command.
23+
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer` with this command.
2424

2525
```sh
26-
$ npm install --save primer-css
26+
$ npm install --save primer
2727
```
2828

2929
## Usage
3030

3131
The source files included are written in [Sass][sass] (SCSS). After [installing](#install) with npm, you can add your project's `node_modules` directory to your Sass [include paths](https://github.com/sass/node-sass#includepaths) (AKA [load paths](http://technology.customink.com/blog/2014/10/09/understanding-and-using-sass-load-paths/) in Ruby), then import it like this:
3232

3333
```scss
34-
@import "primer-css/index.scss";
34+
@import "primer/index.scss";
3535
```
3636

3737
You can import individual Primer modules by installing them with npm, for instance:
@@ -46,10 +46,10 @@ Then, you would import the module with:
4646
@import "primer-navigation/index.scss";
4747
```
4848

49-
Or, while you're figuring out which modules you need, you can import them directly from the `primer-css` [`packages` directory](./packages) like so:
49+
Or, while you're figuring out which modules you need, you can import them directly from the `primer` [`packages` directory](./packages) like so:
5050

5151
```scss
52-
@import "primer-css/modules/primer-navigation/index.css";
52+
@import "primer/modules/primer-navigation/index.css";
5353
```
5454

5555

@@ -70,7 +70,7 @@ You can read more about primer in the [docs][docs].
7070
[MIT](./LICENSE) &copy; [GitHub](https://github.com/)
7171

7272
[primer]: https://github.com/primer/primer
73-
[docs]: http://primercss.io/
73+
[docs]: http://primer.github.io/
7474
[npm]: https://www.npmjs.com/
7575
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
7676
[sass]: http://sass-lang.com/

0 commit comments

Comments
 (0)