Skip to content

H-1: Support loading blocks in Storybook #2278

@vilkinsons

Description

@vilkinsons

Context

We'd like to be able to load the contents of our blocks directory into the HASH Storybook instance (not to be confused with that recently set up in the Block Protocol repository):

There are a number of different ways we could probably go about making blocks accessible within Storybook, including through the use of the Þ Dock (aka. mock-block-dock, or "MBD") as a decorator, wrapped into a Block Protocol add-on for Storybook.

How a Þ Storybook add-on might work

Functionality

Flesh this out

We would create an add-on for Storybook.

We would use the Þ Dock as a decorator: https://storybook.js.org/docs/react/writing-stories/decorators

Location in monorepo

The code for the add-on would likely live within the blockprotocol repository's libs folder.

Publishing the add-on

Once functional, the Storybook add-on could be published to npm and the add-on itself even listed in the public Storybook integrations library. The add-on could then be imported for use within both the # and Þ Storybook instances.

Follow-ups

Unblocks H-3 and H-5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/blocksRelates to first-party blocks (area)area/dxImprovements or additions to DX or docspriority/3 lowLower priority: nice-to-havetype/eng > frontendOwned by the @frontend team

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions