Skip to content

Commit

Permalink
Fix navigation if previous is subslide (#10)
Browse files Browse the repository at this point in the history
* Fix navigation if previous is subslide

* Test navigation in subslides
  • Loading branch information
brichet authored Jan 8, 2025
1 parent f8d3e8f commit 591b10c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions atest/resources/Docs.resource
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Start Notebook Deck With Anchors
Make Markdown Cell back to [Hello World](#Hello-World) Hello World
Select A Slide Type 4 subslide s1-01-new-slide.png

Start Notebook Deck With Subslides
[Documentation] Make a few cells with subslides
Start Basic Notebook Deck
Make Markdown Cell subslide 1 subslide 1
Select A Slide Type 4 subslide s2-01-new-subslide.png
Make Markdown Cell subslide 2 subslide 2
Select A Slide Type 5 subslide s2-02-new-subslide.png

Tear Down Interactive Suite
[Documentation] Clean up after this suite.
Execute JupyterLab Command Close All Tabs
Expand Down
9 changes: 9 additions & 0 deletions atest/suites/lab/02-navigate.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ Build and Navigate a Notebook Slide With Anchors
Click Element css:${CSS_DECK_VISIBLE} a[href^\="#Hello-World"]
Wait Until Element Is Visible css:${CSS_DECK_VISIBLE} h1
Capture Page Screenshot s1-02-back.png

Build and Navigate a Notebook Slide With Subslides
[Documentation] Build and navigate a slide with subslides.
Set Attempt Screenshot Directory lab${/}navigate${/}subslides
Start Notebook Deck With Subslides
Really Back Up Deck With Keyboard s2-03-backup.png subslide 1
Really Back Up Deck With Keyboard s2-04-backup.png item4567
Really Advance Notebook Deck With Keyboard s2-05-advance.png subslide 1
Really Advance Notebook Deck With Keyboard s2-06-advance.png subslide 2
3 changes: 3 additions & 0 deletions js/jupyterlab-slideshow/src/notebook/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ export class NotebookPresenter implements IPresenter<NotebookPanel> {
} else if (f0) {
f0.down = index;
extent.up = f0.index;
} else if (ss0) {
ss0.down = index;
extent.up = ss0.index;
} else if (s0) {
let lastOnScreen = this._lastOnScreenOf(s0.index, extents);
if (lastOnScreen) {
Expand Down

0 comments on commit 591b10c

Please sign in to comment.