Repository navigation
Enabled movable Custom Views - #89240
Conversation
Sandeep Somavarapu (sandy081)
left a comment
There was a problem hiding this comment.
Reviewed changes in ViewDescriptorService. Requested one change.
Approving it expecting that requested change is taken care of.
Thanks.
| this._register(this.viewsRegistry.onViewsDeregistered(({ views, viewContainer }) => this.onDidDeregisterViews(views, viewContainer))); | ||
|
|
||
| this._register(this.viewsRegistry.onDidChangeContainer(({ views, from, to }) => { this.removeViews(from, views); this.addViews(to, views); })); | ||
| this._register(this.viewsRegistry.onDidChangeContainer(({ views, from, to }) => { this.removeViews(from, views); this.addViews(to, views); this._onDidChangeContainer.fire({ views, from, to }); })); |
There was a problem hiding this comment.
I think we shall also check location change here even though currently location change is not yet supported in registry. This should be ready for future if it is allowed.
I would recommend to have a single method that can be reused when views are moved in registry or in cache.
this.removeViews(from, views);
this.addViews(to, views);
const oldLocation = this.viewContainersRegistry.getViewContainerLocation(from)!;
const newLocation = this.viewContainersRegistry.getViewContainerLocation(to)!;
if (oldLocation !== newLocation) {
this._onDidChangeLocation.fire({ views, from: oldLocation, to: newLocation });
}
this._onDidChangeContainer.fire({ views, from, to });There was a problem hiding this comment.
Sandeep Somavarapu (@sandy081) thanks, will take care of this.
|
It would still be great to get approval from: |
João Moreno (joaomoreno)
left a comment
There was a problem hiding this comment.
Changes in listService make sense!
Alex Ross (alexr00)
left a comment
There was a problem hiding this comment.
The custom view changes look good!
|
SteVen Batten (@sbatten) Merging the PR as we have all approvals. |
This PR refs #85164