Closed shreve closed 3 months ago
The two "Check Release" failures and the "Make SDist" failure are related to Automattic/node-canvas. I think this might need a yarn.lock bump, but I'm not sure how safe that is.
The test_nbgrader(docs) failure is a timeout because checking GitHub links in the changelog keeps getting rate limited and eventually times out. It seems like it might be worth adding a filter which auto-approves links that start with github.com/search.
@meeseeksdev backport to main
Owee, I'm MrMeeseeks, Look at me.
There seem to be a conflict, please backport manually. Here are approximate instructions:
git checkout main
git pull
Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 c7828a5110bd34b9409f252d3563e1f7781d6826
You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #1902: Eliminate compatibility issues in supporting notebook and jupyterlab'
git push YOURFORK main:auto-backport-of-pr-1902-on-main
"Backport PR #1902 on branch main (Eliminate compatibility issues in supporting notebook and jupyterlab)"
And apply the correct labels and milestones.
Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!
Remember to remove the Still Needs Manual Backport
label once the PR gets merged.
If these instructions are inaccurate, feel free to suggest an improvement.
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 withoutjupyter-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
andis_jlab
checks as they were relatively naive and add complexity that doesn't need to be there.Fixes #1888