Skip to content

Commit 5056d03

Browse files
Rachel RoppoloRachel Roppolo
authored andcommitted
Merge branch 'release/1.24.0' into main
2 parents e0bf561 + 6fb1166 commit 5056d03

39 files changed

+1362
-136
lines changed

.github/workflows/create-new-release.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: "Create new release"
22

3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: 'The version you want to release.'
8-
required: true
3+
on: workflow_dispatch
94

105
jobs:
116
create-new-release:
@@ -16,6 +11,8 @@ jobs:
1611
steps:
1712
- uses: actions/checkout@v2
1813
- uses: actions/setup-node@v1
14+
with:
15+
node-version: '14.17.4'
1916
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
2017
npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN
2118
- run: yarn install
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Run Nightly Percy Tests"
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
env:
9+
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
- run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/
14+
- run: npm config set "//npm.fontawesome.com/:_authToken" $FONTAWESOME_NPM_AUTH_TOKEN
15+
- name: Install
16+
run: yarn
17+
- run: npm install -g wait-on
18+
- run: yarn storybook & wait-on http://localhost:9009
19+
- name: Percy Test
20+
uses: percy/[email protected]
21+
with:
22+
command: "cypress run"
23+
env:
24+
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "Prepare hotfix"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The version you want to release.'
8+
required: true
9+
10+
jobs:
11+
prepare-hotfix:
12+
name: Prepare hotfix
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: '14.17.4'
21+
22+
- name: Create hotfix branch
23+
run: git checkout -b hotfix/${{ github.event.inputs.version }}
24+
25+
- name: Initialize mandatory git config
26+
uses: fregante/setup-git-user@v1
27+
28+
- name: Bump version in package.json
29+
run: yarn version --new-version ${{ github.event.inputs.version }} --no-git-tag-version
30+
31+
- name: Commit manifest files
32+
id: make-commit
33+
run: |
34+
git add package.json
35+
git commit --message "Prepare hotfix ${{ github.event.inputs.version }}"
36+
37+
echo "::set-output name=commit::$(git rev-parse HEAD)"
38+
39+
- name: Publish hotfix branch
40+
run: git push origin hotfix/${{ github.event.inputs.version }}
41+
42+
- name: Merge hotfix into main branch
43+
uses: thomaseizinger/[email protected]
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
head: hotfix/${{ github.event.inputs.version }}
48+
base: main
49+
title: Merge hotfix/${{ github.event.inputs.version }} into main branch
50+
51+
- name: Merge hotfix into develop branch
52+
uses: thomaseizinger/[email protected]
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
head: hotfix/${{ github.event.inputs.version }}
57+
base: develop
58+
title: Merge hotfix/${{ github.event.inputs.version }} into develop branch
59+

.github/workflows/prepare-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ on:
88
required: true
99

1010
jobs:
11-
create-new-release:
12-
name: Create new release
11+
prepare-release:
12+
name: Prepare release
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
1616
with:
1717
fetch-depth: 0
1818
- uses: actions/setup-node@v1
19+
with:
20+
node-version: '14.17.4'
1921

2022
- name: Create release branch
2123
run: git checkout -b release/${{ github.event.inputs.version }}

.github/workflows/release.yml

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

.percy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: 2
2+
snapshot:
3+
widths:
4+
- 1280

README.md

Lines changed: 90 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# 🌤️ What is the goal of the design system?
22

3-
The goal of the design system is to achieve visual and experiential consistency throughout the app while streamlining the design and implementation process. The design system should contain all reusable components, one-off variations, and guidelines that are used to build up the existing and future screens of our application. It should direct us to be mindful of when we're consciously diverging from the established system.
3+
The goal of the design system is to achieve visual and experiential consistency throughout the app while streamlining the design and implementation process. The design system should contain all reusable components, one-off variations, and guidelines that are used to build up the existing and future screens of our application. It should direct us to be mindful of when we're consciously diverging from the established system.
44

55
## References and inspiration
66
- [Carbon - IBM](https://www.carbondesignsystem.com/)
7-
- [Material Design](https://material.io/design)
7+
- [Material Design](https://material.io/design)
88
- [Primer - Github](https://primer.style/)
99
- [Ant Design](https://ant.design/)
1010

1111
# Updating
1212

1313
## 🕰️ When do we update the design system?
1414

15-
💚 **Scenario: We need a new component in the design system that is already in the Figma DS, and adding the new component is straightforward and will not significantly affect timeline of the effort.**
15+
💚 **Scenario: We need a new component in the design system that is already in the Figma DS, and adding the new component is straightforward and will not significantly affect timeline of the effort.**
1616

17-
We should go ahead and add the new component into Storybook and use the new component in the design.
17+
We should go ahead and add the new component into Storybook and use the new component in the design.
1818

19-
⏲️ **Scenario: We need a new component in the design system that is already in the Figma DS, but adding the new component will affect timeline for the effort.**
19+
⏲️ **Scenario: We need a new component in the design system that is already in the Figma DS, but adding the new component will affect timeline for the effort.**
2020

21-
We should build the component in a way that will allow for simple transfer into the design system. Adding the component into the design system should be a follow-on task immediately after the effort.
21+
We should build the component in a way that will allow for simple transfer into the design system. Adding the component into the design system should be a follow-on task immediately after the effort.
2222

23-
🧠 **Scenario: We have a situation where a new component would improve the usability of our design, but it is not yet defined in the Figma DS or in Storybook.**
23+
🧠 **Scenario: We have a situation where a new component would improve the usability of our design, but it is not yet defined in the Figma DS or in Storybook.**
2424

2525
These often pop up in the #design-review channel and decisions will depend on designer and development bandwidth. We should strive to make considered designs that continue to push the usability of our app forward while building brand consistency. If there is alignment on a design need, we should add the new component or variation to the Figma DS and add the new component into the design system. If we do not have bandwidth to align on a new design and add the variation to the design system, we should do the best we can with existing patterns.
2626

2727
## Who makes design system decisions?
2828

29-
Designers can make proposals to update the design system at any point. These changes are submitted to #design-review, and other designers can weigh in with thoughts. There should be a general consensus on why and how the design system should be changed to better suit our needs. Wen is responsible for weighing input and proposing a path forward, looping in JH when necessary.
29+
Designers can make proposals to update the design system at any point. These changes are submitted to #design-review, and other designers can weigh in with thoughts. There should be a general consensus on why and how the design system should be changed to better suit our needs. Wen is responsible for weighing input and proposing a path forward, looping in JH when necessary.
3030

31-
On the development side, Dave and Rachel oversee how components are organized and implemented to be put into use most effectively.
31+
On the development side, Dave and Rachel oversee how components are organized and implemented to be put into use most effectively.
3232

3333
## How do we decide whether something is one-off or when the component should be updated universally?
3434

35-
Development-wise, I think we should always strive for universal changes if components are being updated. However, some changes are easily made with confidence that we won't cause issues with the app, while others will require more QA.
35+
Development-wise, I think we should always strive for universal changes if components are being updated. However, some changes are easily made with confidence that we won't cause issues with the app, while others will require more QA.
3636

3737
### Safe to update:
3838

@@ -48,13 +48,13 @@ Development-wise, I think we should always strive for universal changes if compo
4848

4949
## How can we include time for updating components during cycle work?
5050

51-
Keeping the design system relevant is important for consistency in our app. Core product requirements should still take priority, but we should make the design system updates necessary for each effort before tackling nice-to-haves.
51+
Keeping the design system relevant is important for consistency in our app. Core product requirements should still take priority, but we should make the design system updates necessary for each effort before tackling nice-to-haves.
5252

5353
## ✏️ How do we write stories and documentation?
5454

55-
- For every component, we typically separate each variant out into its own story that gets exported.
55+
- 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.
5858

5959
# Future additions to this document
6060

@@ -72,7 +72,7 @@ How do we determine whether it's a major, minor, or patch release?
7272
# Developer Resources
7373

7474
## Initial Setup
75-
After cloning the repo, obtain a `.npmrc` file from another developer. This file contains authorization tokens for any private
75+
After cloning the repo, obtain a `.npmrc` file from another developer. This file contains authorization tokens for any private
7676
node packages.
7777

7878
## Available Scripts
@@ -103,6 +103,30 @@ Runs ESLint to report on any style violations
103103

104104
> Note- we are on the free plan (5k images/month) so be mindful of the limit
105105
106+
### `yarn rs:link`
107+
108+
Creates symlinks for packages needed to develop/debug against our `rails-server` repository.
109+
110+
### `yarn rs:link:watch`
111+
112+
Trigger a production build when files are changed.
113+
114+
### `yarn rs:unlink`
115+
116+
Remove symlinked packages.
117+
### Visual testing
118+
119+
1. Join BrowserStack team (ask Brian/Bob for link)
120+
1. Navigate to this project in [Percy](https://percy.io/f38ae9b9/ui-design-system)
121+
122+
## Local setup
123+
1. Define `PERCY_TOKEN` ENV (the one from ui-design-system project found above)
124+
1. Run `yarn storybook` in one tab
125+
1. Run `npx percy exec -- cypress run` in another
126+
1. View results in percy.io & console
127+
128+
> Note- we are running this once a day via github actions.
129+
106130
## Pull requests
107131

108132
Our branch names consist of 3 parts:
@@ -131,9 +155,33 @@ Once your pull request has been approved by all parties, you may begin the merge
131155
* Run `yarn test` to ensure tests are passing.
132156
* Click the Squash and merge button on your pull request and edit your commit message to a concise description of your changes.
133157

134-
## Release steps
158+
## Release process
159+
160+
This repository follows the [git flow release process](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
161+
* Each new feature branch uses develop as its parent branch and is merged back into develop upon completion.
162+
* Each new hotfix branch uses main as its parent branch and is merged directly into main.
163+
164+
This package uses [Semantic versioning](https://semver.org/), which requires version numbers in MAJOR.MINOR.PATCH format. Any breaking changes to the API require an update to the MAJOR version. Backwards compatible changes only require an update to the MINOR version. Hotfixes and patches need only update the PATCH version.
135165

136-
This package uses [Semantic versioning](https://semver.org/), which requires version numbers in MAJOR.MINOR.PATCH format. Any breaking changes to the API require an update to the MAJOR version. Backwards compatible changes only require an update to the MINOR version. Hotfixes and patches need only update the PATCH version. Once you have commits ready to bundle you may begin the release process:
166+
To create a new release off of the current develop:
167+
* Run the "Prepare release" github action which will
168+
* Create a new release branch off of the latest develop and increment package.json
169+
* Create a pull request of the release branch against main
170+
* Create a pull request of the release branch against develop
171+
* From there the developer can merge the PRs via github
172+
* Run the "Create new release" github action which will build the project and create a new release off of the latest main
173+
174+
To create a patch release for a hotfix off the current main:
175+
* Run the "Prepare hotfix" github action which will
176+
* Create a hotfix off the latest main and increment package.json
177+
* Create a pull request of the hotfix branch against main
178+
* Create a pull request of the release branch against develop
179+
* From there the developer can merge the PRs via github
180+
* Run the "Create new release" github action which will build the project and create a new release off of the latest main
181+
182+
## Manual Release steps
183+
184+
If you are not able to or choose not to use the github actions described above, the following is the process to manually create a new release. Once you have commits ready to bundle you may begin the release process:
137185
* Update the "version" field in package.json.
138186
* Run `yarn build` to compile the source files and write out to the lib directory.
139187
* Run `npm pack` to archive all of the source files. Note: you can run `npm pack --dry-run` to see a list of files that will be included in the package. This is useful to double check a new component is being added or to see the size of the package/individual files.
@@ -143,3 +191,29 @@ This package uses [Semantic versioning](https://semver.org/), which requires ver
143191
* Run `git log $(git describe --tags --abbrev=0)..HEAD --oneline` to get a list of all commits since the latest release and copy these into the "Describe this release" field.
144192
* Upload the binary that was created from running `npm pack`.
145193
* Publish release.
194+
195+
## Developing against the Rails Server repo
196+
197+
### Starting up development
198+
1. run these commands inside the root of the DS repo:
199+
````bash
200+
yarn rs:link && yarn rs:link:watch
201+
````
202+
💡 at this point you should see a nodemon process running
203+
204+
2. run these commands inside the root of the RS repo:
205+
````bash
206+
bin/link-ds
207+
````
208+
### Wrapping up development
209+
1. run these commands inside the root of the RS repo:
210+
````bash
211+
bin/unlink-ds
212+
````
213+
2. run these commands inside the root of the DS repo:
214+
````bash
215+
yarn rs:unlink
216+
````
217+
218+
#### 🤔 Snags
219+
- you'll have to manually refresh your browser tab, after the automatic refresh, to see your expected changes.

bin/link-rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
yarn link
4+
cd node_modules/react
5+
yarn link
6+
cd ../../node_modules/react-dom
7+
yarn link

bin/unlink-rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
unlink()
4+
{
5+
local package_name="${2:-$1}"
6+
7+
output=$(eval "yarn unlink $1")
8+
9+
echo "$output"
10+
echo "== $package_name unlinked =="
11+
}
12+
13+
unlink '' 'DS package'
14+
unlink 'react'
15+
unlink 'react-dom'
16+
17+
yarn install --force

0 commit comments

Comments
 (0)