mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4336] [MERGED] fix: ensure cross-platform compatibility with file exports #4756
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4756
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4336
Author: @jamesgeorge007
Created: 9/9/2024
Status: ✅ Merged
Merged: 9/10/2024
Merged by: @AndrewBastin
Base:
patch← Head:fix/platform-based-file-export📝 Commits (1)
7f7c05dfix: ensure cross-platform compatibility with file exports📊 Changes
8 files changed (+116 additions, -109 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+20 -13)📝
packages/hoppscotch-common/src/components/collections/graphql/ImportExport.vue(+4 -4)📝
packages/hoppscotch-common/src/components/environments/ImportExport.vue(+24 -26)📝
packages/hoppscotch-common/src/components/environments/my/Environment.vue(+8 -4)📝
packages/hoppscotch-common/src/components/environments/teams/Environment.vue(+7 -4)📝
packages/hoppscotch-common/src/helpers/import-export/export/environment.ts(+19 -30)📝
packages/hoppscotch-common/src/helpers/import-export/export/index.ts(+23 -19)📝
packages/hoppscotch-common/src/platform/std/io.ts(+11 -9)📄 Description
This PR enforces the usage of platform-based API for file exports ensuring compatibility across web and Desktop apps. This accounts for export flows related to collections (REST/GQL) & environments.
Closes #4332 HFE-578.
What's changed
initializeDownloadCollection()helper function is renamed toinitializeDownloadFile()and the implementation has been updated to rely on the platform-level APIs instead of the browser-based behaviour. It now returns a promise.hoppscotch-selfhost-websaveFileWithDialog(), is updated to prioritise the name if supplied.exportAsJSONhelper function compiling the export business logic for environments is refactored to leverage the above helper function.Notes to reviewers
Please verify all the export flows (individual/bulk at the workspace level) for both the web and Desktop apps.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.