Feb 13th 2018

Flexible window layout in Theia IDE

Dr. Miro SpönemannDr. Miro Spönemann

Theia is an open source IDE for cloud and desktop. The project is relatively young, but currently moving forward with an astonishing speed. This post describes one of the numerous recent contributions: a more flexible window layout.

Components of a Theia window

A Theia window has four areas where editors, views etc. (called widgets in the following) can be placed, as shown in the figure below.

Components of a Theia Window

The main area is used for editors, while the other areas contain views such as the Files navigator or Terminal instances. The four areas have different properties:

  • The main area is always visible. A horizontal tab is shown for each contained widget. The area can be split horizontally or vertically in order to show the content of multiple widgets.
  • The bottom panel behaves the same way as the main area, but can be hidden. It is always hidden when empty.
  • The left and right panels show the titles of their contained widgets vertically. The panels can be collapsed and expanded by clicking on such a title. Similarly to the bottom panel, the side panels and the related title bars are hidden when empty. These panels cannot be split, so each can show at most one widget.

Theia is not a specific IDE, but rather a framework for building IDEs and similar applications. Therefore the window areas can be used differently depending on the context (this concept is called Perspective in Eclipse). This means that every Theia-based application can have a different set of widgets and a different arrangement of these widgets in the application window.

Drag & drop between panels

A few days ago I contributed a change that allows to drag widgets from any area of the application window to any other area. The following screencast demonstrates this: When a panel is currently hidden, it is shown temporarily during a mouse drag operation as soon as the mouse cursor gets close to the respective border of the window. For example, in the screencast the right panel pops in as the user drags the Problems view to the right.

Try it!

The example application contained in the Theia repository can be built and started with a few steps. Feel free to try the new drag & drop feature, and let us know what you think.

About the Author

Dr. Miro Spönemann

Dr. Miro Spönemann

Miro joined TypeFox as a software engineer right after the company was established. Five years later he stepped up as a co-leader and is now eager to shape the future direction and strategy. Miro earned a PhD (Dr.-Ing.) at the University of Kiel and is constantly pursuing innovation about engineering tools.

Read more about this topic

read the article

Jan 3rd 2024

Article

Markus Rudolph

Add views to a Langium-powered VS Code extension

Markus gives a simple introduction about webviews in VS Code and how to interact with Langium.

read the article
read the article

Dec 13th 2023

Article

Dennis Hübner

Enhancing communication between extensions and webviews using VS Code Messenger

Dennis introduces the VS Code Messenger library and explains how to use it for a better intercommunication between VS Code extension and its webviews.

read the article
watch the videoOpen Video

Nov 16th 2023

Video

Mark Sujew

Embracing remote systems in local IDEs

Mark discusses remote development and collaborative editing. He introduces a new collaboration protocol to enable compatibility between IDEs.

watch the video
LOAD MORE