Skip to content

Commit fb49996

Browse files
github-actions[bot]rroppolocareful-axejasonbasuilbrianCollinsUI
authored
Merge release/1.25.0 into main branch (#494)
* HOTFIX update tooltip primary variant to ux-emerald (#415) * Feature RS-8352 Tabs (#477) Add Tabs and Tabs with react-bootstrap and styled-components * feature/UIDS-442 add Button to DS (#450) Adds react-bootstrap and Button component to the Design System * Bug/UIDS-484 Set node version on nightly visual tests (#485) * chore/UIDS-476 documentation updates (#486) * Chore/ Add Percy snapshots for buttons (#488) * Chore/ Delete old sample file for cypress tests (#482) * Merge hotfix/1.24.1 into develop branch (#493) * allows Tooltip to open on hover (#487) * Prepare release 1.25.0 Co-authored-by: Rachel Roppolo <[email protected]> Co-authored-by: Jane Sebastian <[email protected]> Co-authored-by: Jason Basuil <[email protected]> Co-authored-by: brianCollinsUI <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 01593c3 commit fb49996

Some content is hidden

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

53 files changed

+4136
-963
lines changed

.github/workflows/percy-nightly-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ jobs:
88
env:
99
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
1010
steps:
11-
- name: Checkout
12-
uses: actions/checkout@master
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '14.17.4'
1315
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/
1416
- run: npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN
1517
- name: Install

.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
name: '@storybook/addon-docs',
55
options: { mdxBabelOptions: { babelrc: true, configFile: true } },
66
},
7-
'@storybook/addon-a11y/register',
7+
'@storybook/addon-a11y',
88
'@storybook/addon-actions/register',
99
'@storybook/addon-knobs/register',
1010
'@storybook/addon-links/register',

.storybook/manager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { addons } from '@storybook/addons';
2+
3+
import userInterviewsTheme from './user-interviews-theme';
4+
5+
addons.setConfig({
6+
theme: userInterviewsTheme,
7+
});

.storybook/preview.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import React from 'react';
22
import { addDecorator } from "@storybook/react";
3-
import { withA11y } from "@storybook/addon-a11y";
43

54
addDecorator(story => <div style={{ padding: '1rem' }}>{story()}</div>);
6-
addDecorator(withA11y);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { create } from '@storybook/theming';
2+
import UILogo from '../public/ui-design-system.svg';
3+
4+
export default create({
5+
base: 'light',
6+
brandTitle: 'User Interviews',
7+
brandUrl: 'https://github.com/user-interviews/ui-design-system',
8+
brandImage: UILogo,
9+
});

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,35 @@ Keeping the design system relevant is important for consistency in our app. Core
5454

5555
- For every component, we typically separate each variant out into its own story that gets exported.
5656
- Documentation lives in `Component.mdx` which references stories defined in `Component.stories.jsx`. See documentation style here in [Stories with arbitrary MDX](https://github.com/storybookjs/storybook/blob/master/addons/docs/docs/recipes.md#csf-stories-with-arbitrary-mdx).
57-
- See our [Storybook Notion Doc](https://www.notion.so/userinterviews1/Storybook-9a3585db57514ec783e39c78518ad5e6) for examples.
57+
- See our [Storybook Notion Doc](https://www.notion.so/userinterviews1/Storybook-9a3585db57514ec783e39c78518ad5e6) for examples. You can find our current documentation template that we try to follow for all of our `mdx` files in that Notion doc.
58+
59+
## Who can update documentation?
60+
61+
- Anyone! We encourage all contributors to the Design System (engineers, designers, product) to add to our documentation.
62+
63+
## Steps to update any documentation file
64+
65+
After cloning the repo, obtain a `.npmrc` file from another developer. This file contains authorization tokens for any private
66+
node packages.
67+
68+
### `git checkout -b chore/UIDS-###-update-some-component-documentation`
69+
70+
In your terminal, check out a new branch locally for you to make changes. You should have a Github issue to track that corresponds to the branch name.
71+
72+
### `yarn install`
73+
74+
Installs all yarn dependencies
75+
76+
### `yarn storybook`
77+
78+
Launches the Storybook server.<br />
79+
80+
- In the code editor of your choice, navigate to the Component library found under src `ui-design-system/src`
81+
- Open any `Component.mdx` file (e.g. `Alert.mdx`) that you want to edit. These are markdown files. See [markdown docs](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for additional how-to.
82+
- While Storybook is running, you should be able to view any changes you make to the `mdx` file after saving your changes.
83+
- Push your changes to Github and submit for a review / pull request.
84+
85+
If you need any help with setup or have questions about the process of writing documentation, feel free to reach out to a developer or a member of the Design System team.
5886

5987
# Future additions to this document
6088

@@ -80,7 +108,7 @@ In the project directory, you can run:
80108

81109
### `yarn storybook`
82110

83-
Launches the Storybook server.<br />
111+
Launches the Storybook server.
84112

85113
### `yarn install`
86114

@@ -216,4 +244,4 @@ If you are not able to or choose not to use the github actions described above,
216244
````
217245

218246
#### 🤔 Snags
219-
- you'll have to manually refresh your browser tab, after the automatic refresh, to see your expected changes.
247+
- you'll have to manually refresh your browser tab, after the automatic refresh, to see your expected changes.

cypress/integration/button_spec.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const buttons = [
2+
{
3+
name: 'Primary',
4+
path: 'design-system-button--primary',
5+
class: '.Button',
6+
match: 'Confirm',
7+
},
8+
{
9+
name: 'Danger',
10+
path: 'design-system-button--danger',
11+
class: '.Button',
12+
match: 'Delete',
13+
},
14+
{
15+
name: 'Warning',
16+
path: 'design-system-button--warning',
17+
class: '.Button',
18+
match: 'Edit',
19+
},
20+
];
21+
22+
describe('Button', () => {
23+
buttons.forEach((test) => {
24+
it(test.name, () => {
25+
cy.visit(test.path);
26+
cy.get('#storybook-preview-iframe').iframe().find(test.class).should('contain', test.match);
27+
cy.wait(1000);
28+
cy.percySnapshot(test.path);
29+
});
30+
});
31+
});

cypress/integration/sample_spec.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ module.exports = {
128128
// setupFiles: [],
129129

130130
// A list of paths to modules that run some code to configure or set up the testing framework before each test
131-
// setupFilesAfterEnv: [],
131+
setupFilesAfterEnv: [
132+
'<rootDir>/spec/spec_helper.js'
133+
],
132134

133135
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
134136
// snapshotSerializers: [],

package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@user-interviews/ui-design-system",
3-
"version": "1.24.1",
3+
"version": "1.25.0",
44
"dependencies": {
5+
"react-bootstrap": "^2.0.2",
56
"react-router-dom": "^5.2.0",
67
"react-select": "^3.0.8",
78
"react-transition-group": "^4.3.0",
@@ -43,14 +44,14 @@
4344
"@popperjs/core": "^2.5.3",
4445
"bootstrap": "5.0",
4546
"classnames": "^2.2.5",
46-
"node-sass": "^4.13.0",
4747
"prop-types": "^15.6.1",
4848
"react": "^16.12.0",
4949
"react-copy-to-clipboard": "^5.0.2",
5050
"react-dom": "^16.12.0",
5151
"react-modal": "^3.12.1",
5252
"react-popper": "^2.2.3",
53-
"react-tracking": "^8.1.0"
53+
"react-tracking": "^8.1.0",
54+
"styled-components": "^5.3.3"
5455
},
5556
"devDependencies": {
5657
"@babel/cli": "^7.8.4",
@@ -78,7 +79,10 @@
7879
"@storybook/addons": "^6.2.1",
7980
"@storybook/react": "^6.2.1",
8081
"@storybook/storybook-deployer": "^2.8.7",
82+
"@testing-library/jest-dom": "^5.15.0",
83+
"@testing-library/react": "^12.1.2",
8184
"@testing-library/react-hooks": "^3.2.1",
85+
"@testing-library/user-event": "^13.5.0",
8286
"babel-eslint": "^10.0.3",
8387
"babel-loader": "^8.0.6",
8488
"babel-plugin-module-resolver": "^4.0.0",
@@ -100,7 +104,7 @@
100104
"eslint-plugin-react-hooks": "^2.5.1",
101105
"eslint-utils": "^1.4.3",
102106
"jest": "^26.6.3",
103-
"node-sass": "4.13.1",
107+
"node-sass": "^4.14.1",
104108
"nodemon": "^2.0.15",
105109
"prop-types": "^15.6.1",
106110
"react": "16.14.0",
@@ -111,7 +115,11 @@
111115
"react-test-renderer": "^16.12.0",
112116
"react-tracking": "8.1.0",
113117
"sass-loader": "^8.0.2",
114-
"style-loader": "^1.1.3"
118+
"style-loader": "^1.1.3",
119+
"styled-components": "^5.3.3"
120+
},
121+
"resolutions": {
122+
"styled-components": "^5"
115123
},
116124
"description": "UI Storybook design system",
117125
"files": [

0 commit comments

Comments
 (0)