Skip to content

Move .storybook to build/storybook, add config-aware build support. - #38683

Open
goodov wants to merge 3 commits into
masterfrom
storybook-build-move
Open

Move .storybook to build/storybook, add config-aware build support.#38683
goodov wants to merge 3 commits into
masterfrom
storybook-build-move

Conversation

@goodov

@goodov goodov commented Jul 31, 2026

Copy link
Copy Markdown
Member

Add support for buildconfig-aware storybook build.

This is not wired via GN at this point, because GN action will require explicit stories list and a proper deps tracking, which is another task to solve.

@github-actions github-actions Bot added CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build labels Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📋 Code Owners Summary

10 file(s) changed, 2 with assigned owners

2 team(s) affected: @brave/build-commands-reviewers, @brave/js-deps-reviewers


Owners and Their Files

@brave/build-commands-reviewers — 1 file(s)

@brave/js-deps-reviewers — 1 file(s)

@brave-builds

Copy link
Copy Markdown
Collaborator

Warning

You have got a presubmit warning. Please address it if possible.

Found 1 lines longer than 80 characters (first 5 shown).

Items:

PRESUBMIT.py, line 896, 107 chars

@goodov
goodov force-pushed the storybook-build-move branch 2 times, most recently from 2552ee8 to 704e47a Compare August 1, 2026 06:12
@brave-builds

Copy link
Copy Markdown
Collaborator

A Storybook has been deployed to preview UI for the latest push

@goodov
goodov marked this pull request as ready for review August 1, 2026 08:01
@goodov
goodov requested review from a team as code owners August 1, 2026 08:01
@goodov
goodov force-pushed the storybook-build-move branch from 704e47a to 57e5003 Compare August 1, 2026 08:04
@goodov
goodov force-pushed the storybook-build-move branch from 57e5003 to 3c5aeba Compare August 1, 2026 08:25
Comment thread build/commands/scripts/storybook.ts
Comment thread build/commands/scripts/storybook.js Outdated
config.update(options)
config.buildTargets = ['brave/build/storybook:storybook_deps']

await util.buildTargets(config.buildTargets, config.defaultOptions)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an option to skip this, e.g. --skip-gn-deps? If I'm running the command many times in a session and I know I haven't changed any types then I would like to skip the GN time if it takes more than a couple of seconds to realize it doesn't need to compile. Restarting storybool can be necessary when adding new files or dependencies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled the build by default in dev mode and added -B flag to enable it. lmk what you think, the default can be the other way around, but since you mentioned you may restart storybook frequently, maybe it's better to have the default to be "disable gn build".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make storybook build be config-aware

5 participants