mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #3836] refactor: introduce abstractions at the workspace level #4550
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#4550
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/3836
Author: @jamesgeorge007
Created: 2/16/2024
Status: 🔄 Open
Base:
next← Head:refactor/workspaces📝 Commits (10+)
4cf801crefactor: initial iterations36d7379refactor: iterations6529223refactor: compile data in handlesd421a06refactor: finalize API methodsdbd4717refactor: prevent storing entire collection data in the respective handle0806a3arefactor: unify edit collection API methods and ensure consistent naming conventioncb34d13refactor: consistent return formats1dc08f0refactor: save request handle in tabs and remove tabs related logic from personal provider definitionb8e29acrefactor: updates based on the provider methods signature changesbbc25afrefactor: persist request handle under tab saveContext📊 Changes
70 files changed (+19430 additions, -938 deletions)
View changed files
📝
packages/hoppscotch-common/locales/en.json(+3 -1)📝
packages/hoppscotch-common/package.json(+1 -0)📝
packages/hoppscotch-common/src/components/app/Header.vue(+45 -44)📝
packages/hoppscotch-common/src/components/collections/Collection.vue(+2 -2)📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+82 -43)📝
packages/hoppscotch-common/src/components/collections/MyCollections.vue(+11 -11)📝
packages/hoppscotch-common/src/components/collections/Properties.vue(+13 -4)📝
packages/hoppscotch-common/src/components/collections/SaveRequest.vue(+244 -231)📝
packages/hoppscotch-common/src/components/collections/TeamCollections.vue(+11 -11)📝
packages/hoppscotch-common/src/components/collections/index.vue(+2 -2)📝
packages/hoppscotch-common/src/components/environments/ImportExport.vue(+73 -31)📝
packages/hoppscotch-common/src/components/environments/index.vue(+224 -14)📝
packages/hoppscotch-common/src/components/environments/my/Details.vue(+12 -34)📝
packages/hoppscotch-common/src/components/environments/my/Environment.vue(+60 -16)📝
packages/hoppscotch-common/src/components/environments/my/index.vue(+18 -3)📝
packages/hoppscotch-common/src/components/environments/teams/Details.vue(+11 -0)📝
packages/hoppscotch-common/src/components/environments/teams/Environment.vue(+7 -0)📝
packages/hoppscotch-common/src/components/environments/teams/index.vue(+12 -3)📝
packages/hoppscotch-common/src/components/http/Request.vue(+61 -42)📝
packages/hoppscotch-common/src/components/http/RequestTab.vue(+22 -3)...and 50 more files
📄 Description
Description
This PR introduces abstractions at the workspace level and ports the existing implementation to the new architecture. This will be done in phases, and the changes will be merged into the head branch. On a high level, business logic specific to each workspace is being moved from component sources to the respective provider definitions. The newly revamped workspace service acts as an interface for other parts of the codebase to access methods implemented by the various workspace providers. There is a given set of API methods that each provider (
personal,teams,file-based) will implement, starting withpersonalinitially.Handles - Reference to an entity, say workspace, collection, requests, etc. It also holds the necessary information about the resource being pointed to. It can be invalidated at any point. Hence, it's a
refto a resource that, in turn, can hold reactive data (A handle itself can be invalidated and needs to be aware of changes happening to the inner members).Views - Compiles information about the underlying representation used to render the UI.
Compiles changes from the following PRs:
Todos
Newprefixes from the newly added components once replacing all instances with newly added components and removing the old ones.emitWithFullCollectionprop from theCollectionsPropertiescomponent after porting all usages.workspace-user-collectionwithuser-collectionfor the typeHoppRESTSaveContextunderhoppscotch-common/src/helpers/rest/document.requestHandleunder the tabsaveContextand remove the IDs (requestID,workspaceID, etc) at runtime (Future TODO).collectionIDfromrequestHandlesince it can be obtained fromrequestID(Future TODO).Checks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.