Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Auto Close Brackets" not closing brackets in OSX and iOS. #6384

Open
holzschu opened this issue Mar 14, 2022 · 9 comments
Open

"Auto Close Brackets" not closing brackets in OSX and iOS. #6384

holzschu opened this issue Mar 14, 2022 · 9 comments

Comments

@holzschu
Copy link

Description

In my tests, if I enable the "Auto Close Brackets" setting in retrolab, it does not automatically close brackets, whereas if I enable it in jupyterlab, it does automatically close brackets.

I could only run tests on OSX (11.6) and iOS (15.3), but I had the same behaviour on both. It applies both for notebooks started using Binder and notebooks started from the command line.

I also noticed that window.jupyterapp.commands.execute('notebook:toggle-autoclosing-brackets'); returns Unhandled Promise Rejection: Error: Command 'notebook:toggle-autoclosing-brackets' not registered.

Reproduce

  1. start retrolab
  2. activate "Auto Close Brackets" in setting
  3. type "print("
  4. notice the closing bracket did not appear.

Expected behavior

I expected the closing bracket ")" to appear. With jupyterlab, it does appear.

Context

  • Operating System and version: iOS 15.3 (using Binder and Carnets), OSX 11.6.2 (using Binder and command line)
  • Browser and version: Safari 15.2
  • JupyterLab version: 3.3.1 and 3.2.9
  • Retrolab version: 0.3.19 and 0.3.20
Troubleshoot Output

Command Line Output
No error or warning related to brackets in the command line output.
Browser Output
No significant output on the Javascript console.
@holzschu holzschu added the bug label Mar 14, 2022
@jtpio
Copy link
Member

jtpio commented Mar 15, 2022

Thanks @holzschu for reporting.

I also noticed that window.jupyterapp.commands.execute('notebook:toggle-autoclosing-brackets'); returns Unhandled Promise Rejection: Error: Command 'notebook:toggle-autoclosing-brackets' not registered.

This seems to indicate RetroLab is missing the plugin that adds this commands. Probably this could be fixed if the missing plugin is included in the build.

@jtpio
Copy link
Member

jtpio commented Mar 15, 2022

Looks like the command is being added here in JupyterLab: https://github.com/jupyterlab/jupyterlab/blob/7af65dd2fdfb443e13aaf1e03a7951ea98be7f1d/packages/notebook-extension/src/index.ts#L1339

But is guarded behind a if (restorer), and there is no restorer in RetroLab. Probably this explains why the command is not available in RetroLab. This should be fixed upstream.

@jtpio
Copy link
Member

jtpio commented Mar 18, 2022

Looks like this should be fixed in #6314

image

Which should be available in the next Notebook v7 pre-release.

@jtpio
Copy link
Member

jtpio commented Mar 18, 2022

@holzschu just curious, are you using RetroLab in Carnets? Or are you planning to switch to the Notebook v7 pre-release?

For reference the first one is out and we'll continue making new alphas when new changes land: https://github.com/jupyter/notebook/releases/tag/v7.0.0a1

@holzschu
Copy link
Author

The current TestFlight build (the beta version) has notebook, nbclassic and retrolab : https://testflight.apple.com/join/yevwlUs1 (that is Carnets, I'm still uploading Carnets-with-Scipy).

The change is currently implemented in a non-breaking way: users can keep using the old notebook if they want, but can switch to retrolab using the Settings app. This build seems to be free of major bugs, so I will probably release it to the AppStore in a few days. From retrolab, users can switch to jupyterlab, but that has a lot of limitations (for example, a maximum of 3 notebooks active at a time).

I think Carnets is ready for when Notebook v7 is released, but I'll probably wait until v7 is out of alpha (and also take the time to incorporate user feedback).

@jtpio
Copy link
Member

jtpio commented Mar 18, 2022

OK thanks for extra context 👍

For reference there is also jupyter/notebook-team-compass#10 which discusses running Notebook v7 and exposing the Classic Notebook v6 UI side-by-side.

@holzschu
Copy link
Author

holzschu commented Mar 18, 2022

This may or may not be related to this issue, but:

  • if I start jupyterlab in binder on an iPad, I can move tabs by clicking on them and dragging them.
  • if I start retrolab in binder on an iPad, then click "View->Open JupyterLab", I cannot move tabs by clicking on them and dragging them.

Edit: it works if I start the "development repository" in Binder, instead of the "current release".

@jtpio
Copy link
Member

jtpio commented Jun 8, 2023

@holzschu just checking if you had the opportunity to try the latest Notebook 7 pre-release (currently 7.0.0b3) to see if this is still an issue?

@holzschu
Copy link
Author

holzschu commented Jun 8, 2023

Thank you for the push. No, I haven't tested Notebook 7 yet. I will give it a try.

@andrii-i andrii-i modified the milestones: 7.0, 7.0.x Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants