|
1 | | -# Open Fresno Storybook (Next.js) |
| 1 | +# Open Fresno website documentation |
2 | 2 |
|
3 | | -This repository hosts the **Storybook + Next.js testing environment** for Open Fresno. It provides a sandbox for building, documenting, and testing UI components in isolation before they are integrated into the main site. The main repository is https://github.com/openfresno/openfresno.org. |
| 3 | +This repository hosts the **Storybook + Next.js testing environment** for the Open Fresno website. It provides a sandbox |
| 4 | +for building, documenting, and testing UI components in isolation before they are integrated into the main site. |
4 | 5 |
|
5 | | -## Get Started |
6 | | - |
7 | | -### Prerequisites |
8 | | - |
9 | | -- Node.js |
10 | | -- PNPM |
11 | | - |
12 | | -### Installation |
| 6 | +> [!NOTE] |
| 7 | +> The Open Fresno website repository |
| 8 | +> is [github.com/openfresno/openfresno.org](https://github.com/openfresno/openfresno.org). |
13 | 9 |
|
14 | | -Clone the repo and install dependencies: |
| 10 | +> [!WARNING] |
| 11 | +> The code should be periodically kept up to date with the main repository by manually copy/pasting the `src/` folder. |
15 | 12 |
|
16 | | -``` |
17 | | -git clone https://github.com/openfresno/fe-openfresno-doc |
18 | | -cd fe-openfresno-doc |
19 | | -pnpm i |
20 | | -``` |
| 13 | +## Prerequisites |
21 | 14 |
|
22 | | -### Running Storybook |
| 15 | +- PNPM. Get help installing |
| 16 | + PNPM [here](https://openfresno.github.io/fe-openfresno.org-doc/?path=/docs/developer-guide--docs#install-pnpm) |
| 17 | + or https://pnpm.io/installation. |
23 | 18 |
|
24 | | -Start the Storybook development server: |
| 19 | +## Get Started |
25 | 20 |
|
26 | | -``` |
27 | | -pnpm run storybook |
28 | | -``` |
| 21 | +1. Install the Node.js dependencies. |
29 | 22 |
|
30 | | -Storybook will be available at **http://localhost:6006**. |
| 23 | + ``` |
| 24 | + pnpm i |
| 25 | + ``` |
31 | 26 |
|
32 | | -### Running Next.js |
| 27 | +2. Start the Storybook development server. |
33 | 28 |
|
34 | | -The regular website can be previewed as well. |
| 29 | + ``` |
| 30 | + pnpm storybook |
| 31 | + ``` |
35 | 32 |
|
36 | | -> [!NOTE] |
37 | | -> The code should be periodically kept up to date with the main repository by manually copy/pasting the `src/` folder. |
| 33 | +3. (Optional) Preview the regular Next.js website. |
38 | 34 |
|
39 | | -``` |
40 | | -pnpm run dev |
41 | | -``` |
| 35 | + ``` |
| 36 | + pnpm dev |
| 37 | + ``` |
42 | 38 |
|
43 | 39 | ## Testing |
44 | 40 |
|
45 | | -This repo is designed for component-driven development. We use: |
| 41 | +### Storybook |
| 42 | + |
| 43 | +The public Storybook is deployed to GitHub Pages at https://openfresno.github.io/fe-openfresno.org-doc/. You can learn |
| 44 | +about the components and also run tests. |
46 | 45 |
|
47 | | -- **Storybook** for isolated UI development |
48 | | -- **Vitest** for unit tests |
49 | | -- **Playwright** for visual regression and interaction tests |
| 46 | +### Playwright |
50 | 47 |
|
51 | | -## Contribute |
| 48 | +Visual regression and interaction tests. These tests also contain critical tests that should be included in the main |
| 49 | +website repository for use in CI/CD pipelines. |
52 | 50 |
|
53 | | -We welcome contributions! Here are a few ways to help: |
| 51 | +### Vitest |
54 | 52 |
|
55 | | -1. Look for Issues tagged `help wanted` or `good first issue`. |
56 | | -2. Add or improve component stories to increase coverage. |
57 | | -3. Write tests for new components or edge cases. |
58 | | -4. Submit a pull request with clear commit messages. |
| 53 | +Unit tests and coverage. |
59 | 54 |
|
60 | 55 | ## Resources |
61 | 56 |
|
62 | | -- [Storybook Docs](https://storybook.js.org/docs/ "null") |
63 | | -- [Next.js Docs](https://nextjs.org/docs "null") |
64 | | -- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/ "null") |
65 | | -- [Code of Conduct](https://www.google.com/search?q=https://github.com/openfresno/fe-openfresno-doc/blob/main/CODE_OF_CONDUCT.md "null") |
| 57 | +- [Contributing guide](https://github.com/openfresno/openfresno.org/blob/main/CONTRIBUTING.md) |
| 58 | +- [Open Fresno's Code of Conduct](https://www.google.com/search?q=https://github.com/openfresno/fe-openfresno-doc/blob/main/CODE_OF_CONDUCT.md) |
| 59 | +- [Storybook documentation](https://storybook.js.org/docs) |
| 60 | +- [Next.js documentation](https://nextjs.org/docs) |
0 commit comments