Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primer release 10.5.0 #483

Merged
merged 65 commits into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8c9ab25
fix spacer variables in spacing doc
gladwearefriends Feb 26, 2018
c37f91b
Fix broken pointer from packages to modules
tysongach Mar 6, 2018
d56bc40
Merge pull request #458 from tysongach/patch-1
shawnbot Mar 13, 2018
7641024
Merge branch 'master' into dev
jonrohan Mar 20, 2018
9e8bb23
splice out Markdown loaders for raw-loader
shawnbot Mar 26, 2018
d0c95fd
:speak_no_evil:
shawnbot Mar 26, 2018
f94586d
add reference buttons to all popover examples
shawnbot Mar 26, 2018
450e1e2
refactor storiesFromMarkdown() a bit
shawnbot Mar 26, 2018
bf59bd7
fix #462 .Popover-message-right-bottom caret
shawnbot Mar 26, 2018
595d182
flesh out all popover alignment examples and link to them from descri…
shawnbot Mar 26, 2018
2b2d91b
splice out Markdown loaders for raw-loader
shawnbot Mar 26, 2018
8d4fad4
:speak_no_evil:
shawnbot Mar 26, 2018
1c623ea
refactor storiesFromMarkdown() a bit
shawnbot Mar 26, 2018
50fb58b
simplify h/t @mislav
shawnbot Mar 27, 2018
98adba0
Merge branch 'dev' into fix-markdown-stories
shawnbot Mar 27, 2018
41a0bb1
Merge pull request #464 from primer/fix-markdown-stories
shawnbot Mar 27, 2018
4620024
Merge branch 'dev' into fix-popover--right-bottom
shawnbot Mar 27, 2018
29a9eeb
Merge branch 'dev' into fix-spacing-docs
shawnbot Apr 5, 2018
2f3723e
Merge pull request #449 from primer/fix-spacing-docs
shawnbot Apr 5, 2018
df7ab31
add text-mono utility
Apr 26, 2018
c4ae2ee
update docs
Apr 26, 2018
6c3c4f9
change single quotes to double
Apr 30, 2018
6f04656
Merge branch 'dev' into fix-popover--right-bottom
shawnbot May 1, 2018
e04fef5
Merge pull request #465 from primer/fix-popover--right-bottom
shawnbot May 1, 2018
d671074
update utilities link
May 4, 2018
062985f
update variables link
May 4, 2018
7ecc7a7
update breakpoint link
May 4, 2018
e2f7959
update responsive styles links
May 4, 2018
beeeadd
fix spacing links
May 4, 2018
6ef56b5
fix typography links
May 4, 2018
e9a6f01
update marketing variables links
May 4, 2018
da1e8be
fix marketing border links
May 4, 2018
5138b92
fix color links
May 4, 2018
a7138aa
update layout and flexbox links
May 4, 2018
919a4ad
fix layout links
May 4, 2018
dbfe41d
fix marketing layout links
May 4, 2018
0aa1d66
fix margin links
May 4, 2018
df57376
fix marketing margin links
May 7, 2018
9bad625
fix padding links
May 7, 2018
2e9f032
fix marketing padding links
May 7, 2018
df11666
fix grid links
May 7, 2018
19cbb79
remove centering link
May 7, 2018
48196e6
update box and form links
May 7, 2018
e5e1fc9
update button links
May 7, 2018
1fbbf6f
update label links
May 7, 2018
5657a4f
starting 10.5.0
jonrohan May 8, 2018
9262814
Merge pull request #474 from primer/task/add-text-mono-util
jonrohan May 8, 2018
87fbb5d
Merge pull request #481 from primer/task/styleguide-polish
jonrohan May 8, 2018
829a992
Documenting the text-inheritance color utility
jonrohan May 9, 2018
adf36d2
add pagination component
May 9, 2018
731d9b9
replace border radius values with variable
May 9, 2018
30ed765
add pagination to primer-core index.scss
May 9, 2018
bf3fadb
add pagination pkg to primer-core
May 9, 2018
0c0b868
add pkg to primer deps
May 9, 2018
02a86a4
add selected class to docs
May 9, 2018
b698261
use variables for border properties
May 9, 2018
33017d0
add more variables for colors
May 9, 2018
f565d6e
grey -> gray lol
May 9, 2018
fddaeed
Merge pull request #486 from primer/text_inherit_docs
jonrohan May 10, 2018
6587770
fix docs
May 10, 2018
64925bb
update pagination version
May 10, 2018
2ab470e
Revert "update pagination version"
May 10, 2018
52b1a6d
Merge pull request #487 from primer/task/pagination-component
May 10, 2018
cb4ce87
update changelog
May 10, 2018
2064c1b
Publish
May 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions .storybook/lib/storiesFromMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@ const railsOcticonToReact = (html) => {
return html
}

const nodeToStory = (node, file) => {
const html = railsOcticonToReact(node.value)
const element = htmlParser.parse(html)
const parseBlockAttrs = (node, file) => {
const pairs = node.lang.replace(/^html\s*/, '')
const attrs = pairs.length ? parsePairs(pairs) : {}
const title = attrs.title || getPreviousHeading(node) ||
`story @ ${file}:${node.position.start.line}`
attrs.title = attrs.title
|| getPreviousHeading(node)
|| `story @ ${file}:${node.position.start.line}`
node.block = attrs
return node
}

const nodeToStory = (node, file) => {
const html = railsOcticonToReact(node.value)
const {title} = node.block
return {
title,
story: () => element,
attrs,
story: () => htmlParser.parse(html),
html,
file,
node,
Expand All @@ -44,14 +49,17 @@ const getPreviousHeading = node => {
}

export default req => {
return req.keys().reduce((stories, file) => {
const content = req(file)
const ast = parents(remark.parse(content))
const path = file.replace(/^\.\//, '')
return stories.concat(
select(ast, 'code[lang^=html]')
.map(node => nodeToStory(node, path))
.filter(({attrs}) => attrs.story !== "false")
)
}, [])
return req.keys()
.filter(file => !file.match(/node_modules/))
.reduce((stories, file) => {
const content = req(file)
const ast = parents(remark.parse(content))
const path = file.replace(/^\.\//, '')
return stories.concat(
select(ast, 'code[lang^=html]')
.map(parseBlockAttrs)
.filter(({block}) => block.story !== "false")
.map(node => nodeToStory(node, path))
)
}, [])
}
32 changes: 20 additions & 12 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require("path");
const path = require('path');

const modulesPath = path.resolve(__dirname, "../modules")
const modulesPath = path.resolve(__dirname, '../modules')

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

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

config.module.rules.push(
{
test: /\.md$/,
use: "raw-loader",
},
const rules = config.module.rules

rules.forEach((rule, index) => {
if ('README.md'.match(rule.test)) {
// console.warn('replacing MD rule:', rule)
rules.splice(index, 1, {
test: /\.md$/,
loader: 'raw-loader',
})
}
})

rules.push(
{
test: /\.scss$/,
loaders: [
"style-loader",
"css-loader",
'style-loader',
'css-loader',
{
loader: "postcss-loader",
loader: 'postcss-loader',
options: {
config: {
path: require.resolve("./postcss.config.js"),
path: require.resolve('./postcss.config.js'),
},
},
},
{
loader: "sass-loader",
loader: 'sass-loader',
options: {
includePaths: [
modulesPath,
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# 10.5.0

#### :rocket: Enhancement
* [#487](https://github.com/primer/primer/pull/487) Import Pagination Component. ([@emplums](https://github.com/emplums))
* [#474](https://github.com/primer/primer/pull/474) Add text-mono utility class. ([@emplums](https://github.com/emplums))
* [#456](https://github.com/primer/primer/pull/456) Adding height-fit utility class. ([@jonrohan](https://github.com/jonrohan))

#### :bug: Bug Fix
* [#465](https://github.com/primer/primer/pull/465) Fix Popover--right-bottom caret positioning. ([@shawnbot](https://github.com/shawnbot))
* [#458](https://github.com/primer/primer/pull/458) Fix broken pointer from packages to modules. ([@tysongach](https://github.com/tysongach))

#### :memo: Documentation
* [#486](https://github.com/primer/primer/pull/486) Documenting the text-inheritance color utility. ([@jonrohan](https://github.com/jonrohan))
* [#481](https://github.com/primer/primer/pull/481) Styleguide Polish. ([@emplums](https://github.com/emplums))
* [#464](https://github.com/primer/primer/pull/464) Fix markdown stories. ([@shawnbot](https://github.com/shawnbot))
* [#455](https://github.com/primer/primer/pull/455) Add colorizeTooltip deprecation warning. ([@jonrohan](https://github.com/jonrohan))
* [#452](https://github.com/primer/primer/pull/452) Update dead links in CONTRIBUTING.md. ([@agisilaos](https://github.com/agisilaos))

#### Committers: 7
- Agisilaos Tsaraboulidis ([agisilaos](https://github.com/agisilaos))
- Catherine Bui ([gladwearefriends](https://github.com/gladwearefriends))
- Emily ([emplums](https://github.com/emplums))
- Jon Rohan ([jonrohan](https://github.com/jonrohan))
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
- Tyson Gach ([tysongach](https://github.com/tysongach))
- [muan](https://github.com/muan)

# 10.4.0 (2018-03-14)

#### :rocket: Enhancement
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Then, you would import the module with:
@import "primer-navigation/index.scss";
```

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

```scss
@import "primer/modules/primer-navigation/index.css";
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-alerts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.5",
"version": "1.5.6",
"name": "primer-alerts",
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"alerts",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-avatars/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.2",
"version": "1.5.3",
"name": "primer-avatars",
"description": "Basic styles for user profile avatars.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"avatars",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "1.7.1",
"name": "primer-base",
"description": "CSS to reset the browsers default styles",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"primer",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-blankslate/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.5",
"version": "1.4.6",
"name": "primer-blankslate",
"description": "Blankslates are for when there is a lack of content within a page or section.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"primer",
Expand Down
10 changes: 5 additions & 5 deletions modules/primer-box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Use `Box--danger` to apply a red border to the outside of the box. This theme is
</div>
```

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

```html
<div class="Subhead border-bottom-0">
Expand Down Expand Up @@ -356,7 +356,7 @@ Use the `border-dashed` utility to apply a dashed border to a box.
## Boxes with flash alerts
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`.

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

```html
<div class="Box">
Expand Down Expand Up @@ -455,7 +455,7 @@ Use `Counter--gray-dark` for a counter with a dark gray background and white tex
## Form elements and buttons in boxes
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:

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.
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.

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

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.
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.

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

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

<!-- %enddocs -->

Expand Down
4 changes: 2 additions & 2 deletions modules/primer-box/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.5.5",
"version": "2.5.6",
"name": "primer-box",
"description": "A module for creating rounded-corner boxes with options for headers, lists, and footers.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"primer",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-branch-name/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.3",
"version": "1.0.4",
"name": "primer-branch-name",
"description": "A nice, consistent way to display branch names.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"github",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-breadcrumb/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.1",
"version": "1.5.2",
"name": "primer-breadcrumb",
"description": "Breadcrumb navigation for pages with parents / grandparents.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"breadcrumb",
Expand Down
2 changes: 1 addition & 1 deletion modules/primer-buttons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ You can easily append a count to a **small button**. Add the `.with-count` class
</div>
```

You can also use the [counter](../../product/components/labels) component within buttons:
You can also use the [counter](../labels#counters) component within buttons:

```html
<button class="btn" type="button">
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-buttons/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.5.3",
"version": "2.5.4",
"name": "primer-buttons",
"description": "A collection of buttons used for primary and secondary actions.",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.2"
"primer-support": "4.5.3"
},
"keywords": [
"primer",
Expand Down
1 change: 1 addition & 0 deletions modules/primer-core/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@import "primer-forms/index.scss";
@import "primer-layout/index.scss";
@import "primer-navigation/index.scss";
@import "primer-pagination/index.scss";
@import "primer-tooltips/index.scss";
@import "primer-truncate/index.scss";

Expand Down
27 changes: 14 additions & 13 deletions modules/primer-core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.8.0",
"version": "6.9.0",
"name": "primer-core",
"description": "Primer's core modules",
"homepage": "http://primer.github.io/",
Expand Down Expand Up @@ -27,17 +27,18 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-base": "1.7.0",
"primer-box": "2.5.5",
"primer-breadcrumb": "1.5.1",
"primer-buttons": "2.5.3",
"primer-forms": "2.1.0",
"primer-layout": "1.4.5",
"primer-navigation": "1.5.3",
"primer-support": "4.5.2",
"primer-table-object": "1.4.5",
"primer-tooltips": "1.5.3",
"primer-truncate": "1.4.5",
"primer-utilities": "4.9.0"
"primer-base": "1.7.1",
"primer-box": "2.5.6",
"primer-breadcrumb": "1.5.2",
"primer-buttons": "2.5.4",
"primer-forms": "2.1.1",
"primer-layout": "1.4.6",
"primer-navigation": "1.5.4",
"primer-pagination": "1.0.0",
"primer-support": "4.5.3",
"primer-table-object": "1.4.6",
"primer-tooltips": "1.5.4",
"primer-truncate": "1.4.6",
"primer-utilities": "4.10.0"
}
}
2 changes: 1 addition & 1 deletion modules/primer-forms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Primer adds light `height` and `vertical-align` styles to `<select>`s for all br

##### Small

Use the `.select-sm` class to resize both default and custom `<select>`s to match the size of [our small buttons](/buttons/#default-buttons).
Use the `.select-sm` class to resize both default and custom `<select>`s to match the size of [our small buttons](../buttons/#default-buttons).

```html
<select class="form-select select-sm" aria-label="Preference">
Expand Down
Loading