Skip to content
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

Fixes for 58176: Middle clicking files in breadcrumbs explorer opens … #59797

Merged
merged 2 commits into from
Oct 5, 2018

Conversation

J-Graham
Copy link
Contributor

@J-Graham J-Graham commented Oct 2, 2018

…as preview

Added a variable to detect the middle click and pass the pinned option when this is true

…as preview

Added a variable to detect the middle click and pass the pinned option when this is true
@J-Graham
Copy link
Contributor Author

J-Graham commented Oct 2, 2018

This is a PR for the following issue: #58176. It's my first attempt and I would love to hear any feedback on if you felt there was a better way to implement this.

@@ -325,7 +325,7 @@ export class BreadcrumbsControl {
editorViewState = undefined;
}
this._contextViewService.hideContextView(this);
this._revealInEditor(event, data.target, this._getEditorGroup(data.payload && data.payload.originalEvent));
this._revealInEditor(event, data.target, this._getEditorGroup(data.payload && data.payload.originalEvent), data.payload.originalEvent.middleButton);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data.payload might be undefined and will explode now

@@ -408,11 +408,11 @@ export class BreadcrumbsControl {
this._ckBreadcrumbsActive.set(value);
}

private _revealInEditor(event: IBreadcrumbsItemEvent, element: any, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE): void {
private _revealInEditor(event: IBreadcrumbsItemEvent, element: any, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE, middleClick: boolean = false): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call it pinned instead of middleClick

@jrieken jrieken added this to the October 2018 milestone Oct 3, 2018
@J-Graham
Copy link
Contributor Author

J-Graham commented Oct 4, 2018

Thanks for the feedback @jrieken. Let me know if these changes cover what you need.

Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jrieken
Copy link
Member

jrieken commented Oct 5, 2018

Thanks

@jrieken jrieken merged commit 3dc960c into microsoft:master Oct 5, 2018
@J-Graham J-Graham deleted the middle-click-breadcrumbs branch October 5, 2018 15:20
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants