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

Support JupyterLab 4.0 #85

Merged
merged 4 commits into from Jul 30, 2023
Merged

Conversation

krassowski
Copy link
Collaborator

@krassowski krassowski commented Jul 30, 2023

Closes #68

Refactors the extension to use @replit/codemirror-vim plugin which is a CodeMirror 6 compatible port of the vim mode from CodeMirror 5.

Notes:

  • Ctrl-C handling is now built-in see replit/codemirror-vim#85
  • When switching cell type with Command/Ctrl-1/2/3 there is a warning in the console. The user experience is not affected. It is related to an upstream issue jupyterlab/jupyterlab#14380
  • Defunct image links pointing to sourcerer.io were removed from README
  • Releaser workflows were added

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch krassowski/jupyterlab-vim/lab-4.0

@ianhi
Copy link
Collaborator

ianhi commented Jul 30, 2023

heroic ❤️ ❤️! I will try to test this tomorrow - and for sure by monday

@firai
Copy link
Collaborator

firai commented Jul 30, 2023

Thanks for the epic work, @krassowski! I haven't tested every command, but the updated extension seems to work well. A couple of questions and comments:

  • It seems like this PR only enables the CM vim plugin for notebook documents. Will a separate PR be required to enable the vim plugin for non-notebook documents (plain code, Markdown and text)?
  • When I press j from the last cell, the focus is stuck on the new "click to add a cell" button at the bottom left corner of notebooks in JL 4. Shift + Tab is then required to bring the focus back to cells. I'm not sure if there's an easy solution to this. Definitely not an issue that would block the PR from being merged in any case.

@krassowski
Copy link
Collaborator Author

It seems like this PR only enables the CM vim plugin for notebook documents. Will a separate PR be required to enable the vim plugin for non-notebook documents (plain code, Markdown and text)?

This is correct. Enabling it in file editor in a follow-up PR should be rather easy.

When I press j from the last cell, the focus is stuck on the new "click to add a cell

This is being addressed upstream by jupyterlab/jupyterlab#14796.

Copy link
Collaborator

@ianhi ianhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great stuff thank you - clearly a lot of work.

I tried it out and aside from the already noted issue originating upstream this is fantastic. If we discover more small bugs going forward they can be fixed in patch releases.

I'd hope to release this soon as the lack of vim seems to have prevented many users from moving to jlab4 (myself included).

@krassowski is there anything more you feel is necessary to add here? If not feel free to self-merge + release (or I can if you'd like)

src/index.ts Show resolved Hide resolved
@krassowski
Copy link
Collaborator Author

Feel welcome to merge and release :)

@ianhi ianhi merged commit 5b716ed into jupyterlab-contrib:master Jul 30, 2023
6 checks passed
@ianhi
Copy link
Collaborator

ianhi commented Jul 30, 2023

@krassowski can I check with you that im understanding the release process correctly?

It seems as though the right tokens for github release are in place here: jupyterlab-contrib/jupyterlab-contrib.github.io#42

So the steps are:

  1. Push a commit updating history etc
  2. trigger the prep_release workflow
  3. trigger the publish workflow?

@krassowski
Copy link
Collaborator Author

Releaser will update the changelog and version for you, you just specify whether you want a major/minor/patch bump in the workflow dispatch form.

@krassowski
Copy link
Collaborator Author

releaser will either commit to master or open a pr depending on settings not sure now what will happen here. After prep release a draft version will be up in GitHub releases for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates for Jupyterlab 4
3 participants