theia
theia copied to clipboard
Draft: Terminal Manager
What it does
Relevant to #12673
This is PR adds the package terminal-manager
, which was built for our downstream IDE. It is heavily inspired by VSCode's split-panel terminal view + tree, but not an exact copy. The terminal manager is separate widget that supplements the existing terminals inside Theia but is not meant as a replacement (at the moment). The terminal-manager's purpose is to serve as a place to maintain and organize terminals to improve a user's way of working.
I'm hoping to hand off this feature to anyone that's interested as I will not have the bandwidth to bring this feature up to parity with VSCode. This hopefully will serve as a good jumping off point for some interesting terminal view improvements to Theia. Happy to answer any questions otherwise :)
Description
How to test
- Build and run this branch
- Start Theia and run the command "Open Terminal Manager"
- The terminal manager should appear in the bottom panel and look like this:
- On start you are given defaults of one page, one group, and one terminal, you can add additional pages by hovering over the treewidget and clicking the icons on the tree nodes
- Use the new keybinding
alt+q
to maximize and minimize the terminal panel. This keybinding is meant to serve as a convenient way of switching between the normal "editor" view and a fullscreen "terminal" view. (you can also use the new toolbar item to maximize/minimize)
- Try adding groups, pages, terminals to get something like this:
-
Right click on tree nodes and try renaming nodes
-
Click on different nodes, corresponding terminals should flash when their node is selected (and vice versa)
- Pages should automatically update when their respective nodes are selected (and renamed)
-
Try deleting groups, pages, terminals from the tree widget (you won't be allowed to delete the last page/group/terminal for its respective parent, does this behavior make sense?)
-
Try showing and hiding the tree widget with this icon:
- If you want the tree widget to appear on the left/right, set this preference;
- The terminal manager's layout and state is stored in local storage
- layouts should be stored with their corresponding workspace so a layout created in Workspace A will be saved whenever workspace A is opened, new workspaces/windows should start with a fresh terminal manager
How to test
Review checklist
- [x] As an author, I have thoroughly tested my changes and carefully followed the review guidelines
Reminder for reviewers
- As a reviewer, I agree to behave in accordance with the review guidelines
@kenneth-marut-work the title says "draft", but it's a regular non-draft PR. What's the truth?
@kenneth-marut-work the title says "draft", but it's a regular non-draft PR. What's the truth?
~~I'm happy to remove the "draft" label from the PR as I'm not actively developing it anymore. I originally kept it in draft state since it will need some work to be brought up to feature parity with VSCode.~~
Ah, I see. thanks @colin-grant-work
This is great! What would need to be done to bring this feature up to scratch?
This is great! What would need to be done to bring this feature up to scratch?
I think there are quite a lot of nice-to-have features missing (menu items/actions that you can perform on individual terminals, shell & task detection etc.). But I think most importantly the TerminalManager
is not integrated with Theia's Terminal
API (e.g. using the "New Terminal" command will not open a terminal inside the TerminalManager). Follow-up MRs could be made to add additional features, but I could imagine the following things would need to be done in the short term:
- Make TerminalManagerFrontendViewContribution extend TerminalFrontendContribution and rebind as needed
- Implement a preference similar to VSCode's
terminal.integrated.tabs.enabled
preference that would allow a user to switch between the tabbed view vs. the tree view (though I believe in VSCode the terminals actually switch between a dropdown view and a tree view, not tabs). - Depending on user's preference above, delegate Terminal actions to default
Terminal
orTerminalManager
- Fill in the gaps :)
@ConorDavenport Are you interested in picking up this work?
@ConorDavenport Could you give an update on this please? Did you grap the code so that we can close this PR? Do you plan to do a contribution here?