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

Fix bug causing workspace recommendations to go away upon ignoring a recommendation #55805

Merged

Conversation

JacksonKearl
Copy link
Contributor

Fixes #55596, where all workspace recommendations (the pane in the @recommended search view) would vanish after ignoring any recommendation.

I think this should be in July becuase it is pretty jarring and unexpected, and it happens any time you're in the @recommended search view and ignore any recommenedation

@JacksonKearl JacksonKearl self-assigned this Aug 4, 2018
@@ -801,7 +801,7 @@ export class WorkspaceRecommendedExtensionsView extends ExtensionsListView {
}

async show(query: string): Promise<IPagedModel<IExtension>> {
let model = await ((query && query.trim() !== '@recommended') ? this.showEmptyModel() : super.show(this.recommendedExtensionsQuery));
let model = await (/@recommended/.test(query) ? super.show(this.recommendedExtensionsQuery) : this.showEmptyModel());
Copy link
Contributor

Choose a reason for hiding this comment

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

In the scenario which we are trying to fix, what is the value of query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@recommended:workspace

Copy link
Contributor

Choose a reason for hiding this comment

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

We wouldn't want the WorkspaceRecommendedExtensionsView to run its query in case of say @recommended Go. So the right fix here would be `query && query.trim() !== '@recommended' && query.trim() !== '@recommended:workspace'

@@ -801,7 +801,8 @@ export class WorkspaceRecommendedExtensionsView extends ExtensionsListView {
}

async show(query: string): Promise<IPagedModel<IExtension>> {
let model = await ((query && query.trim() !== '@recommended') ? this.showEmptyModel() : super.show(this.recommendedExtensionsQuery));
let shouldShowWorkspaceRecommended = query && (query.trim() === '@recommended' || query.trim() === '@recommended:workspace');
Copy link
Contributor

Choose a reason for hiding this comment

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

When query is an empty string, this will end up showing the empty model, where as all the other views do not do so. So we are not being consistent

@ramya-rao-a ramya-rao-a merged commit 3ffdfae into microsoft:master Aug 6, 2018
JacksonKearl pushed a commit that referenced this pull request Aug 6, 2018
…recommendation (#55805)

* Fix bug causing workspace recommendations to go away upon ignoring a recommendation

* ONly show on @recommended or @recommended:workspace

* Make more consistant
@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.

"Ignore Recommendation" makes all workspace recommendations go away
2 participants