Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diorama v2 "Myriorama" #38

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Diorama v2 "Myriorama" #38

wants to merge 39 commits into from

Conversation

LBRDan
Copy link

@LBRDan LBRDan commented Jun 13, 2022

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!

Daniele Lubrano added 30 commits May 10, 2022 10:42
Still missing: Active preview on Speaker Notes (if willing to implement) and memoization on total step number
… without render prop)

changed getTotalSteps to stepsCount (implicit getter and simple prop)
… passed up from nested Slide as it builds as child of Deck
@LBRDan
Copy link
Author

LBRDan commented Jun 13, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant