Repo for cataloging the behavior of widgets in Thebe, Libretexts, and on JupyterHub. Reference to this issue.
This repository is built to be repo2docker compatible. That means you can build it on https://binder.libretexts.org/ by specifying LibreTexts/widget-testing
in the repository section and choosing whichever git branch you would like. Make sure that the environment.yml
file in this directory reflects the one you want to build, don't change the file name, and that the contents of the file contains no name:
section at the top. You can find other conda-environment .yml
files in the conda-environments
directory.
This repository was migrated over from the now archived sandertyu/widgetstuffs repository.
Use python -m http.server
(python3
if python
is an alias for python v2) within the Thebe/
directory and navigate to localhost:8000 in your web browser to see the Thebe results. Change the url to the different html pages within the Thebe/
directory or use the directory listing to view them.
Below is a table which outlines the general functionality of each widget on each platform. Where applicable, the latest version of the package environment to be verified for that platform has been specified.
- ✔️ means that the widget works exactly as expected
- ⭕ means that the widget itself is fine, but the platform makes it difficult to use
- ❌ means that the widget basically does not work at all, not displaying or something of that sort
- ❓ means that the status has not been verified.
The JupyterLab=2
column means that the widget has been tested in the specified environment which runs on JupyterLab=2
, and the same for the JupyterLab=3
column. The Thebe
column represents widgets tested on HTML pages in the Thebe/
directory of this repository, or on the example pages for Thebe's documentation. CKEditor Binder Plugin
represents running the widget while in the plugin's development mode. Widgets tested on a page in query.libretexts.org
are in that respective column, and then the libraries which a widget has been verified to be working (or not) on libretexts.org are outlined in the libretexts.org libraries
column.
Each widget is tested using the code used in the <pre data-executable="true" data-language="python">
Thebe cells of the HTML pages contained in the Thebe/
folder.
See the sections dedicated to each widget below for more information about the widgets labelled with ⭕ and ❌.
Widgets with errors in Thebe will have errors on Libretexts because CKEditor Binder Plugin uses Thebe to insert code cells into the HTML webpage.
Known bugs;
- Displays "Javascript output is disabled in JupyterLab" when the widgets are ran
Debugging procedures;
- Test
bokeh.html
using different binder repositories (crossed out means tested, repo is probably not the issue) - Thebe issue #112
- The error message occurs in widgets.ts of the jupyterlab code
- Info about the render() function call
- The source for
IRenderMime
code is in the rendermime-interfaces folder of this repository - The source for
translator
code comes fromITranslator
which is downloaded in the translation folder of this repository
- Web console shows that
https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.2.3.min.js
is not loading properly- Previous version
https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js
does get loaded, but same Javascript output disabled message
- Previous version
- Sometimes the errors in the web console do not show up at all. Don't see any consistent patterns to this.
- The error message occurs in widgets.ts of the jupyterlab code
Known bugs;
- Some widgets work and others don't,
interact()
function does not work at all
Debugging procedures;
- Thebe issue #111
- Web console says
future.js:179 Uncaught (in promise) Error: Canceled future for kernel_info_request message before replies were done
- The error message is triggered by
future.js
which is built from future.ts in jupyterlab- The message printed using the code above contains
kernel_info_request
from default.ts
- The message printed using the code above contains
- The error message is triggered by
- Sometimes the errors in the web console do not show up at all. Don't see any consistent patterns to this.
Known bugs;
- PR to fix on Thebe, buttons were not working properly
Known bugs;
- Thebe can display basic widgets as shown in the first cell of
Thebe/pythreejs.html
, but more complicated mechanisms like using thedisplay()
function yielderror displaying widget errors
like in ipywidgets.
Debugging procedures;
- TODO
I don't even know anymore. Seems to only work consistently with version 1.2.0 which requires jupyterlab=3
These widgets work properly in Thebe but not so well on Libretexts due to limitations of the CKEditor Binder Plugin. Cells cannot retroactively change the output of another cell in CKEditor Binder Plugin, so these widgets are severely limited. See this issue for more info. Theoretically this issue effects all widgets on Libretexts, but these ones seem most impacted due to how they are used.
Known bugs;
- Overlays do not show.
Debugging procedures;
- The current max-width css rule for
canvas
html objects causes map overlays to not show. Query currently has a fix on it that allows it to work.