[COMPASS-6577] Add export modal Created: 02/Mar/23  Updated: 24/Apr/23  Resolved: 18/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
is depended on by COMPASS-6580 Add export file output, use new backe... Closed
is depended on by COMPASS-6611 Add export json types Closed
is depended on by COMPASS-6612 Add csv field sorting options Closed
is depended on by COMPASS-6725 Add export aggregation code preview Closed
Epic Link: COMPASS-5576
Story Points: 5
Documentation Changes: Not Needed
Sprint: Iteration Yellowtail Amberjack, Iteration Zebrafish

 Description   

Add a new export modal behind a feature flag.
Add the json/csv file picker RadioBoxGroup to the export modal.

Let's add the separate flows for how this modal works here (export full collection vs query w/o projection vs query w/ projection). We'll add todos for the relevant sections like the export without project field input table. The 3 flows to consider here are:

  • Export full collection (file picker is on the first and only modal view)
  • Export query without a projection (file picker is on the last modal view)
  • Export query with a projection (file picker is on the first and only modal view)

When `CSV` is chosen we show a banner indicating potential data type loss.

Note: This does not mean these ui parts are running the backend yet. That happens in dependent tickets.

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

When a user has chosen the export `Export query results` option, show the filter (and projection if there is one) from the query in the new export modal. Note we still want to export aggregations, so ensure those are accounted for.

If the query has a projection already we show a banner indicating that only projected fields are exported. https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=921%3A45919&t=FoEPTv8iHfB487DG-1 

When there is no projection in the query we show a `Fields to export` option, with a banner also indicating that they can use the projection in the query bar to project. https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=796%3A36622&t=FoEPTv8iHfB487DG-1 
Showing the fields to export table will happen in a dependent ticket.

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

When exporting a query without a projection show the export field table.

While the table fields are loading we show a skeleton status:
https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=923%3A45170&t=FoEPTv8iHfB487DG-1 

Once the fields have completed loading we show them with checkboxes, similar to the existing export. We also show a new field input button and input field: https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=920%3A44732&t=FoEPTv8iHfB487DG-1 

This work involves using the `gatherFields()` function from the store to get the field names to show  COMPASS-6426  . If that work is not complete yet we can mock the data

Designs: https://www.figma.com/file/4sXj42XyicBsdQkYIugHaV/Compass-Import%2FExport?node-id=923%3A45170&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): add export modal COMPASS-6577 (#4262)
Branch: COMPASS-6530-auto-add-curly-braces
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 24/Apr/23 ]

Author:

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

Message: chore(compass-import-export): move existing export to legacy file naming, update export dev flag COMPASS-6577 (#4251)
Branch: COMPASS-6530-auto-add-curly-braces
https://github.com/mongodb-js/compass/commit/539631ce890674e68d6ffb0fbe5efac71ac18d8b

Comment by Githook User [ 21/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: 1.36-releases
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 21/Apr/23 ]

Author:

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

Message: chore(compass-import-export): move existing export to legacy file naming, update export dev flag COMPASS-6577 (#4251)
Branch: 1.36-releases
https://github.com/mongodb-js/compass/commit/539631ce890674e68d6ffb0fbe5efac71ac18d8b

Comment by Githook User [ 20/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: surface-type-warnings
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 19/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: COMPASS-6687-fix-drop-namespaces-from-sidebar
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 19/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: update-typescript-to-latest
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 19/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: stage-wizard-fields
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 19/Apr/23 ]

Author:

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

Message: chore(compass-import-export): move existing export to legacy file naming, update export dev flag COMPASS-6577 (#4251)
Branch: stage-wizard-fields
https://github.com/mongodb-js/compass/commit/539631ce890674e68d6ffb0fbe5efac71ac18d8b

Comment by Githook User [ 18/Apr/23 ]

Author:

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

Message: feat(compass-import-export): add export modal COMPASS-6577 (#4262)
Branch: main
https://github.com/mongodb-js/compass/commit/8b169d56319e6a797bf5a1078b59e991dbc4dbb5

Comment by Githook User [ 17/Apr/23 ]

Author:

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

Message: chore(compass-import-export): move existing export to legacy file naming, update export dev flag COMPASS-6577 (#4251)
Branch: main
https://github.com/mongodb-js/compass/commit/539631ce890674e68d6ffb0fbe5efac71ac18d8b

Comment by Githook User [ 11/Apr/23 ]

Author:

{'name': 'Rhys Howell', 'email': 'rhysh@live.com', 'username': 'Anemy'}

Message: Merge branch 'main' into COMPASS-6577-add-export-modal
Branch: COMPASS-6577-add-export-modal
https://github.com/mongodb-js/compass/commit/46b0f665b57827b19d539cbbb1b3bfa83137482d

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