Problem/Motivation

Working with Storybook in DDEV had rough edges: after ddev restart stories broke with a browser CORS error (DDEV regenerates settings.ddev.php and drops the dev-services include), the storybook:ddev yarn script printed command not found: export, and there was no single command to manage or debug Storybook.

Steps to reproduce

  1. Init Storybook and open the storybook.* subdomain — stories render.
  2. Run ddev restart and reload — stories now fail with a CORS error.

Proposed resolution

  • Add a ddev storybook command (alias ddev sb): init, enable, disable, list, status, stats, doctor, gen, build, help.
  • A post-start hook re-applies the dev-services (CORS) include on every start; disable is sticky across restarts.
  • Fix the storybook:ddev yarn script (drop the unparseable export; env comes from ddev web_environment).

Remaining tasks

  • ✅ File an issue about this project
  • ❌ Addition/Change/Update/Fix to this project
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Code review from 1 Varbase core team member
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Title: Add `ddev storybook` management command and keep Storybook working across DDEV restarts » Improve ddev storybook commands and keep Storybook working across DDEV restarts
Issue summary: View changes

  • rajab natshah committed 9515280b on 11.0.x
    Issue #3605874: Improve ddev storybook commands and keep Storybook...
rajab natshah’s picture

Status: Active » Fixed
Issue tags: +varbase_project-11.0.2

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.