Skip to content

Add executedQuery and resultClassName props to search list

Administrator requested to merge tjk/search-list-query-prop into main

Created by: tjkandala

Add props to StreamingSearchResultsList for the VS Code extension (likely the last VS Code extension search-ui PR for initial release 🎊).

  • executedQuery: Simply the latest run query. Used to be location.search by default. Used to reset virtual list height/items to show on new search.
  • resultClassName: Allows consumer to style search result container

Test plan

On Sourcegraph web:

resultClassName (search result rendering):

  1. Run a search
  2. Observe that search result rendering has not changed
After sourcegraph.com
search-result-after search-result-dotcom

executedQuery: (scroll visibility state reset):

  1. Run a search
  2. Scroll to the bottom of the search results list and see the next set of search results are now shown
  3. Run a new search
  4. Observe that the scroll height of the search results list has decreased (only the initial count of search results are shown)

App preview:

Merge request reports

Loading