-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: introduce abstractions at the workspace level #3836
Draft
jamesgeorge007
wants to merge
92
commits into
next
Choose a base branch
from
refactor/workspaces
base: next
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jamesgeorge007
force-pushed
the
refactor/workspaces
branch
from
February 16, 2024 07:39
175b73d
to
43ce9d2
Compare
10 tasks
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Introduce a handle for requests.
…rom personal provider definition
Bump vue version.
…the new implementation
… the request level straightaway
Fix lint errors
Mark the tab (saved request under a collection) as not dirty if the request contents are reset to the value since previous save.
- Filter out duplicate issued handle entries. - Move from `getAffectedIndexes` helper function to a custom implementation for updating affected request indices.
Ensure child collections are created instead of the action resulting in new root collections.
- Increase test coverage. - Move store mock data under `__tests__/__mocks__`. - Rephrase test descriptions.
jamesgeorge007
force-pushed
the
refactor/workspaces
branch
from
May 23, 2024 13:34
310499b
to
4c74d0f
Compare
- Drop the `collections` parameter since the it is already available in the `PersonalWorkspaceProviderService` context. - Make the above method return a left error of `NO_COLLECTIONS_TO_EXPORT` when the collections list is empty. - Error handling updates.
jamesgeorge007
force-pushed
the
refactor/workspaces
branch
from
May 28, 2024 14:29
a5f4357
to
73a5f46
Compare
A return value isn't necessary here.
By returning `getCollectionHandle` from methods that return a handle, for instance, `createRESTRootCollection`, we could ensure any updates to the respective resource are reflected in the above-issued handle since updates to the store would count as a reactive dependency within `getCollectionHandle` since it accesses the store and thereby signifying a reactive update to `createRESTRootCollection` method which consumes to process the return value. The reactive update wasn't observed while testing, hence relevant TODO comments are added for future investigation.
- Leverage maps for faster lookups and other optimizations. - Refactoring aimed at improving readability.
jamesgeorge007
force-pushed
the
refactor/workspaces
branch
from
June 10, 2024 17:50
f30f554
to
6b3b008
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 withpersonal
initially.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
ref
to 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
New
prefixes from the newly added components once replacing all instances with newly added components and removing the old ones.emitWithFullCollection
prop from theCollectionsProperties
component after porting all usages.workspace-user-collection
withuser-collection
for the typeHoppRESTSaveContext
underhoppscotch-common/src/helpers/rest/document
.requestHandle
under the tabsaveContext
and remove the IDs (requestID
,workspaceID
, etc) at runtime.collectionID
fromrequestHandle
since it can be obtained fromrequestID
.Checks