Skip to content

Commit

Permalink
Merge pull request #1117 from Financial-Times/unstorybook
Browse files Browse the repository at this point in the history
build: remove storybook
  • Loading branch information
apaleslimghost authored Jan 20, 2025
2 parents a549dc3 + a3727e0 commit 6bec4ab
Show file tree
Hide file tree
Showing 46 changed files with 11,329 additions and 22,518 deletions.
16 changes: 0 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ jobs:
- run:
name: Run example app integration tests
command: npm run test:examples-ci
- run:
name: Run storybook
command: npm run storybook:ci

publish:
<<: *container_config_node
Expand Down Expand Up @@ -145,14 +142,6 @@ jobs:
name: NPM publish
command: npm publish --workspace=packages/ --access=public --tag=pre-release

deploy:
<<: *container_config_node
steps:
- *attach_workspace
- run:
name: Deploy Storybook
command: npm run deploy-storybook:ci

workflows:
version: 2

Expand Down Expand Up @@ -189,11 +178,6 @@ workflows:
- node
- node20
- node18
- deploy:
filters:
<<: *filters_only_main
requires:
- test-node

build-test-publish:
jobs:
Expand Down
12 changes: 0 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ module.exports = {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts', '.mjs']
},
webpack: {
// Because we configure Storybook in "full control" mode we have to manually extend a
// configuration object. Rather than mock all that here I've chosen to copy the resolve
// rules so that the two files do not need to know about one other and their structure.
config: {
resolve: {
modules: ['node_modules'],
descriptionFiles: ['package.json'],
mainFiles: ['index', 'main']
}
}
}
}
},
Expand Down
4 changes: 0 additions & 4 deletions .storybook/.browserslistrc

This file was deleted.

1 change: 0 additions & 1 deletion .storybook/.gitignore

This file was deleted.

41 changes: 0 additions & 41 deletions .storybook/components/OnReady.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions .storybook/main.js

This file was deleted.

27 changes: 0 additions & 27 deletions .storybook/preview-head.html

This file was deleted.

67 changes: 0 additions & 67 deletions .storybook/webpack.config.js

This file was deleted.

27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Please note that Page Kit has only been tested in Mac and Linux environments. If
npm run build
```

4. You can now choose to run an example application or start Storybook to view UI component demos. Examples are located in the `examples/` directory and each have their own instructions. To use Storybook you can follow [the guide below](#using-storybook).
4. You can now choose to run an example application to view UI component demos. Examples are located in the `examples/` directory and each have their own instructions.

Before writing any new code you may also find it useful to refer to the [architecture overview](architecture.md) and [contribution guide](contributing.md) which covers coding standards and expectations.

Expand All @@ -100,31 +100,6 @@ If you're interested to know more about our approach of building so many small p
[Express]: https://expressjs.com/
### Using Storybook
[Storybook] is a development environment and showcase for UI components. It makes working on and sharing UI components easier by providing a richly configurable environment.
[Storybook]: https://storybook.js.org/
Before starting Storybook you must first run the build script for all packages (if you have not done so already) using this command:
```
npm run build
```
Once all of the packages have been built you can run Storybook using the following the command:
```
npm run storybook
```
The Storybook interface should then open in your default browser. Storybook has been configured to automatically find stories inside packages with names prefixed with `dotcom-ui-`.
#### Storybook deployment
The deployment of Storybook to Github Pages is managed by our CircleCI workflow. It is able to deploy to Github Pages by using a personal access token created from the `next-team` Github account, stored as the `GH_TOKEN` environment variable in Doppler.
## FAQ
### Why are you doing this?
Expand Down
3 changes: 1 addition & 2 deletions docs/design-decisions/html-templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ We think JSX has several key advantages over Handlebars that are worth the effor
- It works in the same way on the server and in the browser.
- Components are authored as JavaScript files and integrate seamlessly with the JS ecosystem.
- Almost every JavaScript parser, linter, compiler, and editor support JSX syntax out of the box.
- Enables access to a modern ecosystem of fantastic development tools like [Storybook].
- Enables access to a modern ecosystem of fantastic development tools.
- Components can be rendered with [many] [different] [libraries], not just [React].

This opinion was also backed up by [the survey] we sent to the customer products engineering team. We asked "Which tool would you choose to provide server-side rendering for your app?" and only 18% of the respondents told us that they would choose Handlebars but 67% said they would choose the same tool as they would use on the client-side. When asked "Which tools would you choose to build the client-side parts for your app?" 67% of respondants indicated that they would choose React or a similar library.
Expand All @@ -33,7 +33,6 @@ This opinion was also backed up by [the survey] we sent to the customer products
[x-dash]: https://financial-times.github.io/x-dash/
[Preact]: https://preactjs.com/
[JSX]: https://jasonformat.com/wtf-is-jsx/
[Storybook]:https://storybook.js.org/
[React]: https://reactjs.org/
[many]: https://github.com/jorgebucaran/hyperapp
[different]: https://github.com/i-like-robots/hyperons
Expand Down
Loading

0 comments on commit 6bec4ab

Please sign in to comment.