Repository navigation
Port view container logic from activitybarpart to panelpart - #87444
Conversation
Sandeep Somavarapu (sandy081)
left a comment
There was a problem hiding this comment.
Approved given the provided comments are taken care of
|
|
||
| private getViewContainer(panelId: string): ViewContainer | undefined { | ||
| const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry); | ||
| return viewContainerRegistry.get(panelId); |
There was a problem hiding this comment.
Shall we have to look for the view container only in the Panel location? (even though ids are unique).
| this.activePanelContextKey.set(panel.getId()); | ||
|
|
||
| // This panel supports view containers | ||
| if (panel instanceof PaneCompositePanel) { |
There was a problem hiding this comment.
I would check if view container exists/registered instead.
There was a problem hiding this comment.
I just checked activityBarPart and I think we do not need to have this check and we can do it for all panels.
| this.compositeBar.activateComposite(panel.getId()); | ||
|
|
||
| // This panel supports view containers | ||
| if (panel instanceof PaneCompositePanel) { |
There was a problem hiding this comment.
Same as above. You can remove this check because you check for view container after
|
|
||
| return cachedPanel?.views && cachedPanel.views.length | ||
| ? cachedPanel.views.every(({ when }) => !!when && !this.contextKeyService.contextMatchesRules(ContextKeyExpr.deserialize(when))) | ||
| : panelId === TEST_VIEW_CONTAINER_ID /* Hide Test Panel for the first time or it had no views registered before */; |
There was a problem hiding this comment.
Checking with TEST_VIEW_CONTAINER_ID is specific to Sidebar, so not sure if you need this here
There was a problem hiding this comment.
originally left this in if we didn't enforce unique ids across location and we chose to re-use the test container, removing.
Refs #85164
I can drop the outline contrib changes, they just make it easy to test.