[COMPASS-6536] Start using `analyzeCSVFields`, add skeleton loading status to import csv Created: 21/Feb/23  Updated: 23/Mar/23  Resolved: 21/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Le Roux Bodenstein
Resolution: Done Votes: 0
Labels: import, milestone-2a
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-6543 Surface type warnings from parsing a ... Closed
Duplicate
is duplicated by COMPASS-6567 Use analyzeCSVFields() in import Closed
Epic Link: COMPASS-5576
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Whale, Iteration Xantic Sargo

 Description   

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

In the import modal `Specify Fields and Types` table, add a skeleton loading status while we analyze the CSV fields and types. Let's reuse the skeleton we show for the collections tree.

In this work we start running `analyzeCSVFields`. Add a `mixed` data type field. This is also re-run when the delimiter is re-selected. We'll already have the first few csv fields, however we can't pre-select the types until we've analyzed the csv fields. 



 Comments   
Comment by Githook User [ 23/Mar/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(import): analyse CSV fields and auto-select the correct type COMPASS-6536 (#4155)

  • use analyzeCSVFields()
  • test auto-detecting number
  • add/fix tests
  • file type select weirdness
  • tooltips for mixed & number
  • obvs clickVisible is not available on an element..
  • feedback
  • more cleanup
  • Update packages/compass-import-export/src/components/import-preview.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • Update packages/compass-import-export/src/components/select-field-type.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • merge select-field-type into import-preview
  • async/await
  • css tweaks
  • yellow column hilight for mixed fields
  • tweaks

---------

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: github-link
https://github.com/mongodb-js/compass/commit/215d4b0bafd1bbb2d4ec20fb3cec5246c680ce56

Comment by Githook User [ 22/Mar/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(import): analyse CSV fields and auto-select the correct type COMPASS-6536 (#4155)

  • use analyzeCSVFields()
  • test auto-detecting number
  • add/fix tests
  • file type select weirdness
  • tooltips for mixed & number
  • obvs clickVisible is not available on an element..
  • feedback
  • more cleanup
  • Update packages/compass-import-export/src/components/import-preview.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • Update packages/compass-import-export/src/components/select-field-type.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • merge select-field-type into import-preview
  • async/await
  • css tweaks
  • yellow column hilight for mixed fields
  • tweaks

---------

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: 1.36-releases
https://github.com/mongodb-js/compass/commit/215d4b0bafd1bbb2d4ec20fb3cec5246c680ce56

Comment by Githook User [ 21/Mar/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(import): analyse CSV fields and auto-select the correct type COMPASS-6536 (#4155)

  • use analyzeCSVFields()
  • test auto-detecting number
  • add/fix tests
  • file type select weirdness
  • tooltips for mixed & number
  • obvs clickVisible is not available on an element..
  • feedback
  • more cleanup
  • Update packages/compass-import-export/src/components/import-preview.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • Update packages/compass-import-export/src/components/select-field-type.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • merge select-field-type into import-preview
  • async/await
  • css tweaks
  • yellow column hilight for mixed fields
  • tweaks

---------

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: COMPASS-6427-export-json
https://github.com/mongodb-js/compass/commit/215d4b0bafd1bbb2d4ec20fb3cec5246c680ce56

Comment by Githook User [ 21/Mar/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(import): analyse CSV fields and auto-select the correct type COMPASS-6536 (#4155)

  • use analyzeCSVFields()
  • test auto-detecting number
  • add/fix tests
  • file type select weirdness
  • tooltips for mixed & number
  • obvs clickVisible is not available on an element..
  • feedback
  • more cleanup
  • Update packages/compass-import-export/src/components/import-preview.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • Update packages/compass-import-export/src/components/select-field-type.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • merge select-field-type into import-preview
  • async/await
  • css tweaks
  • yellow column hilight for mixed fields
  • tweaks

---------

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: COMPASS-6540-import-toast
https://github.com/mongodb-js/compass/commit/215d4b0bafd1bbb2d4ec20fb3cec5246c680ce56

Comment by Githook User [ 21/Mar/23 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: feat(import): analyse CSV fields and auto-select the correct type COMPASS-6536 (#4155)

  • use analyzeCSVFields()
  • test auto-detecting number
  • add/fix tests
  • file type select weirdness
  • tooltips for mixed & number
  • obvs clickVisible is not available on an element..
  • feedback
  • more cleanup
  • Update packages/compass-import-export/src/components/import-preview.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • Update packages/compass-import-export/src/components/select-field-type.tsx

Co-authored-by: Rhys <Anemy@users.noreply.github.com>

  • merge select-field-type into import-preview
  • async/await
  • css tweaks
  • yellow column hilight for mixed fields
  • tweaks

---------

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: main
https://github.com/mongodb-js/compass/commit/215d4b0bafd1bbb2d4ec20fb3cec5246c680ce56

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