Skip to content

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Jul 24, 2023

Summary

  • Migrate the existing stories to work with storybook v7.
  • Use the vite builder. The startup time decrease from 40 seconds (best time with v6) to 1 second (worst time with v7)
  • Webpack is no more used, vite now manages everything
  • Add support for writing stories in TypeScript. It also detect existing import errors in the existing stories written in JS
  • Migrate the Toolbar story to TypeScript to demonstrate it works. As part of the migration, fix how CellStyle is set in the story (easily detected thanks to types checking)
  • Detect wrong imports in stories and fix them
  • The storybook mini-site can be built (previously the build always failed and storybook could only be used in development mode)
  • Add support for Node 18

Other changes

  • core: simplify the "dev" script:
    • There is no need to invoke webpack as the UMD bundle is no longer used by stories.
    • Instead, call tsc watch which is faster, so code changes are visible faster in stories
  • "Build" GitHub workflow:
    • Build storybook mini-site and attach all examples as artifact to help reviewing Pull Requests
    • Lint at the end, this is more important to check the build and examples first

covers #130

### Tasks
- [x] fix all remaining stories
- [x] restore the story migrated to TypeScript. It had been temporarily revert to JS to not manage the TS configuration until all JS stories pass.
- [x] bump storybook to the latest available version
- [x] merge latest update from the development branch and fix new/updated stories
- [x] Review the description of the PR and adapt
- [x] Remove the temporary used "storybook" package (use for evaluation)

Fixes in the Toolbar story provided as part of this PR

Fix how style are passed to create Cells. This had not been migrated and has been detected by TypeScript checks

toolbar_story_01_before.mp4
toolbar_story_02_after.mp4

Note: there is still an issue on Drag And Drop:

graphUncaught TypeError: cell2 is null
    isLayer GraphDataModel.js:374
    getDropTarget SwimlaneMixin.js:280
    mouseMove SelectionHandler.js:759
    fireMouseEvent EventsMixin.js:640

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

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant