hoppscotch icon indicating copy to clipboard operation
hoppscotch copied to clipboard

feat(common): support simultaneous imports of collections and environment files

Open jamesgeorge007 opened this issue 5 months ago • 0 comments

Description

This PR adds support for importing multiple collection and environment files simultaneously for all import formats, including import from Gist. Also, the environment values are converted to strings while importing from Hoppscotch (via Gist/file) & Postman. We're also introducing a file size limit of 10 MB.

Closes HFE-386 HFE-389.

Checks

  • [x] My pull request adheres to the code style of this project
  • [x] All the tests have passed

Note to reviewers

  • The collection tree appears broken while importing REST/GQL collections in the personal workspace, with the requests appearing outside folders where they should reside. This is an issue that already exists related to syncing tracked separately. Safeguards are added with this PR to prevent exceptions observed while importing collections with many requests.
  • If the user mixes files of other types while importing, it will result in an error toast if the importer has validation logic for other file types but prevents importing other valid file types. Otherwise, it will result in importing all the files with the invalid file types in a broken state (empty folders, etc). Ideally, the invalid files should be filtered out, and the user should be notified via a toast. To be revisited in an overhaul.

jamesgeorge007 avatar Jan 04 '24 12:01 jamesgeorge007