clarkmcc / ngraph

A blender-style node editor for React, built on xyflow
https://ngraph.clarkmccauley.com
MIT License
50 stars 3 forks source link

rework stories and layout #24

Closed sroussey closed 9 months ago

sroussey commented 9 months ago

I should have not mixed these together, but...

This PR:

  1. Moves stories to their own folder
  2. Reworks layout a bit. You need to register a layout before using it. This has a few upsides:
    • The lib does not include dagre and all the requirements, if they are not used.
    • Adding new layouts required changing this lib
    • Easier to force different layout in the layout example rather than just the one, all without needing to change the lib itself
  3. Moves the example node editor out of NodeEditor and into the stories examples.
sroussey commented 9 months ago

This does have a bug though...

In storybook, the first item "Docs" now shows nothing. Not sure how that works.