Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
.idea/
dist/
storybook-static/
.DS_Store
*.iml

24 changes: 24 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/react-vite';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';

const configDir = dirname(fileURLToPath(import.meta.url));

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(ts|tsx)'],
addons: ['@storybook/addon-docs'],
framework: {
name: '@storybook/react-vite',
options: {},
},
viteFinal: async (viteConfig) => {
viteConfig.resolve = viteConfig.resolve || {};
viteConfig.resolve.alias = {
...(viteConfig.resolve.alias || {}),
'@': resolve(configDir, '../src'),
};
return viteConfig;
},
};

export default config;
4 changes: 4 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
crossorigin="anonymous">
16 changes: 16 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Preview } from '@storybook/react-vite';
import '../src/app/styles.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
layout: 'fullscreen',
},
};

export default preview;
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ Run unit tests:
npm test
```

Run Storybook for isolated UI development:

```sh
npm run storybook
```

## Documentation

Additional documentation is available in the [`docs/`](docs/) directory:
Expand Down

Large diffs are not rendered by default.

File renamed without changes.
17 changes: 17 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,26 @@ npm run typecheck
- `npm run dev`: start the local Vite server.
- `npm run build`: create the production build in `docs/`.
- `npm run preview`: preview the production build locally.
- `npm run storybook`: start Storybook on port 6006.
- `npm run build-storybook`: build static Storybook output.
- `npm test`: run Vitest once.
- `npm run typecheck`: run TypeScript without emitting files.

## Storybook

Storybook documents the React UI layer in isolation. Start it with:

```bash
npm run storybook
```

Initial stories live beside the UI components they document:

- `src/shared/ui/*.stories.tsx`
- `src/features/ribbon/*.stories.tsx`

Use Storybook for component states, visual review, and UI experiments that do not require the spreadsheet canvas.

## Contribution Workflow

1. Create an issue.
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
crossorigin="anonymous">
<link rel="icon" href="/OpenWebSheet/favicon.ico">
<title>Open web sheet</title>
<script type="module" crossorigin src="/OpenWebSheet/assets/index-DGmfnYFC.js"></script>
<link rel="stylesheet" crossorigin href="/OpenWebSheet/assets/index-Ca8yA5D4.css">
<script type="module" crossorigin src="/OpenWebSheet/assets/index-Vds5Mw57.js"></script>
<link rel="stylesheet" crossorigin href="/OpenWebSheet/assets/index-Bu-CVJUF.css">
</head>
<body>
<noscript>
Expand Down
Loading