From 11957e0600c93d58845ceb11ec567ec5379a5cce Mon Sep 17 00:00:00 2001 From: muan Date: Wed, 7 Feb 2018 16:14:40 +0800 Subject: [PATCH 01/14] Add !important to details visibility override This allows we use .d-flex or similar in inside of details --- modules/primer-base/lib/base.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/primer-base/lib/base.scss b/modules/primer-base/lib/base.scss index 32fb7b5b4b..3b1d92d811 100644 --- a/modules/primer-base/lib/base.scss +++ b/modules/primer-base/lib/base.scss @@ -73,6 +73,6 @@ details { &:not([open]) { // Set details content hidden by default for browsers that don't do this - > *:not(summary) { display: none; } + > *:not(summary) { display: none !important; } } } From c30e45ebdd3fe2108f3d82bfbad1bfa08f34ee3f Mon Sep 17 00:00:00 2001 From: agisilaos Date: Wed, 28 Feb 2018 12:29:02 +0200 Subject: [PATCH 02/14] update dead link related to the license Plus, I removed a blank space --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 490070ea38..5941e67b02 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,7 +6,7 @@ Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. -Before you do, would you mind reading [this license agreement](CLA.md)? If you open a PR, we'll assume you agree to it. If you have any hesitation or disagreement, please do open a PR still, but note your concerns as well. +Before you do, would you mind reading [this license agreement](LICENSE.md)? If you open a PR, we'll assume you agree to it. If you have any hesitation or disagreement, please do open a PR still, but note your concerns as well. ## Using the issue tracker @@ -59,7 +59,7 @@ Good pull requests—patches, improvements, new features—are a fantastic help. ### Updating Primer modules -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. +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. 1. Fork and clone [this repository](https://github.com/primer/primer). 2. Configure and install the dependencies: `npm install` From d199c9ffaca9a7ce63feacf062b9e2e80c79383e Mon Sep 17 00:00:00 2001 From: agisilaos Date: Wed, 28 Feb 2018 13:09:56 +0200 Subject: [PATCH 03/14] =?UTF-8?q?Update=20one=20more=20dead=20link=20?= =?UTF-8?q?=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5941e67b02..bd1195f842 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -28,7 +28,7 @@ Guidelines for bug reports: 2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository. -3. **Isolate the problem** — ideally create a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. +3. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example. A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs. From 4aaf956f260c649efb6b12699987f62cedcd67bd Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Wed, 28 Feb 2018 10:46:06 -0800 Subject: [PATCH 04/14] First 10.4.0 commit --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5a53d924..d858bcfab4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 10.4.0 + # 10.3.0 (2018-01-17) #### :rocket: Enhancement From 7a2660f774526ac0893317fc00cfe2deedffef8e Mon Sep 17 00:00:00 2001 From: agisilaos Date: Wed, 28 Feb 2018 22:51:40 +0200 Subject: [PATCH 05/14] =?UTF-8?q?Remove=20useless=20paragraph=20?= =?UTF-8?q?=F0=9F=8C=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CONTRIBUTING.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bd1195f842..9cd86e10ed 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,8 +6,6 @@ Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. -Before you do, would you mind reading [this license agreement](LICENSE.md)? If you open a PR, we'll assume you agree to it. If you have any hesitation or disagreement, please do open a PR still, but note your concerns as well. - ## Using the issue tracker The issue tracker is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests), but please respect the following restrictions: From 7ce6fd83b303b85e010b9c63e178424821b90e5f Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Mon, 5 Mar 2018 10:28:28 -0800 Subject: [PATCH 06/14] Adding colorizeTooltip deprecation warning --- modules/primer-tooltips/lib/tooltips.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/primer-tooltips/lib/tooltips.scss b/modules/primer-tooltips/lib/tooltips.scss index dc4b150070..f1b2559cb1 100644 --- a/modules/primer-tooltips/lib/tooltips.scss +++ b/modules/primer-tooltips/lib/tooltips.scss @@ -311,3 +311,4 @@ border-left-color: $background-color; } } +@warn "the colorizeTooltip mixin will be deprecated in version 11."; From fb0fcf1f3011e51935854b7a69e2bdd58d3fb605 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Mon, 5 Mar 2018 10:45:56 -0800 Subject: [PATCH 07/14] Adding height-fit utility class --- modules/primer-utilities/docs/layout.md | 10 ++++++++++ modules/primer-utilities/lib/layout.scss | 2 ++ 2 files changed, 12 insertions(+) diff --git a/modules/primer-utilities/docs/layout.md b/modules/primer-utilities/docs/layout.md index 521683ee64..fd4aa35617 100644 --- a/modules/primer-utilities/docs/layout.md +++ b/modules/primer-utilities/docs/layout.md @@ -156,6 +156,16 @@ Use `.width-full` to set width to 100%. ``` +Use `.height-fit` to set max-height 100%. + +```html +
+
+ Bacon ipsum dolor amet meatball flank beef tail pig boudin ham hock chicken capicola. Shoulder ham spare ribs turducken pork tongue. Bresaola corned beef sausage jowl ribeye kielbasa tenderloin andouille leberkas tongue. Ribeye tri-tip tenderloin pig, chuck ground round chicken tongue corned beef biltong. +
+
+``` + Use `.height-full` to set height to 100%. ```html diff --git a/modules/primer-utilities/lib/layout.scss b/modules/primer-utilities/lib/layout.scss index ae2eda6dda..9b88241f7c 100644 --- a/modules/primer-utilities/lib/layout.scss +++ b/modules/primer-utilities/lib/layout.scss @@ -76,6 +76,8 @@ .width-fit { max-width: 100% !important; } /* Set the width to 100% */ .width-full { width: 100% !important; } +/* Max height 100% */ +.height-fit { max-height: 100% !important; } /* Set the height to 100% */ .height-full { height: 100% !important; } From c37f91b488cce4d9da7777aba7facdf19d15476a Mon Sep 17 00:00:00 2001 From: Tyson Gach Date: Tue, 6 Mar 2018 18:50:58 -0500 Subject: [PATCH 08/14] Fix broken pointer from packages to modules The directory that houses all of the design system components was changed from `packages` to `modules` in https://github.com/primer/primer/commit/c9ea37316fbb73c4d9931c52b42bc197260c0bf6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b07f7be6d..b3793fe480 100644 --- a/README.md +++ b/README.md @@ -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"; From 378fb8bdaec245def00463620478eba39716243f Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Tue, 20 Mar 2018 10:20:34 -0700 Subject: [PATCH 09/14] Updating changelog 10.4.0 --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d858bcfab4..53b9c50b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,16 @@ -# 10.4.0 +# 10.4.0 (2018-03-14) + +#### :rocket: Enhancement +* [#456](https://github.com/primer/primer/pull/456) Adding height-fit utility class. ([@jonrohan](https://github.com/jonrohan)) + +#### :memo: Documentation +* [#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: 3 +- Agisilaos Tsaraboulidis ([agisilaos](https://github.com/agisilaos)) +- Jon Rohan ([jonrohan](https://github.com/jonrohan)) +- [muan](https://github.com/muan) # 10.3.0 (2018-01-17) From b6c98413014cbad688659ce5a03675648a9f9770 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Tue, 20 Mar 2018 10:22:20 -0700 Subject: [PATCH 10/14] Publish - primer-base@1.7.0 - primer-core@6.8.0 - primer-tooltips@1.5.3 - primer-utilities@4.9.0 - primer@10.4.0 - stylelint-config-primer@2.2.5 - stylelint-selector-no-utility@1.8.5 --- modules/primer-base/package.json | 2 +- modules/primer-core/package.json | 8 ++++---- modules/primer-tooltips/package.json | 2 +- modules/primer-utilities/package.json | 2 +- modules/primer/package.json | 10 +++++----- tools/stylelint-config-primer/package.json | 4 ++-- tools/stylelint-selector-no-utility/package.json | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/primer-base/package.json b/modules/primer-base/package.json index a45a57cea5..6da36b07ac 100644 --- a/modules/primer-base/package.json +++ b/modules/primer-base/package.json @@ -1,5 +1,5 @@ { - "version": "1.6.3", + "version": "1.7.0", "name": "primer-base", "description": "CSS to reset the browsers default styles", "homepage": "http://primer.github.io/", diff --git a/modules/primer-core/package.json b/modules/primer-core/package.json index af27787621..1730e2d2f5 100644 --- a/modules/primer-core/package.json +++ b/modules/primer-core/package.json @@ -1,5 +1,5 @@ { - "version": "6.7.0", + "version": "6.8.0", "name": "primer-core", "description": "Primer's core modules", "homepage": "http://primer.github.io/", @@ -27,7 +27,7 @@ "lint": "../../script/lint-scss" }, "dependencies": { - "primer-base": "1.6.3", + "primer-base": "1.7.0", "primer-box": "2.5.5", "primer-breadcrumb": "1.5.1", "primer-buttons": "2.5.3", @@ -36,8 +36,8 @@ "primer-navigation": "1.5.3", "primer-support": "4.5.2", "primer-table-object": "1.4.5", - "primer-tooltips": "1.5.2", + "primer-tooltips": "1.5.3", "primer-truncate": "1.4.5", - "primer-utilities": "4.8.5" + "primer-utilities": "4.9.0" } } diff --git a/modules/primer-tooltips/package.json b/modules/primer-tooltips/package.json index 9d309b7bf7..eabdf41dc7 100644 --- a/modules/primer-tooltips/package.json +++ b/modules/primer-tooltips/package.json @@ -1,5 +1,5 @@ { - "version": "1.5.2", + "version": "1.5.3", "name": "primer-tooltips", "description": "Add tooltips built entirely in CSS to nearly any element.", "homepage": "http://primer.github.io/", diff --git a/modules/primer-utilities/package.json b/modules/primer-utilities/package.json index b1586bb8a1..692a156aa0 100644 --- a/modules/primer-utilities/package.json +++ b/modules/primer-utilities/package.json @@ -1,5 +1,5 @@ { - "version": "4.8.5", + "version": "4.9.0", "name": "primer-utilities", "description": "Immutable, atomic CSS classes to rapidly build product", "homepage": "http://primer.github.io/", diff --git a/modules/primer/package.json b/modules/primer/package.json index ea6afbacfd..3e6d90aaa8 100644 --- a/modules/primer/package.json +++ b/modules/primer/package.json @@ -1,5 +1,5 @@ { - "version": "10.3.0", + "version": "10.4.0", "name": "primer", "description": "Primer is the CSS framework that powers GitHub's front-end design. 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.", "homepage": "http://primer.github.io/", @@ -30,13 +30,13 @@ "dependencies": { "primer-alerts": "1.5.5", "primer-avatars": "1.5.2", - "primer-base": "1.6.3", + "primer-base": "1.7.0", "primer-blankslate": "1.4.5", "primer-box": "2.5.5", "primer-branch-name": "1.0.3", "primer-breadcrumb": "1.5.1", "primer-buttons": "2.5.3", - "primer-core": "6.7.0", + "primer-core": "6.8.0", "primer-forms": "2.1.0", "primer-labels": "1.5.5", "primer-layout": "1.4.5", @@ -55,9 +55,9 @@ "primer-support": "4.5.2", "primer-table-object": "1.4.5", "primer-tables": "1.4.5", - "primer-tooltips": "1.5.2", + "primer-tooltips": "1.5.3", "primer-truncate": "1.4.5", - "primer-utilities": "4.8.5" + "primer-utilities": "4.9.0" }, "keywords": [ "primer", diff --git a/tools/stylelint-config-primer/package.json b/tools/stylelint-config-primer/package.json index bc3facb1a4..738cd5f723 100644 --- a/tools/stylelint-config-primer/package.json +++ b/tools/stylelint-config-primer/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-config-primer", - "version": "2.2.4", + "version": "2.2.5", "description": "Sharable stylelint config used by GitHub's CSS", "homepage": "http://primer.github.io/", "author": "GitHub, Inc.", @@ -19,7 +19,7 @@ "stylelint-no-unsupported-browser-features": "^1.0.0", "stylelint-order": "^0.4.4", "stylelint-scss": "^1.4.1", - "stylelint-selector-no-utility": "1.8.4" + "stylelint-selector-no-utility": "1.8.5" }, "devDependencies": { "eslint": "^3.19.0", diff --git a/tools/stylelint-selector-no-utility/package.json b/tools/stylelint-selector-no-utility/package.json index b663b01cfc..19d0154544 100644 --- a/tools/stylelint-selector-no-utility/package.json +++ b/tools/stylelint-selector-no-utility/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-selector-no-utility", - "version": "1.8.4", + "version": "1.8.5", "description": "Stylelint rule that doesn't allow the styling of utility classes in CSS", "main": "index.js", "scripts": { @@ -21,7 +21,7 @@ "license": "MIT", "repository": "https://github.com/primer/primer/tree/master/tools/stylelint-selector-no-utility", "dependencies": { - "primer-utilities": "4.8.5", + "primer-utilities": "4.9.0", "stylelint": "^7.13.0" }, "devDependencies": { From 2b2d91b4f7f13776c73d8b28811b8279fcab2701 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Mon, 26 Mar 2018 13:56:20 -0700 Subject: [PATCH 11/14] splice out Markdown loaders for raw-loader See: https://github.com/primer/primer/issues/463#issuecomment-376301969 --- .storybook/webpack.config.js | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 59c421d1d3..e7cd9da4d0 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -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) => { @@ -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, From 8d4fad41bb509211cd20560b718102cb18041676 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Mon, 26 Mar 2018 14:01:55 -0700 Subject: [PATCH 12/14] :speak_no_evil: --- .storybook/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index e7cd9da4d0..be4eb6596b 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -13,7 +13,7 @@ module.exports = (config, env) => { rules.forEach((rule, index) => { if ('README.md'.match(rule.test)) { - console.warn('replacing MD rule:', rule) + // console.warn('replacing MD rule:', rule) rules.splice(index, 1, { test: /\.md$/, loader: 'raw-loader', From 1c623ea5ec9ef3d0fd7ad5cbed391671cdcaa712 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Mon, 26 Mar 2018 15:06:01 -0700 Subject: [PATCH 13/14] refactor storiesFromMarkdown() a bit --- .storybook/lib/storiesFromMarkdown.js | 44 ++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.storybook/lib/storiesFromMarkdown.js b/.storybook/lib/storiesFromMarkdown.js index 564600dfdb..28febca009 100644 --- a/.storybook/lib/storiesFromMarkdown.js +++ b/.storybook/lib/storiesFromMarkdown.js @@ -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, @@ -44,14 +49,19 @@ 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 => { + return nodeToStory(node, path) + }) + ) + }, []) } From 50fb58b110734d44dc062e4d4172f3082fd478b0 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Tue, 27 Mar 2018 10:11:40 -0700 Subject: [PATCH 14/14] simplify h/t @mislav --- .storybook/lib/storiesFromMarkdown.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.storybook/lib/storiesFromMarkdown.js b/.storybook/lib/storiesFromMarkdown.js index 28febca009..081d42feca 100644 --- a/.storybook/lib/storiesFromMarkdown.js +++ b/.storybook/lib/storiesFromMarkdown.js @@ -59,9 +59,7 @@ export default req => { select(ast, 'code[lang^=html]') .map(parseBlockAttrs) .filter(({block}) => block.story !== "false") - .map(node => { - return nodeToStory(node, path) - }) + .map(node => nodeToStory(node, path)) ) }, []) }