Skip to content

[pull] next from storybookjs:next #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b7d3610
feat: add docs (#702)
dannyhw Jun 6, 2025
49c1f44
fix: missin docs page adjustments
dannyhw Jun 6, 2025
d0c64bf
docs add link
dannyhw Jun 6, 2025
37f8c62
chore(deps): bump estree-util-value-to-estree from 3.3.2 to 3.4.0 (#742)
dependabot[bot] Jun 6, 2025
8ee3a45
chore(deps): bump http-proxy-middleware from 2.0.7 to 2.0.9 (#741)
dependabot[bot] Jun 6, 2025
4ee31f2
chore(deps-dev): bump vite from 6.1.1 to 6.1.6 (#740)
dependabot[bot] Jun 6, 2025
76546d2
fix: prevent StoryView from intercepting Android TalkBack focus (#744)
dannyhw Jun 6, 2025
78a155a
simplify and expand on documentation
dannyhw Jun 8, 2025
2000823
docs: remove extra wording
dannyhw Jun 8, 2025
5c484d9
docs: reorganize testing page
dannyhw Jun 8, 2025
8004756
docs: note about needing more contributions
dannyhw Jun 8, 2025
d886681
docs: mention external tools like sherlo
dannyhw Jun 8, 2025
a154830
feat: add docs example component
dannyhw Jun 8, 2025
0d440b7
fix: formatting
dannyhw Jun 8, 2025
067f443
Use correct `types` fields in react native packages (#745)
cappslock Jun 10, 2025
1bb4959
fix: add type check to example
dannyhw Jun 10, 2025
d65a0e1
v9.0.7-alpha.0
dannyhw Jun 10, 2025
fbfe644
fix: issue template
dannyhw Jun 10, 2025
0bb81f4
fix: export story types from `@storybook/react` (#748)
jtomaszewski Jun 12, 2025
83e0138
feat: update to 9.0.9 (#749)
dannyhw Jun 12, 2025
77bb825
feat: remove extra actions annotations (#750)
dannyhw Jun 13, 2025
d2ed4b7
v9.0.9-alpha.0
dannyhw Jun 13, 2025
2978a43
fix: video width
dannyhw Jun 14, 2025
6c24769
v9.0.9
dannyhw Jun 14, 2025
a4e8c99
fix: typepat
dannyhw Jun 15, 2025
5467cf8
fix: use latest version
dannyhw Jun 16, 2025
347d30c
fix: only apply story wrapper to full ui (#755)
dannyhw Jun 16, 2025
eab6811
docs: improve v9 migration docs (#757)
alcpereira Jun 17, 2025
86e133f
fix(shadow*): replace depracated shadow props with boxShadow (#752)
ozgegurel Jun 17, 2025
10af87e
fix: make it possible to disable storyview wrapper
dannyhw Jun 19, 2025
59f8479
update storybook versions
dannyhw Jun 19, 2025
5c8d906
chore: update pr template branch comment (#759)
alcpereira Jun 20, 2025
c2958ff
chore: improve generated storybook requires formatting (#758)
alcpereira Jun 20, 2025
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 .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem.
If applicable, add code samples to help explain your problem.

**System:**
Please paste the results of `npx -p @storybook/cli@next sb info` here.
Please paste the results of `npx storybook@latest info` here.

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If your answer is yes to any of these, please make sure to include it in your PR

<!--

Everybody: Please submit all PRs to the `next-6.0` branch unless they are specific to 5.3. Storybook maintainers cherry-pick bug and documentation fixes into the `master` branch as part of the release process, so you shouldn't need to worry about this.
Everybody: Please submit all PRs to the `next` branch unless this is a backport for an older version. Storybook maintainers cherry-pick bug and documentation fixes into the `master` branch as part of the release process, so you shouldn't need to worry about this.

Maintainers: Please tag your pull request with at least one of the following:
`["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]`
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy to GitHub Pages

on:
push:
branches: [next]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4

- name: Set node version
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install
shell: 'bash'
run: yarn install

- name: Build
shell: 'bash'
working-directory: docs
run: yarn build

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build/'

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ jobs:
run: yarn lint
- name: format check
run: yarn format:check
- name: type check example
run: yarn workspace expo-example check
- name: test
run: yarn test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ built-storybooks
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.eslintcache
.eslintcache
examples/expo-example/.maestro/diffs
examples/expo-example/.maestro/screenshots
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.yarn
dist/
examples/expo-example/.expo
examples/expo-example/.rnstorybook/storybook.requires.ts
examples/expo-example/.rnstorybook/storybook.requires.ts
docs/.docusaurus
docs/build
.claude/
74 changes: 74 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Development Commands

```bash
# Initial Setup
yarn install
yarn build

# Development
yarn dev # Watch all packages for changes
yarn example # Run the expo example app with Storybook

# Testing
yarn test # Run unit tests across all packages

# Code Quality
yarn lint # Run ESLint across the codebase

# Documentation (from docs/ directory)
cd docs
yarn start # Start development server
yarn build # Build documentation
yarn serve # Serve built documentation
```

## Architecture Overview

**Yarn workspaces monorepo** managed by Lerna containing React Native Storybook packages.

### Packages

**Apps**

- examples/expo-example - Expo example app showcasing Storybook
- docs - Documentation site for Storybook React Native

**Core:**

- `@storybook/react-native` - Main package providing Storybook functionality
- `@storybook/react-native-ui` - Full UI components for on-device Storybook
- `@storybook/react-native-ui-lite` - Lightweight UI components
- `@storybook/react-native-ui-common` - Shared UI components
- `@storybook/react-native-theming` - Theming utilities

**On-Device Addons:**

- `@storybook/addon-ondevice-actions` - Log component interactions
- `@storybook/addon-ondevice-backgrounds` - Change story backgrounds
- `@storybook/addon-ondevice-controls` - Dynamically edit component props
- `@storybook/addon-ondevice-notes` - Add markdown documentation to stories

### Build System & Metro Configuration

- Uses **tsup** for TypeScript compilation (ES2022, CommonJS output)
- Each package has its own `tsup.config.ts`
- `yarn prepare` in a package builds it

The `withStorybook` Metro wrapper:

- Enables `unstable_allowRequireContext` for dynamic story imports
- Automatically generates `storybook.requires.ts` file
- Optional WebSocket server for remote control
- Can be conditionally enabled/disabled via options

### Key Concepts

1. **CSF (Component Story Format)** - Standard story syntax
2. **On-device UI** - Native UI that runs directly on mobile devices
3. **Story requires generation** - Automatic generation of story imports via Metro
4. **Portable stories** - Reuse stories in unit tests
5. **WebSocket support** - Remote control stories from external devices
21 changes: 17 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

- [Migration](#migration)
- [From version 8 to 9](#from-version-8-to-9)
- [Update Storybook dependencies to 9.x](#update-storybook-dependencies-to-9x)
- [Update your `.storybook` folder](#update-your-storybook-folder)
- [Regenerate your requires file](#regenerate-your-requires-file)
- [From version 7.6.x to 8.3.x](#from-version-76x-to-83x)
- [Dependencies](#dependencies)
- [Regenerate your requires file](#regenerate-your-requires-file)
Expand Down Expand Up @@ -42,13 +45,23 @@

## From version 8 to 9

Update storybook dependencies to 9.x
### Update Storybook dependencies to 9.x

Rename .storybook to .rnstorybook
You need to update all Storybook dependencies to version 9.x. This includes:

install the 'storybook' package if not already installed
- `storybook` package

Regenerate your `.storybook/storybook.requires.ts` file by running `yarn storybook-generate`.
> Note: You can check the correct version by looking at the `peerDependencies`. Please refer to the [core Storybook migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md?#from-version-8x-to-900) for more details on the breaking changes of this package.

- `@storybook/addon-ondevice-*` packages

### Update your `.storybook` folder

For better compatibility with projects that includes both Storybook and Storybook React Native, the default configuration folder for Storybook React Native has been renamed from `.storybook/` to `.rnstorybook/`.

### Regenerate your requires file

Regenerate your `.rnstorybook/storybook.requires.ts` file by running `yarn storybook-generate`.

## From version 7.6.x to 8.3.x

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Storybook for React Native

A new docs site is being built for Storybook for React Native, you can find it at https://storybookjs.github.io/react-native/docs/intro/.

> [!IMPORTANT]
> This readme is for v9, for v8 docs see the [v8.6 docs](https://github.com/storybookjs/react-native/tree/v8.6.0-stable).

Expand Down
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
14 changes: 14 additions & 0 deletions docs/blog/2025-03-23-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
slug: hello-world
title: Hello World
authors: [dannyhw]
tags: []
---

React Native Storybook docs are here. Over the next few weeks and months we'll be building out the documentation.

<!-- truncate -->

As part of an effort to make React Native Storybook easier to use we've started working on dedicated documentation that will explain the nuances of running Storybook on React Native.

If you have something you want to be documented help us build out the docs by submitting a pull request.
9 changes: 9 additions & 0 deletions docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dannyhw:
name: Danny Williams
title: Senior Software Engineer
url: https://github.com/dannyhw
image_url: https://github.com/dannyhw.png
page: true
socials:
x: Danny_H_W
github: dannyhw
9 changes: 9 additions & 0 deletions docs/blog/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
releases:
label: Releases
permalink: /releases
description: Release posts

guides:
label: Guides
permalink: /guides
description: Guide posts
Loading