@hashicorp/design-system-components 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +21 -1
- package/RELEASE.md +3 -32
- package/addon/components/hds/button/index.js +7 -5
- package/addon/components/hds/link-to/standalone.hbs +1 -1
- package/addon/components/hds/link-to/standalone.js +0 -10
- package/addon/helpers/hds-link-to-query.js +21 -0
- package/app/helpers/hds-link-to-query.js +1 -0
- package/app/styles/components/button.scss +58 -4
- package/app/styles/components/link/standalone.scss +2 -2
- package/package.json +8 -41
- package/.github/ISSUE_TEMPLATE/new-component-quest-issue-engineering-checklist.md +0 -78
- package/.github/pull_request_template.md. +0 -26
- package/.github/workflows/ci.yml +0 -196
- package/.husky/pre-commit +0 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @hashicorp/design-system-components
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#76](https://github.com/hashicorp/design-system/pull/76) [`48a82d54`](https://github.com/hashicorp/design-system/commit/48a82d545817c280d022cf95b2f3a691dc3c46a3) Thanks [@didoo](https://github.com/didoo)! - Added the "tertiary" color variant to the "Button" component
|
|
8
|
+
|
|
9
|
+
* [#77](https://github.com/hashicorp/design-system/pull/77) [`c08711e4`](https://github.com/hashicorp/design-system/commit/c08711e4fa3fac0cd3418b8afa1a0c4c254e8fac) Thanks [@didoo](https://github.com/didoo)! - Fixed the "elevation" treatment for the "Button" component
|
|
10
|
+
|
|
11
|
+
## 0.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`04db4d9e`](https://github.com/hashicorp/design-system/commit/04db4d9ece6aba358acfa0721a78dfe84c561b5e)]:
|
|
16
|
+
- @hashicorp/design-system-tokens@0.6.0
|
package/README.md
CHANGED
|
@@ -21,7 +21,27 @@ Installation
|
|
|
21
21
|
yarn add @hashicorp/design-system-components
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
You will need to do three things before importing the styles into your app:
|
|
25
|
+
|
|
26
|
+
1. Install `ember-cli-sass`
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ember install ember-cli-sass
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
2. Change `app/styles/app.css` to `app/styles/app.scss`
|
|
33
|
+
3. Add the following to the `app` definition (starts on/around line 6 in new Ember apps) in `ember-cli-build.js`
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
sassOptions: {
|
|
37
|
+
precision: 4,
|
|
38
|
+
includePaths: [
|
|
39
|
+
'./node_modules/@hashicorp/design-system-tokens/dist/products/css',
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Finally, add this line to the top of your app's style file (`app.scss` or similar):
|
|
25
45
|
|
|
26
46
|
```
|
|
27
47
|
@import '@hashicorp/design-system-components';
|
package/RELEASE.md
CHANGED
|
@@ -1,41 +1,12 @@
|
|
|
1
|
-
# How
|
|
1
|
+
# How to release
|
|
2
2
|
|
|
3
3
|
Whenever there is an update to the components, and these changes have been approved, we need to release them as package to the npm registry.
|
|
4
4
|
|
|
5
5
|
Please see the instructions in the [CONTRIBUTING](CONTRIBUTING.md) file for more details about how to setup the project and make changes to the code for these packages.
|
|
6
6
|
|
|
7
|
-
## Bump
|
|
7
|
+
## Bump and release
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Make sure your local `main` branch is up to date.
|
|
12
|
-
* Create new custom branch from `main`.
|
|
13
|
-
* `cd /design-system-components`
|
|
14
|
-
* Run `yarn bump` and choose the _SemVer_ version as agreed upon on the previous PR.
|
|
15
|
-
* _The `bump` command is interactive, you can move up and down with the keyboard, choose one option, and then hit "enter": the tool will automatically update the version in the `package.json` file for you._
|
|
16
|
-
* Check the `git diff` for the project, you should see only the `package.json` file changed (with the new version).
|
|
17
|
-
* Commit, push, open a pull request, and wait for approval.
|
|
18
|
-
|
|
19
|
-
Once the PR has been approved and merged, you can finally move to the next step, the actual release.
|
|
20
|
-
|
|
21
|
-
## Release
|
|
22
|
-
|
|
23
|
-
The "release" step publishes the package on the npm registry, using the version declared in the `package.json` file, and [tags](https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag) that specific release on git.
|
|
24
|
-
|
|
25
|
-
_**IMPORTANT**: Once released a package on the public registry, you can't revert the changes: the only solution is to deprecate the package (this will hide it from the public, but remains there). If you need to do some tests, use a **local** package registry (see below), don't test directly in production!_
|
|
26
|
-
|
|
27
|
-
* Make sure your local `main` branch is up to date.
|
|
28
|
-
* You will need a company-approved 2FA-enabled account on npm to publish (see [npm 2FA docs](https://docs.npmjs.com/configuring-two-factor-authentication) for more info).
|
|
29
|
-
* `cd /design-system-components`
|
|
30
|
-
* `yarn release`
|
|
31
|
-
* Check the git diff, you should not see any change.
|
|
32
|
-
|
|
33
|
-
**Notice**: this action will automatically:
|
|
34
|
-
|
|
35
|
-
* publish the new version of the package on the [NPM registry](https://www.npmjs.com/) using the current _SemVer_ version declared in the `package.json` file (the one previously chosen in the `bump` step).
|
|
36
|
-
* tag the current last commit in the `main` branch and push the tag to the git origin
|
|
37
|
-
|
|
38
|
-
At this point check on npm that the package ([@hashicorp/design-system-components](https://www.npmjs.com/package/@hashicorp/design-system-components) has been successfully published, and if it's so... well done! You just published your new package 🎉.
|
|
9
|
+
Follow the instructions for Changesets in the root [README](../../README.md).
|
|
39
10
|
|
|
40
11
|
🚨 **DON'T FORGET**:
|
|
41
12
|
|
|
@@ -6,7 +6,7 @@ export const DEFAULT_COLOR = 'primary';
|
|
|
6
6
|
export const DEFAULT_TYPE = 'button';
|
|
7
7
|
export const DEFAULT_ICONPOSITION = 'leading';
|
|
8
8
|
export const SIZES = ['small', 'medium', 'large'];
|
|
9
|
-
export const COLORS = ['primary', 'secondary', '
|
|
9
|
+
export const COLORS = ['primary', 'secondary', 'tertiary', 'critical'];
|
|
10
10
|
export const TYPES = ['button', 'submit', 'reset'];
|
|
11
11
|
export const ICONPOSITIONS = ['leading', 'trailing'];
|
|
12
12
|
|
|
@@ -50,7 +50,7 @@ export default class HdsButtonIndexComponent extends Component {
|
|
|
50
50
|
* @param color
|
|
51
51
|
* @type {string}
|
|
52
52
|
* @default primary
|
|
53
|
-
* @description Determines the color of button to be used; acceptable values are `primary`, `secondary`, and `
|
|
53
|
+
* @description Determines the color of button to be used; acceptable values are `primary`, `secondary`, and `critical`
|
|
54
54
|
*/
|
|
55
55
|
get color() {
|
|
56
56
|
let { color = DEFAULT_COLOR } = this.args;
|
|
@@ -72,6 +72,11 @@ export default class HdsButtonIndexComponent extends Component {
|
|
|
72
72
|
* @description The name of the icon to be used.
|
|
73
73
|
*/
|
|
74
74
|
get icon() {
|
|
75
|
+
assert(
|
|
76
|
+
`when the "Hds::Button" @color is "tertiary" an @icon is required`,
|
|
77
|
+
!(this.color === 'tertiary' && !this.args.icon)
|
|
78
|
+
);
|
|
79
|
+
|
|
75
80
|
return this.args.icon ?? null;
|
|
76
81
|
}
|
|
77
82
|
|
|
@@ -180,9 +185,6 @@ export default class HdsButtonIndexComponent extends Component {
|
|
|
180
185
|
classes.push('hds-button--width-full');
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
// the button has a "low" elevation effect applied to it
|
|
184
|
-
classes.push('hds-elevation-low');
|
|
185
|
-
|
|
186
188
|
return classes.join(' ');
|
|
187
189
|
}
|
|
188
190
|
}
|
|
@@ -128,16 +128,6 @@ export default class HdsLinkToStandaloneComponent extends Component {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
// this is a workaround for https://github.com/emberjs/ember.js/issues/19693
|
|
132
|
-
// don't remove until we drop support for ember 3.27 and 3.28
|
|
133
|
-
get queryParams() {
|
|
134
|
-
if (this.args.query) {
|
|
135
|
-
return this.args.query;
|
|
136
|
-
} else {
|
|
137
|
-
return {};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
131
|
/**
|
|
142
132
|
* Get the class names to apply to the component.
|
|
143
133
|
* @method LinkToStandalone#classNames
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { helper } from '@ember/component/helper';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This helper can be used to safely pass a @query argument to the `<LinkTo>` component
|
|
5
|
+
* without the risk of triggering an assertion if the argument is undefined
|
|
6
|
+
*
|
|
7
|
+
* The result of this helper should be passed into the `@query` argument of the `<LinkTo>` component:
|
|
8
|
+
*
|
|
9
|
+
* ```hbs
|
|
10
|
+
* <LinkTo @query={{hds-link-to-query @query}} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// this is a workaround for https://github.com/emberjs/ember.js/issues/19693
|
|
15
|
+
// don't remove until we drop support for ember 3.27 and 3.28
|
|
16
|
+
|
|
17
|
+
export function hdsLinkToQuery([query]) {
|
|
18
|
+
return query ?? {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default helper(hdsLinkToQuery);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@hashicorp/design-system-components/helpers/hds-link-to-query';
|
|
@@ -59,6 +59,8 @@ $hds-button-focus-border-width: 3px;
|
|
|
59
59
|
|
|
60
60
|
&:focus,
|
|
61
61
|
&.is-focus {
|
|
62
|
+
box-shadow: none;
|
|
63
|
+
|
|
62
64
|
&::before {
|
|
63
65
|
// the position absolute of an element is computed from the inside of the border of the container
|
|
64
66
|
// so we have to take in account the border width of the pseudo-element container itself
|
|
@@ -141,6 +143,7 @@ $size-props: (
|
|
|
141
143
|
.hds-button--color-primary {
|
|
142
144
|
background-color: var(--token-color-palette-blue-200);
|
|
143
145
|
border-color: var(--token-color-palette-blue-300);
|
|
146
|
+
box-shadow: var(--token-elevation-low-box-shadow);
|
|
144
147
|
color: var(--token-color-foreground-high-contrast);
|
|
145
148
|
|
|
146
149
|
&:focus,
|
|
@@ -183,6 +186,7 @@ $size-props: (
|
|
|
183
186
|
.hds-button--color-secondary {
|
|
184
187
|
background-color: var(--token-color-surface-faint);
|
|
185
188
|
border-color: var(--token-color-border-strong);
|
|
189
|
+
box-shadow: var(--token-elevation-low-box-shadow);
|
|
186
190
|
color: var(--token-color-foreground-primary);
|
|
187
191
|
|
|
188
192
|
&:focus,
|
|
@@ -213,14 +217,64 @@ $size-props: (
|
|
|
213
217
|
}
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
.hds-button--color-
|
|
217
|
-
background-color:
|
|
218
|
-
border-color:
|
|
220
|
+
.hds-button--color-tertiary {
|
|
221
|
+
background-color: transparent;
|
|
222
|
+
border-color: transparent;
|
|
223
|
+
color: var(--token-color-foreground-action);
|
|
224
|
+
|
|
225
|
+
&:focus,
|
|
226
|
+
&.is-focus {
|
|
227
|
+
border-color: var(--token-color-focus-action-internal);
|
|
228
|
+
color: var(--token-color-foreground-action);
|
|
229
|
+
&::before {
|
|
230
|
+
border-color: var(--token-color-focus-action-external);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
&:hover,
|
|
234
|
+
&.is-hover {
|
|
235
|
+
background-color: var(--token-color-surface-primary);
|
|
236
|
+
border-color: var(--token-color-border-strong);
|
|
237
|
+
color: var(--token-color-foreground-action-hover);
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
&:active,
|
|
241
|
+
&.is-active {
|
|
242
|
+
background-color: var(--token-color-surface-interactive-active);
|
|
243
|
+
border-color: var(--token-color-border-strong);
|
|
244
|
+
box-shadow: none;
|
|
245
|
+
color: var(--token-color-foreground-action-active);
|
|
246
|
+
&::before {
|
|
247
|
+
border-color: transparent;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&:disabled,
|
|
252
|
+
&[disabled],
|
|
253
|
+
&.is-disabled,
|
|
254
|
+
&:disabled:focus,
|
|
255
|
+
&[disabled]:focus,
|
|
256
|
+
&.is-disabled:focus,
|
|
257
|
+
&:disabled:hover,
|
|
258
|
+
&[disabled]:hover,
|
|
259
|
+
&.is-disabled:hover {
|
|
260
|
+
background-color: transparent;
|
|
261
|
+
border-color: transparent;
|
|
262
|
+
|
|
263
|
+
&::before {
|
|
264
|
+
border-color: transparent;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.hds-button--color-critical {
|
|
270
|
+
background-color: var(--token-color-surface-critical);
|
|
271
|
+
border-color: var(--token-color-foreground-critical-on-surface);
|
|
272
|
+
box-shadow: var(--token-elevation-low-box-shadow);
|
|
219
273
|
color: var(--token-color-foreground-critical-on-surface);
|
|
220
274
|
|
|
221
275
|
&:focus,
|
|
222
276
|
&.is-focus {
|
|
223
|
-
background-color: var(--token-color-
|
|
277
|
+
background-color: var(--token-color-surface-critical);
|
|
224
278
|
border-color: var(--token-color-focus-critical-internal);
|
|
225
279
|
color: var(--token-color-foreground-critical-on-surface);
|
|
226
280
|
&::before {
|
|
@@ -102,13 +102,13 @@ $size-props: (
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
&::before {
|
|
105
|
-
background-color: var(--token-color-action
|
|
105
|
+
background-color: var(--token-color-surface-action);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.hds-link-standalone--color-secondary {
|
|
111
|
-
color: var(--token-color-foreground-
|
|
111
|
+
color: var(--token-color-foreground-strong);
|
|
112
112
|
|
|
113
113
|
&:hover,
|
|
114
114
|
&.is-hover {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "HashiCorp Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -8,35 +8,13 @@
|
|
|
8
8
|
"components",
|
|
9
9
|
"ember-addon"
|
|
10
10
|
],
|
|
11
|
-
"repository":
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/hashicorp/design-system.git",
|
|
14
|
+
"directory": "packages/components"
|
|
15
|
+
},
|
|
12
16
|
"license": "MPL-2.0",
|
|
13
17
|
"author": "HashiCorp Design Systems <design-systems@hashicorp.com>",
|
|
14
|
-
"contributors": [
|
|
15
|
-
{
|
|
16
|
-
"name": "Melanie Sumner",
|
|
17
|
-
"email": "melanie@hashicorp.com"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "Brian Runnells",
|
|
21
|
-
"email": "brunnells@hashicorp.com"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "Hector Simpson",
|
|
25
|
-
"email": "hector@hashicorp.com"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "Heather Larsen",
|
|
29
|
-
"email": "hlarsen@hashicorp.com"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "Amy Lam",
|
|
33
|
-
"email": "alam@hashicorp.com"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "Cristiano Rastelli",
|
|
37
|
-
"email": "cristiano.rastelli@hashicorp.com"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
18
|
"directories": {
|
|
41
19
|
"doc": "doc",
|
|
42
20
|
"test": "tests"
|
|
@@ -53,15 +31,10 @@
|
|
|
53
31
|
"test": "npm-run-all lint test:*",
|
|
54
32
|
"test:ember": "ember test",
|
|
55
33
|
"test:ember-compatibility": "ember try:each",
|
|
56
|
-
"test:ember:percy": "percy exec ember test"
|
|
57
|
-
"bump": "./node_modules/.bin/bump package.json",
|
|
58
|
-
"release": "yarn publish --new-version $npm_package_version",
|
|
59
|
-
"postrelease:git-tag": "TAG_VERSION=\"${npm_package_name}/${npm_package_version}\" && git tag $TAG_VERSION && git push origin $TAG_VERSION",
|
|
60
|
-
"postrelease": "yarn postrelease:git-tag",
|
|
61
|
-
"prepare": "husky install"
|
|
34
|
+
"test:ember:percy": "percy exec ember test"
|
|
62
35
|
},
|
|
63
36
|
"dependencies": {
|
|
64
|
-
"@hashicorp/design-system-tokens": "^0.
|
|
37
|
+
"@hashicorp/design-system-tokens": "^0.6.0",
|
|
65
38
|
"@hashicorp/ember-flight-icons": "^2.0.1",
|
|
66
39
|
"ember-auto-import": "^2.2.3",
|
|
67
40
|
"ember-cli-babel": "^7.26.6",
|
|
@@ -111,8 +84,6 @@
|
|
|
111
84
|
"eslint-plugin-node": "^11.1.0",
|
|
112
85
|
"eslint-plugin-prettier": "^3.4.1",
|
|
113
86
|
"eslint-plugin-qunit": "^6.2.0",
|
|
114
|
-
"husky": "^7.0.4",
|
|
115
|
-
"lint-staged": "^12.1.2",
|
|
116
87
|
"loader.js": "^4.7.0",
|
|
117
88
|
"npm-run-all": "^4.1.5",
|
|
118
89
|
"prettier": "^2.3.2",
|
|
@@ -129,9 +100,5 @@
|
|
|
129
100
|
},
|
|
130
101
|
"ember-addon": {
|
|
131
102
|
"configPath": "tests/dummy/config"
|
|
132
|
-
},
|
|
133
|
-
"lint-staged": {
|
|
134
|
-
"*.js": "eslint --cache --fix",
|
|
135
|
-
"*.{js,hbs}": "prettier --write"
|
|
136
103
|
}
|
|
137
104
|
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: New Component Quest Issue/Engineering Checklist
|
|
3
|
-
about: 'DS Team: Engineering Checklist for New Components'
|
|
4
|
-
title: "[Quest] New Component: Component Name"
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
This is the quest issue/engineering checklist for the COMPONENT_NAME Component. All new components will have their own feature branch, and any PR that adds an item from the checklist should target the feature branch, and not `main`.
|
|
11
|
-
|
|
12
|
-
## Pre-Flight Checklist
|
|
13
|
-
Update this list and these links as appropriate.
|
|
14
|
-
|
|
15
|
-
- [Component Doc](url_here): This file should exist before any code is written.
|
|
16
|
-
- [FIGMA Design](url_here): Since we are trying to align the component API naming with the same terms used in the Figma file, it is likely useful to have a fairly stable Figma design before we create a component; it should definitely be finalized before the component ships, however.
|
|
17
|
-
- [Design System Website](https://design-system-website.vercel.app/?path=/story/example-introduction--page) (storybook of storybooks): use for reference, to consider existing features that we might need to replicate in the component.
|
|
18
|
-
|
|
19
|
-
## Engineering Checklist
|
|
20
|
-
The engineering checklist has six parts: creating the feature branch, component template, component backing class, component style, tests, and documentation.
|
|
21
|
-
|
|
22
|
-
### Component Creation
|
|
23
|
-
|
|
24
|
-
- [ ] create new branch from main for the component.
|
|
25
|
-
- [ ] create new component
|
|
26
|
-
- `ember generate component hds/COMPONENT_NAME/index --gc` (the component won't need to be invoked with index, it's just to put all the files in the correct place)
|
|
27
|
-
- if it's a variation on a component, then `hds/COMPONENT_NAME/VARIATION` instead of `index`
|
|
28
|
-
- [ ] **component template**
|
|
29
|
-
- use semantic HTML
|
|
30
|
-
- the component should have a css class that is the same as the component (e.g. `hds/button` should have a class name of `hds-button` on the component, and additional CSS classes should start with this same class name.
|
|
31
|
-
- add `...attributes` unless doing so would be detrimental (e.g., a parent component and child component that both have ...attributes)
|
|
32
|
-
- [ ] **component class**
|
|
33
|
-
- use getters (vs template conditionals or constructors, if possible)
|
|
34
|
-
- write API comments in the JS doc way (copy from an existing DS component)
|
|
35
|
-
- use the same naming as the Figma file for the components API unless it conflicts with a pre-existing HTML attribute. If that is the case, document the difference in the comment.
|
|
36
|
-
- ensure that all existing functionality (from a Structure component) is accounted for in some way. If we are not providing existing functionality at all, it should be documented (along with the reason why). If we are providing temporary functionality, explain that it's temporary and why.
|
|
37
|
-
- check the [design system website](https://design-system-website.vercel.app/?path=/story/example-introduction--page) to see what kind of component functionality is being used across all products
|
|
38
|
-
- booleans should start with a verb (is/has/etc)
|
|
39
|
-
- assertion text should match the content style of the other components.
|
|
40
|
-
- goal is a terse invocation
|
|
41
|
-
- [ ] **component style**
|
|
42
|
-
- create `component/COMPONENT_NAME.scss` in `app/styles`
|
|
43
|
-
- add `@use` to `app/styles/@hashicorp/design-system-components.scss` (see existing code for precise syntax)
|
|
44
|
-
- use design tokens wherever possible, comment where they are not
|
|
45
|
-
- sizes should be in relative units
|
|
46
|
-
- line heights should be unitless
|
|
47
|
-
- [ ] **testing**
|
|
48
|
-
- [ ] test basic functionality
|
|
49
|
-
- [ ] test defaults
|
|
50
|
-
- [ ] try not to repeat tests (i.e., don't have to test all sizes, all colors, etc.)
|
|
51
|
-
- [ ] test all accessibility attributes
|
|
52
|
-
- [ ] **documentation**
|
|
53
|
-
- create component page `ember generate route components/COMPONENT_NAME --dummy`
|
|
54
|
-
- add link to `templates/index.hbs` page
|
|
55
|
-
- [ ] API docs
|
|
56
|
-
- [ ] Usage
|
|
57
|
-
- [ ] Showcase
|
|
58
|
-
|
|
59
|
-
### Component Review
|
|
60
|
-
|
|
61
|
-
Pre-review request checks:
|
|
62
|
-
|
|
63
|
-
- [ ] make sure all tests pass (`ember s` then visit /tests; or `ember t -s`)
|
|
64
|
-
- [ ] check for basic a11y on docs page:
|
|
65
|
-
- keyboard navigation
|
|
66
|
-
- logical DOM order
|
|
67
|
-
- zoom up to 400%
|
|
68
|
-
- color contrast
|
|
69
|
-
- (the axe-core browser plugin can run some basic tests and give immediate feedback)
|
|
70
|
-
- [ ] check page on browsers
|
|
71
|
-
- Chrome
|
|
72
|
-
- Firefox
|
|
73
|
-
- Safari
|
|
74
|
-
- Edge (once available)
|
|
75
|
-
|
|
76
|
-
When ready for review:
|
|
77
|
-
- [ ] add situationally appropriate reviewers
|
|
78
|
-
- [ ] added instructions for reviewers in your PR, letting them know what kind of review you need
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
## :pushpin: Summary
|
|
2
|
-
|
|
3
|
-
<!-- TLDR that includes the purpose of the PR e.g. "If merged, this PR..." -->
|
|
4
|
-
|
|
5
|
-
## :busts_in_silhouette: How to review this PR
|
|
6
|
-
|
|
7
|
-
<!-- Check one box -->
|
|
8
|
-
|
|
9
|
-
- [ ] Review commit-by-commit (please copy commit info to "Summary" for clarity)
|
|
10
|
-
- [ ] Review by "Files changed"
|
|
11
|
-
|
|
12
|
-
## :camera_flash: Screenshots
|
|
13
|
-
|
|
14
|
-
<!-- A picture is a thousand words -->
|
|
15
|
-
|
|
16
|
-
## :link: External links
|
|
17
|
-
|
|
18
|
-
<!-- Asana issues, RFCs, etc. -->
|
|
19
|
-
|
|
20
|
-
## :memo: Is it documented?
|
|
21
|
-
|
|
22
|
-
- [ ] Please confirm that this change is documented on the website!
|
|
23
|
-
|
|
24
|
-
***
|
|
25
|
-
|
|
26
|
-
:speech_balloon: Please consider using [conventional comments](https://conventionalcomments.org/) when reviewing this PR.
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
NODE_VERSION: '16.x'
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
lint:
|
|
14
|
-
name: Lint
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
with:
|
|
19
|
-
fetch-depth: 1
|
|
20
|
-
|
|
21
|
-
- uses: actions/setup-node@v2-beta
|
|
22
|
-
with:
|
|
23
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
24
|
-
|
|
25
|
-
- name: Get package manager's global cache path
|
|
26
|
-
id: global-cache-dir-path
|
|
27
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
28
|
-
|
|
29
|
-
- name: Cache package manager's global cache and node_modules
|
|
30
|
-
id: cache-dependencies
|
|
31
|
-
uses: actions/cache@v2
|
|
32
|
-
with:
|
|
33
|
-
path: |
|
|
34
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
35
|
-
node_modules
|
|
36
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
37
|
-
hashFiles('**/yarn.lock'
|
|
38
|
-
) }}
|
|
39
|
-
restore-keys: |
|
|
40
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
41
|
-
|
|
42
|
-
- name: Install Dependencies
|
|
43
|
-
run: yarn install --frozen-lockfile
|
|
44
|
-
if: |
|
|
45
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
46
|
-
|
|
47
|
-
- name: Lint
|
|
48
|
-
run: yarn lint
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
test:
|
|
52
|
-
name: Tests
|
|
53
|
-
runs-on: ${{ matrix.os }}
|
|
54
|
-
needs: lint
|
|
55
|
-
|
|
56
|
-
strategy:
|
|
57
|
-
matrix:
|
|
58
|
-
os: [ubuntu-latest]
|
|
59
|
-
browser: [chrome]
|
|
60
|
-
|
|
61
|
-
steps:
|
|
62
|
-
- uses: actions/checkout@v2
|
|
63
|
-
with:
|
|
64
|
-
fetch-depth: 1
|
|
65
|
-
|
|
66
|
-
- uses: actions/setup-node@v2-beta
|
|
67
|
-
with:
|
|
68
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
69
|
-
|
|
70
|
-
- name: Get package manager's global cache path
|
|
71
|
-
id: global-cache-dir-path
|
|
72
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
73
|
-
|
|
74
|
-
- name: Cache package manager's global cache and node_modules
|
|
75
|
-
id: cache-dependencies
|
|
76
|
-
uses: actions/cache@v2
|
|
77
|
-
with:
|
|
78
|
-
path: |
|
|
79
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
80
|
-
node_modules
|
|
81
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
82
|
-
hashFiles('**/yarn.lock'
|
|
83
|
-
) }}
|
|
84
|
-
restore-keys: |
|
|
85
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
86
|
-
|
|
87
|
-
- name: Install Dependencies
|
|
88
|
-
run: yarn install --frozen-lockfile
|
|
89
|
-
if: |
|
|
90
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
91
|
-
|
|
92
|
-
- name: Test
|
|
93
|
-
run: yarn test:ember:percy --launch ${{ matrix.browser }}
|
|
94
|
-
env:
|
|
95
|
-
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
|
96
|
-
|
|
97
|
-
floating-dependencies:
|
|
98
|
-
name: Floating Dependencies
|
|
99
|
-
runs-on: ${{ matrix.os }}
|
|
100
|
-
needs: lint
|
|
101
|
-
|
|
102
|
-
strategy:
|
|
103
|
-
matrix:
|
|
104
|
-
os: [ubuntu-latest]
|
|
105
|
-
browser: [chrome]
|
|
106
|
-
|
|
107
|
-
steps:
|
|
108
|
-
- uses: actions/checkout@v2
|
|
109
|
-
with:
|
|
110
|
-
fetch-depth: 1
|
|
111
|
-
|
|
112
|
-
- uses: actions/setup-node@v2-beta
|
|
113
|
-
with:
|
|
114
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
115
|
-
|
|
116
|
-
- name: Get package manager's global cache path
|
|
117
|
-
id: global-cache-dir-path
|
|
118
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
119
|
-
|
|
120
|
-
- name: Cache package manager's global cache and node_modules
|
|
121
|
-
id: cache-dependencies
|
|
122
|
-
uses: actions/cache@v2
|
|
123
|
-
with:
|
|
124
|
-
path: |
|
|
125
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
126
|
-
node_modules
|
|
127
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
128
|
-
hashFiles('**/yarn.lock'
|
|
129
|
-
) }}
|
|
130
|
-
restore-keys: |
|
|
131
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
132
|
-
|
|
133
|
-
- name: Install Dependencies
|
|
134
|
-
run: yarn install --no-lockfile --non-interactive
|
|
135
|
-
|
|
136
|
-
- name: Test
|
|
137
|
-
run: yarn test:ember:percy --launch ${{ matrix.browser }}
|
|
138
|
-
env:
|
|
139
|
-
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
|
140
|
-
|
|
141
|
-
try-scenarios:
|
|
142
|
-
name: Tests - ${{ matrix.ember-try-scenario }}
|
|
143
|
-
runs-on: ubuntu-latest
|
|
144
|
-
continue-on-error: true
|
|
145
|
-
needs: test
|
|
146
|
-
|
|
147
|
-
strategy:
|
|
148
|
-
fail-fast: true
|
|
149
|
-
matrix:
|
|
150
|
-
ember-try-scenario: [
|
|
151
|
-
ember-lts-3.20,
|
|
152
|
-
ember-lts-3.24,
|
|
153
|
-
ember-release,
|
|
154
|
-
ember-beta,
|
|
155
|
-
# ember-canary,
|
|
156
|
-
ember-default-with-jquery,
|
|
157
|
-
ember-classic,
|
|
158
|
-
# embroider-safe,
|
|
159
|
-
# embroider-optimized
|
|
160
|
-
]
|
|
161
|
-
|
|
162
|
-
steps:
|
|
163
|
-
- uses: actions/checkout@v2
|
|
164
|
-
with:
|
|
165
|
-
fetch-depth: 1
|
|
166
|
-
|
|
167
|
-
- uses: actions/setup-node@v2-beta
|
|
168
|
-
with:
|
|
169
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
170
|
-
|
|
171
|
-
- name: Get package manager's global cache path
|
|
172
|
-
id: global-cache-dir-path
|
|
173
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
174
|
-
|
|
175
|
-
- name: Cache package manager's global cache and node_modules
|
|
176
|
-
id: cache-dependencies
|
|
177
|
-
uses: actions/cache@v2
|
|
178
|
-
with:
|
|
179
|
-
path: |
|
|
180
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
181
|
-
node_modules
|
|
182
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
183
|
-
hashFiles('**/yarn.lock'
|
|
184
|
-
) }}
|
|
185
|
-
restore-keys: |
|
|
186
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
187
|
-
|
|
188
|
-
- name: Install Dependencies
|
|
189
|
-
run: yarn install --frozen-lockfile
|
|
190
|
-
if: |
|
|
191
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
192
|
-
|
|
193
|
-
- name: Test
|
|
194
|
-
env:
|
|
195
|
-
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
|
|
196
|
-
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
|
package/.husky/pre-commit
DELETED