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
Editors: revisit IEditorPane extends IPanel #91945
Comments
Yeah, we should drop that since Output is the only one using it. Output could use compoisiton and just have an instance of an Editor which makes more sense imho. |
In am fine either way if it turns out we do not gain a lot from this inheritance. |
I moved Output view and adopted to vscode/src/vs/workbench/contrib/output/browser/outputView.ts Lines 34 to 37 in 516d459
Currently following three instances are extending or implementing vscode/src/vs/workbench/browser/panel.ts Lines 17 to 20 in 516d459
vscode/src/vs/workbench/common/editor.ts Line 67 in 516d459
I am aware of first two and not sure whey editor extends panel and it is still needed or not. |
Since the output now uses composition I think the inheritence is no longer needed and we can remove it. |
@bpasero Moving this back to you. You can remove this hierarchy from IEditorPane. |
@sandy081 @sbatten unclear to me though what editors should extend from, I am not up to speed with latest workbench layout development. I see the following types but wonder about when to use which:
Is there some wiki that explains the relationship? My current thinking is that |
|
We had a design picture in the beginning representing viewlets, panels and view panes but I do not think we wrote it down any where. But @sbatten summarised it well. Some other notes I have is
To summarise, composites and panes are base classes that everybody shall extend according to their requirements. So in your case, editor shall extend Composite for now. Here is my thinking going forward - Every workbench part shall extend PaneComposite with unique ViewContainerLocation. This will enable following
|
I don't think this is right since GridView is also using split view and workbench parts are not Panes. |
I pushed that. Should there be a follow up debt issue to clean this up as suggested? At this point I find there should probably not be any difference between a viewlet and a panel, both are the same in my mind, just at different locations. With the support for panels having multiple views, this is quite obvious. |
For a long time now, the workbench editors have extended
IPanel
because they can live both in the editor part as well as the panel (e.g. outline uses an editor).With the advent of view panes that can flow between side bar, panel and probably other places in the future I think we need to revisit what the workbench editor should extend from after all.
I can imagine that we will allow to e.g. have a output panel and some other view to coexist in the same container, so I think extending from
IPanel
does not make a lot of sense anymore for editors. It should probably be the same thing that views extend from?//cc @isidorn @sandy081
PS: I just pushed a change that renamed
IEditor
toIEditorPane
via #91943The text was updated successfully, but these errors were encountered: