diorama icon indicating copy to clipboard operation
diorama copied to clipboard

Diorama v2 "Myriorama"

Open LBRDan opened this issue 2 years ago • 1 comments

First of all, thanks for your wonderful library! It's been inspiring to take a look inside this lib as much as attending your amazing speeches back in Verona @ JSDay this year 🚀 It all started when I tried to bake some interactivity inside a work PowerPoint presentation I tried to enhance it a bit for my specific needs, but soon I found that someone else might benefit from these edits. Also, it was an open-source exercise for me and the chance to get to work with the latest things in mind (ESM, Typescript Support, React 18, etc...) Sure thing there is room for improvements and a lot of work to do, and lots of things could be done infinitely better than how I pulled it off... This could be breaking not in the API itself, but some particular configuration for the end user bundler could get ESM/CJS choice a little bit trickier to update (maybe even the React upgrade itself can be tedious)

I'll list some of the Features packed inside:

  • General dependency upgrade to the latest version
  • Migrated to Typescript: This ensures a better dev experience IMHO and makes it easier to generate types for the end-user
  • Powered by ViteJs: Super easy setup for multi builds (CJS, ESM)
  • Test now using Vitest in jsdom env (bonus test coverage support and test runner UI baked in)
  • New MultistepSlide component with multiple intermediate steps inside a single Slide (supports both children and render prop). To be used with custom slides, it can be used in tandem with MultiSlideContext exported, avoiding props injection/drilling
  • PresenterNotes now takes advantage of React Portal: This ensures that all the Deck updates get captured correctly and keeps the presenter notes synchronized without manually poking it to catch up. Also, now PresenterNotes supports NavigationHud as well (I found it useful to manage the deck from the presenter note panel)
  • New Deck props such as automaticHistoryTrack (useful when using custom SPA routers), initialPageIndex (sets the current slide index on Deck's mount), onActiveSlideChange (well, a callback to let the upper level in sync about the Slide in view)

Again: there is a lot of room for improvement and I'm open to every suggestion you have to make this work for you Thanks!

LBRDan avatar Jun 13 '22 14:06 LBRDan

Travis fails mainly because of Nodejs version in CI config (Node 10) - Some packages inside (such as Vitest) runs onto Node v14 or above

Edit: Changed node_js version inside .travis.yml to Node 16 (Latest LTS)

LBRDan avatar Jun 13 '22 14:06 LBRDan