-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
Conversation
- 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
991a63f
to
b3dddca
Compare
Contributed on behalf of STMicroelectronics
'@lumino/dragdrop' consumes DragEvent already at loading time. Therefore the DragEvent mock must already be available before executing the tests. Adds a new private '@theia/test-setup' dev package which is consumed in the mocha config to mock 'DragEvent' before loading and compiling tests. Contributed on behalf of STMicroelectronics
1897faf
to
b074e61
Compare
Contributed on behalf of STMicroelectronics
After being attached, the search-in-workspace widget tries to focus its input field. However the input field is rendered via React and might not be created yet. Adjusts the focus mechanism to wait until the input is rendered before trying to focus it. Contributed on behalf of STMicroelectronics
Contributed on behalf of STMicroelectronics
Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
To workaround Lumino's empty menu checks we now always return menus with at least one item. Contributed on behalf of STMicroelectronics
Adapts the current focus behavior for non-native menus to work properly again. However different to before they now keep their focus when closed. Therefore this is still wip. Adds a developer variable to enable/disable the new adaptations. Contributed on behalf of STMicroelectronics
Makes sure that the terminal widget id is set to the injected value. Fixes Terminal Playwright tests. Contributed on behalf of STMicroelectronics
Adjusts Lumino for second window usage Contributed on behalf of STMicroelectronics
- removes the debug variable - do not restore focus to menu elements Contributed on behalf of STMicroelectronics
@sdirix I don't understand what this does: can you give a more concrete example what you click on in what sequence? |
After the merge of the latest Focus State IssueThe issue only occurs in the non-native menu bar, i.e. in the Theia Browser variant or when disabling the native menu in the Electron case:
This is how it works in the current Theia File Explorer InteractionThis is already broken in current
In the current |
Signed-off-by: Thomas Mäder <[email protected]>
It turns out the focus change causes the view part titles to change, which in turn refreshes the view container menu. This updates the visiblity toggle commands for that container. This in turn causes BrowserMainMenuFactory.showMenuBar() to invoked which replaces the whole main menu. This is happening while the menu is being shown, so the menu becomes empty. On the second try, the focused widget probably does not change anymore and the menu is shown O.K. When I remove the listener for the title change, the main menu bar works just as expected. |
Note that we need update the main menu when the menu registry changes, menus might have been unregistered and the main menu bar has no "onBeforeShow" obviously, as it is always visible. Dynamic menus for the main menu bar seem more and more a strange concept to me. Also putting local menu items like visibility of the views in a view part container into a global menu registry seems odd to me. Maybe we need a completely different approach here. |
Signed-off-by: Thomas Mäder <[email protected]>
@tsmaeder Thanks for the fixes! I tested it a bit and it's significantly better than before. There is one behavioral change though: The title bar menus can no longer be closed by clicking them again which seems a bit weird. |
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:
master
: linux-only: context menu of terminal and chat view in secondary windows are opened in main window. editor context menus however do work.master
: Selecting an element in a different pane (e.g. file explorer, or market place) and then interacting with the title menu is completely broken. Cause seems to be menu-dirty-changes, triggered by the focus change in parts.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.This is a huge breaking change.
How to test
Build and test the application
Review checklist
Reminder for reviewers