Skip to content

Migrate search export to the core workflow

Warren Gifford requested to merge taras-yemets/migrate-search-export into main

Created by: taras-yemets

Migrates search-export extension functionality into the core workflow. Closes https://github.com/sourcegraph/sourcegraph/issues/38379

Notes on implementation

  1. This PR migrates the existing extension functionality with known limitations (we do not actually export all search results found, but only a certain portion of it, what actually the query SearchResults returns).
  2. There are 2 extension specific user settings: searchExport.searchPatternType and searchExport.maxMatchContentLength. We migrate the former but ignore the latter as it targets Sourcegraph versions prior to 3.29, and the migrated functionality will be available only for 4.0+ Sourcegraph users.
  3. The only visual change in the regular UI is the export button text; notification behavior remains the same.
  4. Export search results button is added to the simple UI actions dropdown.
Extension Core workflow feature
Screenshot 2022-08-02 at 17 54 03Screenshot 2022-08-02 at 17 53 22 Screenshot 2022-08-02 at 18 22 03 Screenshot 2022-08-02 at 17 53 22
Screenshot 2022-08-03 at 15 19 27

Test plan

  1. sg start web-standalone
  2. Enable sourcegraph/search-export extension
  3. Search for something, click "Export search results" button and download the suggested file
  4. Enable extensionsAsCoreFeatures experimental feature in user settings.
  5. Repeat step 3 and ensure the same search results are downloaded.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading