-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate compatibility issues in supporting notebook and jupyterlab (#…
…1902) * Add linkTo util function Formgrader could be loaded in one of two different contexts: on its own from a notebook, or inside an iframe a lab. When navigating to a page outside the formgrader application, this presents an issue in that these two contexts need different navigation mechanisms. Previously, the mechanism was decided by looking at the name of the jupyter-server application. If it was `jupyter-notebook` (notebook<7), use href. Otherwise, use postMessage. However, it's possible to use the notebook interface without `jupyter-notebook`, e.g. `jupyter-server`. Now the mechanism is decided by context clues inside the browser, i.e. whether formgrader is inside an iframe. This commit adds a `linkTo` function which is applied to jQuery elements via `.map` and applies either href or postMessage nav mechanisms based on whether the current window is the top window. Additionally, it completely removes the `is_lab` and `is_jlab` checks as they were relatively naive and add complexity that doesn't need to be there. * Bump canvas to get access to prebuilt binaries * Add linkcheck_ignore for GitHub contributor searches
- Loading branch information
Showing
11 changed files
with
73 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
nbgrader/server_extensions/formgrader/static/js/jupyterlab_utils.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters