Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
if: always()

- name: Upload (dist)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jupyterlab-slideshow-dist-${{ github.run_number }}
path: ./dist
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:

# - name: upload (reports)
# if: always()
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: jupyterlab-slideshow-lint-reports-${{ github.run_number }}
# path: ./build/reports
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:

# - name: upload (reports)
# if: always()
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: |-
# jupyterlab-slideshow-reports-${{ matrix.os }}-${{matrix.python-version }}-${{ github.run_number }}
Expand Down
7 changes: 7 additions & 0 deletions js/jupyterlab-slideshow/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
IDeckSettings,
TSlideType,
TLayerScope,
STOP_KEY,
} from './tokens';
import { DesignTools } from './tools/design';
import type { Layover } from './tools/layover';
Expand Down Expand Up @@ -341,6 +342,12 @@ export class DeckManager implements IDeckManager {
selector: `.${CSS.remote}`,
});
}
this._commands.addKeyBinding({
command: CommandIds.stop,
args: {},
keys: STOP_KEY,
selector: `.${CSS.remote}`,
});
}

public async showLayover() {
Expand Down
7 changes: 7 additions & 0 deletions js/jupyterlab-slideshow/src/markdown/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
COMPOUND_KEYS,
MARKDOWN_MIMETYPES,
MARKDOWN_PREVIEW_FACTORY,
STOP_KEY,
} from '../tokens';

export class SimpleMarkdownPresenter
Expand Down Expand Up @@ -149,6 +150,12 @@ export class SimpleMarkdownPresenter
selector: `.${CSS.deck} .${CSS.markdownViewer}`,
});
}
this._commands.addKeyBinding({
command: CommandIds.stop,
args: {},
keys: STOP_KEY,
selector: `.${CSS.deck} .${CSS.markdownViewer}`,
});
}

protected _addWindowListeners() {
Expand Down
7 changes: 7 additions & 0 deletions js/jupyterlab-slideshow/src/notebook/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
META,
ICellDeckMetadata,
TLayerScope,
STOP_KEY,
} from '../tokens';
import type { Layover } from '../tools/layover';

Expand Down Expand Up @@ -341,6 +342,12 @@ export class NotebookPresenter implements IPresenter<NotebookPanel> {
selector: `.${CSS.deck} .jp-Notebook.jp-mod-commandMode:not(.jp-mod-readWrite) :focus`,
});
}
this._commands.addKeyBinding({
command: CommandIds.stop,
args: {},
keys: STOP_KEY,
selector: `.${CSS.deck} .jp-Notebook.jp-mod-commandMode:not(.jp-mod-readWrite) :focus`,
});
}

public async canGo(panel: NotebookPanel): Promise<Partial<TCanGoDirection>> {
Expand Down
2 changes: 2 additions & 0 deletions js/jupyterlab-slideshow/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ export const DIRECTION_KEYS: Record<TDirection, string[]> = {
down: ['ArrowDown'],
};

export const STOP_KEY: string[] = ['Escape'];

export const COMPOUND_LABEL = new Map<[TDirection, TDirection], string>([
[[DIRECTION.down, DIRECTION.forward], 'Go to next fragment, subslide, or slide'],
[[DIRECTION.up, DIRECTION.back], 'Go to previous fragment, subslide, or slide'],
Expand Down