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
Fix bug causing workspace recommendations to go away upon ignoring a recommendation #55805
Conversation
@@ -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()); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@recommended:workspace
There was a problem hiding this comment.
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'
ad7fb87
to
fbc6a8b
Compare
@@ -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'); |
There was a problem hiding this comment.
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
…recommendation (#55805) * Fix bug causing workspace recommendations to go away upon ignoring a recommendation * ONly show on @recommended or @recommended:workspace * Make more consistant
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