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

secondary-window: add support for additional views besides webviews #11643

Open
vince-fugnitto opened this issue Sep 8, 2022 · 3 comments
Open
Labels
secondary-window issues related to multi or secondary window support

Comments

@vince-fugnitto
Copy link
Member

Feature Description:

The goal is to enhance #11048 and add support for additional views besides webviews. The current implementation only supports webviews which are a minor feature in the framework, and we should enhance support to include:

  • editors
  • views (ex: scm, debug)
@vince-fugnitto vince-fugnitto added the secondary-window issues related to multi or secondary window support label Sep 8, 2022
@tsmaeder
Copy link
Contributor

I'm working on supporting the terminal in a scondary window. The first problem I ran into is not having the proper style information inside the secondary window.

My approach would be to have a webpack build that generates the "index.html" and associated *.css files using https://github.com/webpack-contrib/mini-css-extract-plugin.
We probably don't want all the whole css to be loaded into the secondary window, so we probably need some way to mark up which CSS files need to be included: probably including all in a given package would be the way to go.

@tsmaeder
Copy link
Contributor

One more problem I've run into is that opening the "find" dialog does not work: keybindings only listen on events in the main window. Not sure yet what the right approach is here.

@tsmaeder
Copy link
Contributor

I'm also running into a single-window assumption in PhosphorJS when I attach/detach a widget: the widget search box is attached/detached from the terminal window in TerminalWidgetImpl.onBeforeAttach(). The code that borks is in PhosphorJS's `widget.js":

    function detach(widget) {
        if (widget.parent) {
            throw new Error('Cannot detach a child widget.');
        }
        if (!widget.isAttached || !document.body.contains(widget.node)) {
            throw new Error('Widget is not attached.');
        }

Note that the document global in !document.body.contains(widget.node)) refers to the main window document. Since the main window never contains a node from a widget in the secondary window, this code always fails.

tsmaeder added a commit to tsmaeder/theia that referenced this issue Sep 26, 2022
This work is happening in the context of
eclipse-theia#11643

The main changes are
- Add support for building a "secondary-window.css" file to load in the
  secondary window. Includes markup for marking frontend modules as
  contributing to the sceondary windows
- Add keybinding listeners to secondary windows
- Add color variables to secondary window style (theme support)
- monkey-patch IntersectionObserver handling on Firefox to make terminal
  refresh when in secondary window
- Extend PhosphorJS source patching to work for widget attach/detach

Contributed on behalf of ST Microelectronics

Signed-off-by: Thomas Mäder <[email protected]>
tsmaeder added a commit to tsmaeder/theia that referenced this issue Sep 28, 2022
This work is happening in the context of
eclipse-theia#11643

The main changes are
- Add support for building a "secondary-window.css" file to load in the
  secondary window. Includes markup for marking frontend modules as
  contributing to the sceondary windows
- Add keybinding listeners to secondary windows
- Add color variables to secondary window style (theme support)
- monkey-patch IntersectionObserver handling on Firefox to make terminal
  refresh when in secondary window
- Extend PhosphorJS source patching to work for widget attach/detach

Contributed on behalf of ST Microelectronics

Signed-off-by: Thomas Mäder <[email protected]>
tsmaeder added a commit to tsmaeder/theia that referenced this issue Oct 7, 2022
This work is happening in the context of
eclipse-theia#11643

The main changes are
- Add support for building a "secondary-window.css" file to load in the
  secondary window. Includes markup for marking frontend modules as
  contributing to the sceondary windows
- Add keybinding listeners to secondary windows
- Add color variables to secondary window style (theme support)
- monkey-patch IntersectionObserver handling on Firefox to make terminal
  refresh when in secondary window
- Extend PhosphorJS source patching to work for widget attach/detach

Contributed on behalf of ST Microelectronics

Signed-off-by: Thomas Mäder <[email protected]>
tsmaeder added a commit that referenced this issue Oct 11, 2022
* Add secondary window support for terminals

This work is happening in the context of
#11643

The main changes are
- Add support for building a "secondary-window.css" file to load in the
  secondary window. Includes markup for marking frontend modules as
  contributing to the sceondary windows
- Add keybinding listeners to secondary windows
- Add color variables to secondary window style (theme support)
- monkey-patch IntersectionObserver handling on Firefox to make terminal
  refresh when in secondary window
- Extend PhosphorJS source patching to work for widget attach/detach

Contributed on behalf of ST Microelectronics

Signed-off-by: Thomas Mäder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
secondary-window issues related to multi or secondary window support
Projects
None yet
Development

No branches or pull requests

2 participants