deathbeds / jupyterlab-deck

Lightweight presentations for JupyterLab
https://jupyterlab-deck.rtfd.io
BSD 3-Clause "New" or "Revised" License
41 stars 9 forks source link

Persist Deck position #3

Open bollwyvl opened 2 years ago

bollwyvl commented 2 years ago

Problem

When reloading the page with Deck enabled, the active position in the deck is lost and the presentation restarts.

Implementation Ideas

Initially, it would make sense to track this in notebook metadata.

metadata:
  deck-v0:
    slide: 3
    fragment: 2

the deck:go command could also offer these:

commands.execute('deck:go', {slide: 3, fragment: 2})

Design ideas

When RTC is enabled, it would also make sense to offer UX to allow following the presenter's position, as well as offering some way to claim and relinquish control.

Future Work

This model will get more complicated when considering multiple documents are part of a logical deck. This might need to be modeled in a more complete way, such as if embedded in a Notebook:

metadata:
  deck-v1:
    documents:
      - path: README.md
        command: markdown:preview  
        start: <some identifier>
        end: <some identifier>
        skip:
          - <some identifier>