Skip to content

Commit

Permalink
Wait for service worker on start up (#97)
Browse files Browse the repository at this point in the history
* Update service worker on start up

* Update changelog
  • Loading branch information
trungleduc authored Oct 31, 2023
1 parent c512c49 commit dc6c1d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Changelog
# Voici Changelog

## 0.5.0 - Highlights

Below are the major highlights in Voici 0.5.0

- Voici frontend is updated to JupyterLab 4, Voila 0.5.0 components.
- Tree page is now a Lab remix app.
- New argument `--classic-tree` to use the jinja2-based tree page instead of the Lab-based one.
- Voici CLI can be used in the same way as Voila, e.g:
- `voici .`
- `voici notebook.ipynb`
- Voici now supports the [`files` directory](https://jupyterlite.readthedocs.io/en/latest/howto/content/files.html#content-with-the-cli) to copy additional files to the Voici deployment.
- Latex expressions are rendered by `@jupyterlab/mathjax-extension` instead of relying on MathJax 2 coming from CDN.

<!-- <START NEW CHANGELOG ENTRY> -->

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
[![JupyterLite](https://jupyterlite.rtfd.io/en/latest/_static/badge-launch.svg)](https://voici.readthedocs.io/en/latest/_static/lite)
[![Documentation Status](https://readthedocs.org/projects/voici/badge/?version=latest)](https://voici.readthedocs.io/en/latest/?badge=latest)

🚧 **WARNING: Voici is in early preview** 🚧

Voici is a tool for generating static dashboards from Jupyter Notebooks. It can be used as a drop-in replacement for [Voilà](https://github.com/voila-dashboards/voila) and it has the same commands and supports most of Voila's configuration options.

Unlike Voila, which renders interactive dashboards using server-side execution, Voici uses [WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly) (Wasm) kernels to render notebooks in the browser, making the resulting dashboard entirely self-contained and distributable.
Expand Down
10 changes: 9 additions & 1 deletion packages/voici/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import '@voila-dashboards/voila/style/index.js';
import '@voila-dashboards/voila/lib/sharedscope';
import { PageConfig, URLExt } from '@jupyterlab/coreutils';
import { IKernelSpecs } from '@jupyterlite/kernel';
import { JupyterLiteServer } from '@jupyterlite/server';
import { IServiceWorkerManager, JupyterLiteServer } from '@jupyterlite/server';
import {
activePlugins,
createModule,
Expand Down Expand Up @@ -181,6 +181,14 @@ async function main() {
app.registerPluginModules(mods);

await app.start();

const serviceWorkerManager = await jupyterLiteServer.resolveOptionalService(
IServiceWorkerManager
);
if (serviceWorkerManager) {
await serviceWorkerManager.ready;
}

await app.renderWidgets();
window.jupyterapp = app;
}
Expand Down

0 comments on commit dc6c1d0

Please sign in to comment.