deathbeds / jupyterlab-deck

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

Fix navigation if previous is subslide #62

Open brichet opened 8 months ago

brichet commented 8 months ago

Fixes a a navigation problem with sub-slide.

A sub-slide (1) without fragment and (2) followed by another sub-slide is ignored in the navigation. This PR solve it by checking if a sub-slide is preceded by another sub-slide.

Checklist

References

Expressed in https://github.com/deathbeds/jupyterlab-deck/issues/49

Expected: the following subslide "Subslide1" is displayed Got: the subslide "subslide2" is displayed

Code changes

When creating the extent (navigation) for a sub-slide, check if there is a previous sub-slide.

User-facing changes

None except for the navigation.

Backwards-incompatible changes

None

codecov[bot] commented 8 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d24d22c) 93.66% compared to head (059b6f1) 93.45%.

:exclamation: Current head 059b6f1 differs from pull request most recent head 38b3623. Consider uploading reports for the commit 38b3623 to get more accurate results

Files Patch % Lines
js/jupyterlab-deck/src/notebook/presenter.ts 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #62 +/- ## ========================================== - Coverage 93.66% 93.45% -0.22% ========================================== Files 16 16 Lines 1327 1330 +3 Branches 274 275 +1 ========================================== Hits 1243 1243 - Misses 42 44 +2 - Partials 42 43 +1 ``` | [Flag](https://app.codecov.io/gh/deathbeds/jupyterlab-deck/pull/62/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deathbeds) | Coverage Δ | | |---|---|---| | [front-end](https://app.codecov.io/gh/deathbeds/jupyterlab-deck/pull/62/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deathbeds) | `93.40% <0.00%> (-0.22%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deathbeds#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bollwyvl commented 8 months ago

Yep, we'll want a fixture that concretely demonstrates this pattern.

This could either be through adding a new fixture notebook in examples, or updating an existing one to have this specific pattern so it can be observed, and therefore covered, and stay fixed.

brichet commented 8 months ago

@bollwyvl I added a test on this specific pattern.

nthiery commented 7 months ago

Thanks for the work here! I'll try it soon :-)