[COMPASS-6580] Add export file output, use new backend, show export progress toast Created: 02/Mar/23  Updated: 24/Apr/23  Resolved: 21/Apr/23

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Rhys Howell
Resolution: Done Votes: 0
Labels: export, milestone-2b
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on COMPASS-6427 exportJSON() export function and tests Closed
depends on COMPASS-6428 exportCSV() export function and tests Closed
depends on COMPASS-6540 Show toast while an import is in prog... Closed
depends on COMPASS-6577 Add export modal Closed
is depended on by COMPASS-6582 Remove new export feature flag, remov... Closed
is depended on by COMPASS-6583 Add save query to export when a query... Closed
Epic Link: COMPASS-5576
Story Points: 5
Documentation Changes: Not Needed
Sprint: Iteration Zebrafish

 Description   

When the user hits the last `Export...` button on the export modal, open a file output. Pre-fill the file name with the collection name and the file extension. Add an increasing number if the file name already exists in the default export location.

After the export file output has been chosen, start the export. If there's an error show it in the modal. 

If no errors were encountered initially then hide the modal and begin showing the progress toast.

https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=1134%3A47584&t=FoEPTv8iHfB487DG-1 

When the export is in progress and the toast is shown, use the progress callback responses from the export to show the amount of documents exported in the toast.

Show a `Cancel` action on the toast while the export is in progress. This should open a confirmation modal: https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=1452%3A48466&t=FoEPTv8iHfB487DG-1 

If an error occurs, change the variant to danger and show the error in the toast: https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=1304%3A48403&t=FoEPTv8iHfB487DG-1 

 

On export success, update the variant and make the action `View file` which opens the file in the file browser.

Designs: https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=1019%3A45601&t=FoEPTv8iHfB487DG-1 



 Comments   
Comment by Githook User [ 24/Apr/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: feat(compass-import-export): run export and show progress toasts COMPASS-6580 (#4275)
Branch: COMPASS-6530-auto-add-curly-braces
https://github.com/mongodb-js/compass/commit/b0d4b46cffeee62444431dd73832ccf18769a800

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: feat(compass-import-export): run export and show progress toasts COMPASS-6580 (#4275)
Branch: main
https://github.com/mongodb-js/compass/commit/b0d4b46cffeee62444431dd73832ccf18769a800

Generated at Wed Feb 07 22:43:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.