Repository navigation
Migrate Terminal Panel to ViewPane - #90252
Conversation
|
I don't know how to move it to the viewlet, |
Daniel Imms (Tyriar)
left a comment
There was a problem hiding this comment.
Looks great, thanks for this!
| } | ||
| const activeTerminalInstance = this.terminalService.getActiveInstance(); | ||
| const isPanelShowingTerminal = this.panelService.getActivePanel()?.getId() === TERMINAL_PANEL_ID; | ||
| const isPanelShowingTerminal = this.panelService.getActivePanel()?.getId() === TERMINAL_VIEW_ID; |
There was a problem hiding this comment.
Does this need to change to isViewShowingTerminal and views service instead?
| private _refreshSelectionContextKey() { | ||
| const activePanel = this._panelService.getActivePanel(); | ||
| const isActive = !!activePanel && activePanel.getId() === TERMINAL_PANEL_ID; | ||
| const isActive = !!activePanel && activePanel.getId() === TERMINAL_VIEW_ID; |
There was a problem hiding this comment.
Again should this not use views service?
| Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([{ | ||
| id: TERMINAL_VIEW_ID, | ||
| name: nls.localize('terminal', "Terminal"), | ||
| canToggleVisibility: false, |
There was a problem hiding this comment.
No idea what this is meant to drive, I can still right click to toggle the visibility in the panel?
There was a problem hiding this comment.
This shall be set to true unless we do not want terminal to hidden.
| const pane = this._viewsService.getActiveViewWithId(TERMINAL_VIEW_ID) as TerminalViewPane; | ||
| if (pane) { | ||
| pane.hideFindWidget(); | ||
| this._findWidgetVisible.reset(); | ||
| panel.focus(); | ||
| pane.focus(); | ||
| } |
There was a problem hiding this comment.
This and findNext/findPrevious no longer verify if the terminal is active or not, I guess that's fine though.
There was a problem hiding this comment.
getActiveViewWithId only returns the requested view if it is active. so if (pane) is sufficient
| Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([{ | ||
| id: TERMINAL_VIEW_ID, | ||
| name: nls.localize('terminal', "Terminal"), | ||
| canToggleVisibility: false, |
There was a problem hiding this comment.
This shall be set to true unless we do not want terminal to hidden.
You shall enable |

This PR refs #89729