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

search export: add modal for better UI, error handling, and transparency#50316

Merged
limitedmage merged 6 commits into
mainfrom
jp/searchexportmodal
Apr 4, 2023
Merged

search export: add modal for better UI, error handling, and transparency#50316
limitedmage merged 6 commits into
mainfrom
jp/searchexportmodal

Conversation

@limitedmage

@limitedmage limitedmage commented Apr 3, 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.

@limitedmage limitedmage requested review from a team and camdencheek April 3, 2023 22:33
@cla-bot cla-bot Bot added the cla-signed label Apr 3, 2023
@sourcegraph-bot

sourcegraph-bot commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 00b3bef...7a3a40d.

Notify File(s)
@fkling client/web/src/search/results/SearchActionsMenu.tsx
client/web/src/search/results/SearchResultsInfoBar.test.tsx
client/web/src/search/results/SearchResultsInfoBar.tsx
client/web/src/search/results/StreamingSearchResults.tsx
client/web/src/search/results/export/SearchResultsCsvExportModal.tsx
client/web/src/search/results/export/searchResultsExport.test.ts
client/web/src/search/results/export/searchResultsExport.ts

@limitedmage limitedmage force-pushed the jp/searchexportmodal branch from 0f493e0 to 0417798 Compare April 3, 2023 23:10

@camdencheek camdencheek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! This is a significant improvement. Thanks!

@limitedmage limitedmage merged commit c1ce6c8 into main Apr 4, 2023
@limitedmage limitedmage deleted the jp/searchexportmodal branch April 4, 2023 15:56
github-actions Bot pushed a commit that referenced this pull request Apr 4, 2023
…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)
coury-clark pushed a commit that referenced this pull request Apr 4, 2023
…, and transparency (#50348)

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.
 <br> Backport c1ce6c8 from #50316

Co-authored-by: Juliana Peña <me@julip.co>
almeidapaulooliveira pushed a commit that referenced this pull request Apr 5, 2023
…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.
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