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
| Name / Title (required) | Name of the component | Use the singular form. Keep it as short as possible. Use sentence case ("Select menu", and not "SelectMenu"). |
17
-
| Description (required) | In a sentence, what is this component used for. | It should allow the reader to decide if they should continue reading or move on. Avoid going into specific usage and implementation detail. Don’t include guidelines. Don’t repeat words from the title to describe the content. |
18
-
| Anatomy (required) | A labelled image of the most representative view(s) of the component, followed by a glossary of the constituent parts. | What smaller components constitute the larger pattern. |
19
-
| Usage (required) | List of dos and donts covering the most important ways of how to (and not) use the component. This section can also be referred to as **Options**. | Consider when and how this component could be used incorrectly, what are the ideal ways of using it, special cases, alternative components (include links if needed). |
20
-
| Hierarchy and placement | Where to use the component and how it interacts with the rest of the UI. | Include images and dos and donts of how the component should be used within the UI. |
21
-
| Accessibility | Accessibility considerations when using the component. | Include keyboard navigation, descriptions, common mistakes to avoid. |
7
+
If you are writing documentation, please read the [documentation guidelines](https://primer.style/contribute/documentation). |
Copy file name to clipboardexpand all lines: content/guides/contribute/documentation.mdx
+51
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,57 @@ The description appears directly under the title of the component. It may be aut
169
169
#### Related components and patterns
170
170
171
171
Any components or patterns that you may want to reference as related to this component. This could include components that are similar, or components that are used in conjunction with this component. See [Autocomplete](/components/autocomplete#related-components-and-patterns) as an example.
172
+
173
+
### Minimum-viable component documentation
174
+
175
+
One of the strategies to help Primer documentation become self-serve is to accurately represent the breadth of patterns and components we have available through our documentation.
176
+
177
+
To do this, we are increasing our coverage to include 100% of available-for-use components temporarily in the primer/design repository. Executing on this plan requires us to be practical and concise in terms of the depth of the documentation. In order to ensure we can reach 100% coverage, we're using a "minimum-viable documentation" approach.
Aside from components we deem to be high touch and therefore requiring more in-depth documentation, the majority of components that are missing usage guidelines will be documented with the following minimum requirements:
188
+
189
+
##### Minimum-viable description
190
+
191
+
- brief text describing what the component is
192
+
- link to available implementations
193
+
- image, if applicable
194
+
195
+
##### Minimum-viable usage guidance
196
+
197
+
- proper usage guides
198
+
- visual examples, such as an image or gif demonstrating what the component is
199
+
200
+
#### Add more documentation if it's readily available
201
+
202
+
If more information (than required above) is easily accessible and doesn't require a huge time investment to include, it should be added to to the minimum-viable component documentation. Some examples of this include listing out related components, cross-linking to Accessibility guidelines, and more.
203
+
204
+
### Tips and tricks
205
+
206
+
- A great starting off point is to consolidate existing documentation for the component that's already available. Places to look:
207
+
- Figma ([Primer Web file](https://www.figma.com/file/GCvY3Qv8czRgZgvl1dG6lp/Primer-Web?node-id=179%3A3870))
- Related components that may have guidelines applicable to your component
215
+
- Take a look at an existing component that was documented using this approach, such as [Action menu](/components/action-menu)
216
+
217
+
#### Recommendations for tackling this work quickly and efficiently
218
+
219
+
- Work in pairs or with a small group. Dedicate 1-2 components per person, with each person in the group responsible for reviewing the others' PRs.
220
+
- Timebox each component to x hour(s) for writing, x hour(s) for reviewing, and x hour(s) for writing revisions.
221
+
- If you feel blocked by a lack of information about the component to write useful documentation, move on to documenting a different component until we can get the context we need.
222
+
172
223
## Review process
173
224
174
225
All pull requests for new and updated guidelines should be reviewed and approved by a member of the Design Infrastructure team.
0 commit comments