Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.0] search export: add modal for better UI, error handling, and transparency#50348

Merged
coury-clark merged 1 commit into
5.0from
backport-50316-to-5.0
Apr 4, 2023
Merged

[Backport 5.0] search export: add modal for better UI, error handling, and transparency#50348
coury-clark merged 1 commit into
5.0from
backport-50316-to-5.0

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 4, 2023

Copy link
Copy Markdown
Contributor

Addresses a few issues in https://github.com/sourcegraph/sourcegraph/issues/49645

  • Added a modal to show warnings and errors when doing export.
  • Warnings shown:
    • No global type: or select: filter
    • Search will be re-run
    • Search is not complete (this is blocking and will prevent export while results are still streaming)
  • The modal shows a progress indicator when export starts; once the export has started, the modal can't be closed.
  • If the original search did not reach the display limit (1500 results), there is no need for the search to be run again and those results are used for export.
  • If the re-run search produces an error, the modal stays open to show the error and the user can try again.
  • Once the export completes successfully, the modal is automatically closed and the file is downloaded.
  • Lowered the display limit for exported results to 100,000 since the previous limit of 1,000,000 was not working for some very generic queries (eg. context:global count:all a) on both dotcom and s2; the search would take several minutes and eventually the browser would close the connection.

Test plan

image

image

image

image

App preview:

Check out the client app preview documentation to learn more.

Backport c1ce6c8 from #50316

…ncy (#50316)

Addresses a few issues in
https://github.com/sourcegraph/sourcegraph/issues/49645

- Added a modal to show warnings and errors when doing export.
- Warnings shown:
  - No global `type:` or `select:` filter
  - Search will be re-run
- Search is not complete (this is blocking and will prevent export while
results are still streaming)
- The modal shows a progress indicator when export starts; once the
export has started, the modal can't be closed.
- If the original search did not reach the display limit (1500 results),
there is no need for the search to be run again and those results are
used for export.
- If the re-run search produces an error, the modal stays open to show
the error and the user can try again.
- Once the export completes successfully, the modal is automatically
closed and the file is downloaded.
- Lowered the display limit for exported results to 100,000 since the
previous limit of 1,000,000 was not working for some very generic
queries (eg. `context:global count:all a`) on both dotcom and s2; the
search would take several minutes and eventually the browser would close
the connection.

## Test plan

![image](https://user-images.githubusercontent.com/206864/229640559-6a27dc0a-4f2a-4706-ad88-7d591a7a88e9.png)

![image](https://user-images.githubusercontent.com/206864/229640819-975e9f3c-1e86-457a-9434-1811d96055c9.png)

![image](https://user-images.githubusercontent.com/206864/229640919-b76dfc9f-1483-49ac-a9c3-9fe7027a0888.png)

![image](https://user-images.githubusercontent.com/206864/229641237-027d9feb-827c-4505-9fe7-af439bde1b0f.png)

## App preview:

- [Web](https://sg-web-jp-searchexportmodal.onrender.com/search)

Check out the [client app preview
documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews)
to learn more.

(cherry picked from commit c1ce6c8)
@github-advanced-security

Copy link
Copy Markdown

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@coury-clark coury-clark merged commit 4b4674a into 5.0 Apr 4, 2023
@coury-clark coury-clark deleted the backport-50316-to-5.0 branch April 4, 2023 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants