Skip to content

Commit 6cc9973

Browse files
authored
Merge pull request #556 from primer/release-10.9.0
Minor Release Tracking PR 10.9.0
2 parents 3fbaa64 + 36ae59c commit 6cc9973

File tree

70 files changed

+6826
-4756
lines changed

Some content is hidden

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

70 files changed

+6826
-4756
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
## Contributing
22

3-
[fork]: https://github.com/primer/primer/fork
4-
[pr]: https://github.com/primer/primer/compare
5-
[style]: https://styleguide.github.com/primer/principles/
6-
73
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
84

95
## Using the issue tracker
@@ -185,3 +181,7 @@ This section is targeted at maintainers of primer, to instruct them on the proce
185181
- [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
186182
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
187183
- [GitHub Help](https://help.github.com)
184+
185+
[fork]: https://github.com/primer/primer/fork
186+
[pr]: https://github.com/primer/primer/compare
187+
[style]: https://styleguide.github.com/primer/principles/
Lines changed: 18 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,27 @@
1-
import remark from 'remark'
2-
import parents from 'unist-util-parents'
3-
import select from 'unist-util-select'
4-
import findBefore from 'unist-util-find-before'
1+
import parseCodeBlocks from 'code-blocks/lib/fromString'
52
import htmlToReact from 'html-to-react'
6-
import parsePairs from 'parse-pairs'
7-
import React from 'react'
8-
import ReactDOMServer from 'react-dom/server'
9-
import {Octicon} from '../Octicon'
103

114
const htmlParser = new htmlToReact.Parser()
125

13-
const railsOcticonToReact = (html) => {
14-
// <%= octicon "tools" %> to <Octicon name="tools" />
15-
const octre = /<%= octicon[\(\s]["']([a-z\-]+)["'][^%]*%>/gi
16-
html = html.replace(octre, (match, name) => {
17-
return ReactDOMServer.renderToStaticMarkup(<Octicon name={name} />)
18-
})
19-
return html
20-
}
21-
22-
const parseBlockAttrs = (node, file) => {
23-
const pairs = node.lang.replace(/^html\s*/, '')
24-
const attrs = pairs.length ? parsePairs(pairs) : {}
25-
attrs.title = attrs.title
26-
|| getPreviousHeading(node)
27-
|| `story @ ${file}:${node.position.start.line}`
28-
node.block = attrs
29-
return node
30-
}
31-
32-
const nodeToStory = (node, file) => {
33-
const html = railsOcticonToReact(node.value)
34-
const {title} = node.block
6+
const blockToStory = block => {
357
return {
36-
title,
37-
story: () => htmlParser.parse(html),
38-
html,
39-
file,
40-
node,
8+
title: block.title,
9+
story: () => htmlParser.parse(block.value),
10+
block,
4111
}
4212
}
4313

44-
const getPreviousHeading = node => {
45-
const heading = findBefore(node.parent, node, 'heading')
46-
return (heading && !heading.used)
47-
? (heading.used = true, heading.children.map(c => c.value).join(''))
48-
: undefined
49-
}
50-
51-
export default req => {
52-
return req.keys()
53-
.filter(file => !file.match(/node_modules/))
54-
.reduce((stories, file) => {
55-
const content = req(file)
56-
const ast = parents(remark.parse(content))
57-
const path = file.replace(/^\.\//, '')
58-
return stories.concat(
59-
select(ast, 'code[lang^=html]')
60-
.map(parseBlockAttrs)
61-
.filter(({block}) => block.story !== "false")
62-
.map(node => nodeToStory(node, path))
63-
)
64-
}, [])
14+
export default function storiesFromMarkdown(req) {
15+
return req.keys().reduce((stories, file) => {
16+
const markdown = req(file)
17+
const path = file.replace(/^\.\//, '')
18+
const blocks = parseCodeBlocks(markdown, path)
19+
.filter(block => {
20+
// read: ```html *
21+
// skip: ```html * story="false"
22+
return block.lang === 'html' && block.info.story !== 'false'
23+
})
24+
.map(blockToStory)
25+
return stories.concat(blocks)
26+
}, [])
6527
}

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- 7
3+
- 8
44

55
env:
66
global:
@@ -23,7 +23,7 @@ after_success:
2323
deploy:
2424
# publish release candidates on release branches
2525
- provider: script
26-
script: script/release-candidate
26+
script: script/release-candidate --dry-run
2727
skip_cleanup: true
2828
on:
2929
branch: release*

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# 10.9.0
2+
#### :rocket: Enhancement
3+
* [#586](https://github.com/primer/primer/pull/586) Hiding .Counter component when it's empty.. ([@jonrohan](https://github.com/jonrohan))
4+
* [#545](https://github.com/primer/primer/pull/545) Simplify responsive utilities with $responsive-variants. ([@shawnbot](https://github.com/shawnbot))
5+
* [#557](https://github.com/primer/primer/pull/557) Add !important to [hidden]. ([@muan](https://github.com/muan))
6+
7+
#### :memo: Documentation
8+
* [#580](https://github.com/primer/primer/pull/580) Remove invalid button classes. ([@shawnbot](https://github.com/shawnbot))
9+
10+
#### :house: Internal
11+
* [#581](https://github.com/primer/primer/pull/581) Use code-blocks. ([@shawnbot](https://github.com/shawnbot))
12+
* [#530](https://github.com/primer/primer/pull/530) Adding user details to storybook publish script. ([@jonrohan](https://github.com/jonrohan))
13+
* [#579](https://github.com/primer/primer/pull/579) Upgrade to lerna@2.11, rebuild package-lock. ([@shawnbot](https://github.com/shawnbot))
14+
15+
#### Committers: 5
16+
- Jon Rohan ([jonrohan](https://github.com/jonrohan))
17+
- Mickaël Derriey ([mderriey](https://github.com/mderriey))
18+
- Mu-An Chiou ([muan](https://github.com/muan))
19+
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
20+
- Sophie Shepherd ([sophshep](https://github.com/sophshep))
21+
122
# 10.8.1
223
#### :bug: Bug Fix
324
* [#554](https://github.com/primer/primer/pull/554) Fixes peer dependency issues ([@emplums](https://github.com/emplums))

modules/primer-alerts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.9",
2+
"version": "1.5.10",
33
"name": "primer-alerts",
44
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
55
"homepage": "http://primer.github.io/",
@@ -33,7 +33,7 @@
3333
"publish": "../../script/notify success"
3434
},
3535
"dependencies": {
36-
"primer-support": "4.6.0"
36+
"primer-support": "4.6.1"
3737
},
3838
"keywords": [
3939
"alerts",

modules/primer-avatars/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.5.6",
2+
"version": "1.5.7",
33
"name": "primer-avatars",
44
"description": "Basic styles for user profile avatars.",
55
"homepage": "http://primer.github.io/",
@@ -30,7 +30,7 @@
3030
"publish": "../../script/notify success"
3131
},
3232
"dependencies": {
33-
"primer-support": "4.6.0"
33+
"primer-support": "4.6.1"
3434
},
3535
"keywords": [
3636
"avatars",

modules/primer-base/lib/normalize.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ progress {
8282

8383
template, /* 1 */
8484
[hidden] {
85-
display: none;
85+
display: none !important;
8686
}
8787

8888
/* Links

modules/primer-base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.7.4",
2+
"version": "1.8.0",
33
"name": "primer-base",
44
"description": "CSS to reset the browsers default styles",
55
"homepage": "http://primer.github.io/",
@@ -34,7 +34,7 @@
3434
"publish": "../../script/notify success"
3535
},
3636
"dependencies": {
37-
"primer-support": "4.6.0"
37+
"primer-support": "4.6.1"
3838
},
3939
"keywords": [
4040
"primer",

modules/primer-blankslate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.4.9",
2+
"version": "1.4.10",
33
"name": "primer-blankslate",
44
"description": "Blankslates are for when there is a lack of content within a page or section.",
55
"homepage": "http://primer.github.io/",
@@ -30,7 +30,7 @@
3030
"publish": "../../script/notify success"
3131
},
3232
"dependencies": {
33-
"primer-support": "4.6.0"
33+
"primer-support": "4.6.1"
3434
},
3535
"keywords": [
3636
"primer",

modules/primer-box/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.5.9",
2+
"version": "2.5.10",
33
"name": "primer-box",
44
"description": "A module for creating rounded-corner boxes with options for headers, lists, and footers.",
55
"homepage": "http://primer.github.io/",
@@ -30,7 +30,7 @@
3030
"publish": "../../script/notify success"
3131
},
3232
"dependencies": {
33-
"primer-support": "4.6.0"
33+
"primer-support": "4.6.1"
3434
},
3535
"keywords": [
3636
"primer",

0 commit comments

Comments
 (0)