Newbie Questions

Questions about how Theia is organized, built, etc…

[original thread by Justin Fagnani]

[Justin Fagnani]

I’m slowly perusing the codebase, building some examples, and have a few questions about how Theia is organized, built, etc…

[Justin Fagnani]

First, might be related to inversify, but what generates the src-gen/ folder? I haven’t found anything in the theia monorepo yet that generates it, but a few things that reference it.

[Justin Fagnani]

Also wondering about Phosphor and the Widget class hierarchy. Since it seems like every widget has a reference to a Node, and a lot of the Widget API maps pretty directly to HTMLElement APIs, I wonder if Web Components / Custom Elements were considered for widgets?

[Justin Fagnani]

Similarly, some of the JS-driven layout seems like it might be covered by flexbox & CSS Grid now. I don’t see too much usage yet, is that being considered?

The code generator lives in application-manager: https://github.com/theia-ide/theia/tree/master/dev-packages/application-manager/src/generator

Phosphor is really only used for the layout system. I.e. application-shell, the panels and the widgets. We think you can use any web tech to implement a widget. We have some using React but I don’t know why Web Components shouldn’t work.

So you think you could rewrite the application shell and its layout using CSS? I would be open for such things, just don’t know if it is worth the effort.

[Justin Fagnani]

I’m not at all sure that the shell could be completely rewritten with just CSS, but I did see some hints of layouts that might be now covered by flex and grid. Also some cases that might be better served by ResizeObserver… It’s nice to see CSS variable already used :slight_smile: