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

vsx-registry: prevent search with no query present #10833

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

vince-fugnitto
Copy link
Member

What it does

The pull-request prevents a search from the vsx-registry view to open-vsx when no query is present.
Previously, a search would happen when no query is present which caused us to call the api and it would return the list of popular extensions. This change should effectively prevent extraneous searches from happening like an initial search when a user types, and when the search term is cleared.

vsx-no-query.mp4

How to test

  1. start the application, and open the extensions-view
  2. perform searches - no intermediate results should appear unrelated to the query, listing the popular extensions
  3. clearing the search should not cause an api call

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

The commit prevents the `vsx-registry` from searching `open-vsx` when no
search query is present. Previously, when no query is present a search
is still performed to the registry (despite users not asking to), which
will return the list of popular extensions as determined by the open-vsx
api.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto added vsx-registry Issues related to Open VSX Registry Integration open-vsx issues related to the open-vsx registry labels Mar 2, 2022
@vince-fugnitto vince-fugnitto self-assigned this Mar 2, 2022
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

Looks good to me. Reduces calls to Open VSX and ensures that old results are cleared when the user clears the search bar.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looking good to me as well! 👍

@vince-fugnitto vince-fugnitto merged commit 40a7eb2 into master Mar 7, 2022
@vince-fugnitto vince-fugnitto deleted the vf/vsx-no-query branch March 7, 2022 17:35
@github-actions github-actions bot added this to the 1.24.0 milestone Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-vsx issues related to the open-vsx registry vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants