Skip to content

Commit ae5141a

Browse files
author
Emily
authored
Merge pull request #483 from primer/release-10.5.0
Primer release 10.5.0
2 parents e9b7606 + 2064c1b commit ae5141a

File tree

69 files changed

+629
-259
lines changed

Some content is hidden

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

69 files changed

+629
-259
lines changed

.storybook/lib/storiesFromMarkdown.js

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,22 @@ const railsOcticonToReact = (html) => {
1919
return html
2020
}
2121

22-
const nodeToStory = (node, file) => {
23-
const html = railsOcticonToReact(node.value)
24-
const element = htmlParser.parse(html)
22+
const parseBlockAttrs = (node, file) => {
2523
const pairs = node.lang.replace(/^html\s*/, '')
2624
const attrs = pairs.length ? parsePairs(pairs) : {}
27-
const title = attrs.title || getPreviousHeading(node) ||
28-
`story @ ${file}:${node.position.start.line}`
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
2935
return {
3036
title,
31-
story: () => element,
32-
attrs,
37+
story: () => htmlParser.parse(html),
3338
html,
3439
file,
3540
node,
@@ -44,14 +49,17 @@ const getPreviousHeading = node => {
4449
}
4550

4651
export default req => {
47-
return req.keys().reduce((stories, file) => {
48-
const content = req(file)
49-
const ast = parents(remark.parse(content))
50-
const path = file.replace(/^\.\//, '')
51-
return stories.concat(
52-
select(ast, 'code[lang^=html]')
53-
.map(node => nodeToStory(node, path))
54-
.filter(({attrs}) => attrs.story !== "false")
55-
)
56-
}, [])
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+
}, [])
5765
}

.storybook/webpack.config.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const path = require("path");
1+
const path = require('path');
22

3-
const modulesPath = path.resolve(__dirname, "../modules")
3+
const modulesPath = path.resolve(__dirname, '../modules')
44

55
module.exports = (config, env) => {
66

@@ -9,26 +9,34 @@ module.exports = (config, env) => {
99
.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
1010
}
1111

12-
config.module.rules.push(
13-
{
14-
test: /\.md$/,
15-
use: "raw-loader",
16-
},
12+
const rules = config.module.rules
13+
14+
rules.forEach((rule, index) => {
15+
if ('README.md'.match(rule.test)) {
16+
// console.warn('replacing MD rule:', rule)
17+
rules.splice(index, 1, {
18+
test: /\.md$/,
19+
loader: 'raw-loader',
20+
})
21+
}
22+
})
23+
24+
rules.push(
1725
{
1826
test: /\.scss$/,
1927
loaders: [
20-
"style-loader",
21-
"css-loader",
28+
'style-loader',
29+
'css-loader',
2230
{
23-
loader: "postcss-loader",
31+
loader: 'postcss-loader',
2432
options: {
2533
config: {
26-
path: require.resolve("./postcss.config.js"),
34+
path: require.resolve('./postcss.config.js'),
2735
},
2836
},
2937
},
3038
{
31-
loader: "sass-loader",
39+
loader: 'sass-loader',
3240
options: {
3341
includePaths: [
3442
modulesPath,

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# 10.5.0
2+
3+
#### :rocket: Enhancement
4+
* [#487](https://github.com/primer/primer/pull/487) Import Pagination Component. ([@emplums](https://github.com/emplums))
5+
* [#474](https://github.com/primer/primer/pull/474) Add text-mono utility class. ([@emplums](https://github.com/emplums))
6+
* [#456](https://github.com/primer/primer/pull/456) Adding height-fit utility class. ([@jonrohan](https://github.com/jonrohan))
7+
8+
#### :bug: Bug Fix
9+
* [#465](https://github.com/primer/primer/pull/465) Fix Popover--right-bottom caret positioning. ([@shawnbot](https://github.com/shawnbot))
10+
* [#458](https://github.com/primer/primer/pull/458) Fix broken pointer from packages to modules. ([@tysongach](https://github.com/tysongach))
11+
12+
#### :memo: Documentation
13+
* [#486](https://github.com/primer/primer/pull/486) Documenting the text-inheritance color utility. ([@jonrohan](https://github.com/jonrohan))
14+
* [#481](https://github.com/primer/primer/pull/481) Styleguide Polish. ([@emplums](https://github.com/emplums))
15+
* [#464](https://github.com/primer/primer/pull/464) Fix markdown stories. ([@shawnbot](https://github.com/shawnbot))
16+
* [#455](https://github.com/primer/primer/pull/455) Add colorizeTooltip deprecation warning. ([@jonrohan](https://github.com/jonrohan))
17+
* [#452](https://github.com/primer/primer/pull/452) Update dead links in CONTRIBUTING.md. ([@agisilaos](https://github.com/agisilaos))
18+
19+
#### Committers: 7
20+
- Agisilaos Tsaraboulidis ([agisilaos](https://github.com/agisilaos))
21+
- Catherine Bui ([gladwearefriends](https://github.com/gladwearefriends))
22+
- Emily ([emplums](https://github.com/emplums))
23+
- Jon Rohan ([jonrohan](https://github.com/jonrohan))
24+
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
25+
- Tyson Gach ([tysongach](https://github.com/tysongach))
26+
- [muan](https://github.com/muan)
27+
128
# 10.4.0 (2018-03-14)
229

330
#### :rocket: Enhancement

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ 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` [`packages` directory](./packages) like so:
49+
Or, while you're figuring out which modules you need, you can import them directly from the `primer` [`modules` directory](./modules) like so:
5050

5151
```scss
5252
@import "primer/modules/primer-navigation/index.css";

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.5",
2+
"version": "1.5.6",
33
"name": "primer-alerts",
44
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
55
"homepage": "http://primer.github.io/",
@@ -28,7 +28,7 @@
2828
"test": "../../script/npm-run-all build lint"
2929
},
3030
"dependencies": {
31-
"primer-support": "4.5.2"
31+
"primer-support": "4.5.3"
3232
},
3333
"keywords": [
3434
"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.2",
2+
"version": "1.5.3",
33
"name": "primer-avatars",
44
"description": "Basic styles for user profile avatars.",
55
"homepage": "http://primer.github.io/",
@@ -28,7 +28,7 @@
2828
"test": "../../script/npm-run-all build lint"
2929
},
3030
"dependencies": {
31-
"primer-support": "4.5.2"
31+
"primer-support": "4.5.3"
3232
},
3333
"keywords": [
3434
"avatars",

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.0",
2+
"version": "1.7.1",
33
"name": "primer-base",
44
"description": "CSS to reset the browsers default styles",
55
"homepage": "http://primer.github.io/",
@@ -28,7 +28,7 @@
2828
"test": "../../script/npm-run-all build lint"
2929
},
3030
"dependencies": {
31-
"primer-support": "4.5.2"
31+
"primer-support": "4.5.3"
3232
},
3333
"keywords": [
3434
"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.5",
2+
"version": "1.4.6",
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/",
@@ -28,7 +28,7 @@
2828
"test": "../../script/npm-run-all build lint"
2929
},
3030
"dependencies": {
31-
"primer-support": "4.5.2"
31+
"primer-support": "4.5.3"
3232
},
3333
"keywords": [
3434
"primer",

modules/primer-box/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Use `Box--danger` to apply a red border to the outside of the box. This theme is
259259
</div>
260260
```
261261

262-
`Box-danger` is often paired with a red heading. See the [subhead](/styleguide/css/styles/product/components/subhead) docs for more information.
262+
`Box-danger` is often paired with a red heading. See the [subhead](../subhead) docs for more information.
263263

264264
```html
265265
<div class="Subhead border-bottom-0">
@@ -356,7 +356,7 @@ Use the `border-dashed` utility to apply a dashed border to a box.
356356
## Boxes with flash alerts
357357
Use `flash-full` for flash alert inside a box to remove the rounded corners. Place the flash alert above the `Box-body` and underneath the `Box-header`.
358358

359-
Flash alerts come in three different colors and can be used with icons and buttons, see the [alert documentation](/alerts) for more information.
359+
Flash alerts come in three different colors and can be used with icons and buttons, see the [alert documentation](../alerts) for more information.
360360

361361
```html
362362
<div class="Box">
@@ -455,7 +455,7 @@ Use `Counter--gray-dark` for a counter with a dark gray background and white tex
455455
## Form elements and buttons in boxes
456456
To achieve different layouts when adding buttons or form elements to boxes we suggest you use utilities to achieve the layout you want. Here's some common examples:
457457

458-
Use [flexbox utilities](../utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.
458+
Use [flexbox utilities](../../utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.
459459

460460
```html
461461
<div class="Box Box--condensed">
@@ -561,7 +561,7 @@ You can put forms in boxes. Often form submission buttons are aligned to the bot
561561
</div>
562562
```
563563

564-
When a box is all by itself centered on a page you can use [column widths](/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](../utilities/typography) instead of the built in box title styles.
564+
When a box is all by itself centered on a page you can use [column widths](../../objects/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](../../utilities/typography) instead of the built in box title styles.
565565

566566
```html
567567
<div class="Box Box--spacious col-6 mx-auto text-center">
@@ -582,7 +582,7 @@ When a box is all by itself centered on a page you can use [column widths](/grid
582582
</div>
583583
```
584584

585-
Box patterns can also be made with, and modified with [border utilities](../utilities/borders).
585+
Box patterns can also be made with, and modified with [border utilities](../../utilities/borders).
586586

587587
<!-- %enddocs -->
588588

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.5",
2+
"version": "2.5.6",
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/",
@@ -28,7 +28,7 @@
2828
"test": "../../script/npm-run-all build lint"
2929
},
3030
"dependencies": {
31-
"primer-support": "4.5.2"
31+
"primer-support": "4.5.3"
3232
},
3333
"keywords": [
3434
"primer",

0 commit comments

Comments
 (0)