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

Migrate from PhosphorJS to Lumino #14320

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Oct 15, 2024

What it does

Migrate from PhosphorJS to Lumino

PhosphorJS is no longer actively maintained for a few years now. Lumino is an active fork, maintained by the JupyterLab community.

While PhosphorJS proved reliable for a long time, the cracks are starting to show. For example we need to patch PhosphorJS to support secondary windows.

The JupyterLab community is welcoming and is open to accept contributions.

Contributed on behalf of STMicroelectronics

Current state

The PR is split into separate logical commits to make the reviewing and maintenance work easier in case the PR takes longer to complete.

This PR is a draft PR as not all known issues are yet fixed.

Open issues are:

  • Tab bars currently have double the width than they should have
  • The "..." bar actions do not work
  • The preferences tree does not react on selections
  • The preferences content does not scroll

If anyone is interested in solving one or more of these issues, contact me or open a PR against the lumino-migration branch in the EclipseSource fork.

Note that Lumino introduced a code change in which empty menus can't be opened. However Theia uses an approach in which menus are filled only shortly before they are shown. Therefore this new behavior is for now patched in this draft PR. However this means the patching is now ALWAYS required and not only when wanting to support secondary windows.

We might want to think about contributing a change to Lumino first before requiring this for all downstream projects.

In any case this is of course a huge breaking change.

How to test

Build and test the application

Review checklist

Reminder for reviewers

- switch to lumino packages
- remove phosphorjs sharing

Contributed on behalf of STMicroelectronics
Adapt all CSS and code to refer to lumino classes.

Contributed on behalf of STMicroelectronics
- use 'iconClass' instead of 'class' in commands
- only access shell handlers once they are initialized
- use Lumino's host option for secondary window support
- adapt tab bar handling
- adapt to Iterable changes
- adapt to Drag interface changes
- adapt to Widget id changes

Contributed on behalf of STMicroelectronics
Adds the patch for Lumino which achieves the following:
- Make sure listeners are registered on the correct document. This is
  necessary for secondary window support.
- Make sure empty menus can be opened. This is required as Theia
  fills menus right before they are shown, so they seem to be empty.

Contributed on behalf of STMicroelectronics
Contributed on behalf of STMicroelectronics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

1 participant