You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+90-16Lines changed: 90 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,38 +1,38 @@
1
1
# 🌤️ What is the goal of the design system?
2
2
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.
💚 **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.**
16
16
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.
18
18
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.**
20
20
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.
22
22
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.**
24
24
25
25
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.
26
26
27
27
## Who makes design system decisions?
28
28
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.
30
30
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.
32
32
33
33
## How do we decide whether something is one-off or when the component should be updated universally?
34
34
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.
36
36
37
37
### Safe to update:
38
38
@@ -48,13 +48,13 @@ Development-wise, I think we should always strive for universal changes if compo
48
48
49
49
## How can we include time for updating components during cycle work?
50
50
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.
52
52
53
53
## ✏️ How do we write stories and documentation?
54
54
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.
56
56
- 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.
58
58
59
59
# Future additions to this document
60
60
@@ -72,7 +72,7 @@ How do we determine whether it's a major, minor, or patch release?
72
72
# Developer Resources
73
73
74
74
## 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
76
76
node packages.
77
77
78
78
## Available Scripts
@@ -103,6 +103,30 @@ Runs ESLint to report on any style violations
103
103
104
104
> Note- we are on the free plan (5k images/month) so be mindful of the limit
105
105
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
+
106
130
## Pull requests
107
131
108
132
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
131
155
* Run `yarn test` to ensure tests are passing.
132
156
* Click the Squash and merge button on your pull request and edit your commit message to a concise description of your changes.
133
157
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.
135
165
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:
137
185
* Update the "version" field in package.json.
138
186
* Run `yarn build` to compile the source files and write out to the lib directory.
139
187
* 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
143
191
* 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.
144
192
* Upload the binary that was created from running `npm pack`.
145
193
* 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.
0 commit comments