Skip to content

Commit 17d9487

Browse files
committed
chore: clean up docs to make it more structured
1 parent 6bb8323 commit 17d9487

File tree

5 files changed

+10
-39
lines changed

5 files changed

+10
-39
lines changed

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install
1515
## Running Locally
1616

1717
```
18-
npm start # starts watcher + dev server
18+
npm run start # starts watcher + dev server for development pages
1919
npm run start:react18 # starts watcher + dev server (React 18)
2020
```
2121

@@ -25,7 +25,7 @@ The dev server runs at `http://localhost:8080`. Pages are served from `pages/<co
2525

2626
For component structure, props, events, and refs, see docs/COMPONENT_CONVENTIONS.md.
2727
For design tokens, CSS rules, and RTL support, see docs/STYLING.md.
28-
For test commands and configs, see docs/TESTING.md.
28+
For running tests and configs, see docs/TESTING.md.
2929
For writing tests and test utils, see docs/WRITING_TESTS.md.
3030
For prettier, stylelint, and eslint (`npm run lint`), see docs/CODE_STYLE.md.
3131
For dev/test pages and running in the browser, see docs/DEV_PAGES.md.

docs/API_DOCS.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,14 @@
11
# API Documentation Comments
22

3-
Documentation is generated from JSDoc comments in component interface files (`src/<component>/interfaces.ts`).
4-
5-
## Writing Prop Descriptions
6-
7-
Every public prop must have a JSDoc comment. For union/enum props, list available options inline:
8-
9-
```ts
10-
/** Determines the general styling of the button as follows:
11-
* * `primary` for primary buttons.
12-
* * `normal` for secondary buttons.
13-
* * `link` for tertiary buttons.
14-
*/
15-
variant?: ButtonProps.Variant;
16-
```
3+
This project uses `@cloudscape-design/documenter` to generate API docs from JSDoc comments in component interface files (`src/<component>/interfaces.ts`).
174

185
## Special Tags
196

20-
- `@displayname` — overrides the display name for children slots (e.g. `children``text`)
7+
- `@i18n` — marks internationalization properties
8+
- `@analytics` — marks analytics metadata properties
9+
- `@deprecated` — marks deprecated properties (include replacement info)
10+
- `@displayname` — overrides the display name (e.g. `children``text`)
2111

2212
## Sub-types
2313

24-
Define union types as named type aliases in the component's namespace, not as inline unions:
25-
26-
```ts
27-
export namespace ButtonProps {
28-
export type Variant = 'normal' | 'primary' | 'link' | 'icon' | 'inline-icon' | 'inline-link';
29-
}
30-
```
31-
32-
Then reference them in the interface: `variant?: ButtonProps.Variant`.
14+
Define union types as named type aliases in the component's namespace, not as inline unions. Then reference them in the interface: `variant?: ButtonProps.Variant`.

docs/DEV_PAGES.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@
22

33
Dev and test pages live in `pages/<component-name>/`. They are used for local development, integration tests, and visual regression tests.
44

5-
## Running Dev Pages
6-
7-
```
8-
npm run quick-build # build first (required before starting)
9-
npm start # starts watcher + dev server at http://localhost:8080
10-
```
11-
125
## Rules
136

147
- Import components via `~components/<name>` (not relative paths to `src/`)
15-
- For visual regression content, either use `SimplePage` from `pages/app/templates` (handles heading, screenshot area, i18n, and layout) or wrap content in `ScreenshotArea` from `pages/utils/screenshot-area`.
8+
- For visual regression content, either use `SimplePage` (handles heading, screenshot area, i18n, and layout) or wrap content in `ScreenshotArea`.
169
- Use `createPermutations` and `PermutationsView` from `pages/utils/` for permutation pages.

docs/STYLING.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
Prefer design tokens and custom CSS properties over hardcoded values (colors, spacing, font sizes, etc.). This keeps styles consistent across themes and modes.
44

5-
## Design Tokens
6-
7-
Tokens are defined in `style-dictionary/` and consumed in SCSS via the `awsui` namespace.
8-
95
## Rules
106

117
- Root elements must not have outer margins — spacing is managed by parent components

docs/TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Testing
1+
# Running Tests
22

33
## Quick Reference
44

0 commit comments

Comments
 (0)