StatCan / aaw

Documentation for the Advanced Analytics Workspace Platform
https://statcan.github.io/aaw/
Other
67 stars 12 forks source link

Bug: Various JupyterLab UI bugs #1944

Open chuckbelisle opened 5 months ago

chuckbelisle commented 5 months ago

Stan Hatko wrote:

A few days ago some strange glitches I have not seen in a long time started occurring again on AAW JupyterLab, in particular some keyboard shortcuts like ctrl+D stopped working (adds browser shortcut instead of deleting line) and sometimes text in a terminal suddenly disappears (entire terminal goes black except for the cursor) for a few seconds before suddenly reappearing. These bugs do not affect the stability of servers but are still very annoying. (edited)

StanHatko commented 5 months ago

Today I don't see the text in terminal disappearing bug (though I saw it all the time late last week), but the keyboard shortcuts issue remains. I think it affects all JupyterLab notebook servers.

A specific server affected is in the greenhouse-detection namespace, server process-sentinel.

bryanpaget commented 5 months ago

Unfortunately, this seems to be a feature of JupyterLab 4.0.x.

I searched for a way of customizing keyboard shortcuts in JupyterLab and all I could find was:

Image

I also reached out to CodeMirror but they were not interested in changing anything. I guess they are trying to be more consistent with VS Code:

mathis-marcotte commented 4 months ago

Reposting message from Stan Hatko:

The AAW bug with the terminal screen text disappearing and reappearing has restarted today. Here is an example screenshot (this notebook server started with a light theme except the usual dark theme, not sure why, but I don't think that had an impact as other notebook servers with the dark theme have the same issue). You can see the cursor at the bottom, a few seconds later the text reappeared on the screen.

It doesn't seem to affect the stability of things running on the server, but it's still very annoying and distracting for text in terminals to suddenly vanish for a few seconds.

image

chuckbelisle commented 4 months ago

Placing back in backlog until Upstream fixed is provided.

bryanpaget commented 4 months ago

I've put the terminal text dissapearing issue into a separate issue:

bryanpaget commented 4 months ago

Placing back in backlog until Upstream fixed is provided.

I'm watching https://github.com/jupyterlab/jupyterlab/issues/14548.

StanHatko commented 3 months ago

On new notebook servers ctrl+S and ctrl+F trigger browser actions in addition to the JupyterLab actions. As a workaround entering the following into the web developer console (in Edge) worked for me, disabling the browser action while keeping the Jupyter action. Code below from https://stackoverflow.com/questions/4446987/overriding-controls-save-functionality-in-browser and https://stackoverflow.com/questions/7091538/is-it-possible-to-disable-ctrl-f-of-find-in-page.

document.addEventListener("keydown", function(e) {
  if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
    e.preventDefault();
    // Process event...
  }
}, false);

window.addEventListener("keydown",function (e) {
    if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) { 
        e.preventDefault();
    }
})