-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(workspaces): personal workspace provider additions for REST environments #4113
Merged
jamesgeorge007
merged 16 commits into
refactor/workspaces
from
refactor/workspaces-personal-provider-additions
Jun 21, 2024
Merged
refactor(workspaces): personal workspace provider additions for REST environments #4113
jamesgeorge007
merged 16 commits into
refactor/workspaces
from
refactor/workspaces-personal-provider-additions
Jun 21, 2024
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
55147fe
to
6e7b46c
Compare
23861b8
to
995bd55
Compare
Remove redundant issued handle updates happening in the `create(REST/GQL)Request` methods since it is accounted for via returning `getRequestHandle`. This led to dissociating the handle undergoing updates at the service level with that of the UI.
995bd55
to
bd6b76d
Compare
…ated straightaway
Replace computing authorization/headers with the respective provider view based method.
…ervice` To be replaced with `workspaceService` once the support for teams is brought about.
0c54896
to
427bc5f
Compare
33cc7d9
to
98a9f0d
Compare
2 tasks
ec20afa
to
df0c9ee
Compare
… and reopened Remove the issued request handle under tabs while closing.
df0c9ee
to
d31bed7
Compare
d48a184
to
18c7d2e
Compare
17b0690
to
fe7a56d
Compare
fe7a56d
to
7c11bd3
Compare
AndrewBastin
approved these changes
Jun 21, 2024
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 ports GraphQL collections & REST environments to the new handles-based architecture.
Closes HFE-525.
Changes
Adds the following methods under the personal workspace provider corresponding to the abovementioned features.
Introduce
restEnvironmentState
member at thePersonalWorkspaceProviderService
level holding the environment store state.The
getCollectionHandle
&getRequestHandle
methods are renamed togetRESTCollectionHandle
&getRESTRequestHandle
respectively.Environments-related component updates moving to the provider API methods. Separate components for personal/team workspaces are kept as is for now and events are emitted corresponding to the action performed (create, edit, etc) bound to the respective provider method at the base component level (
Environments
).Introduce the
RESTEnvironmentsView
type corresponding to the list of environments under a workspace (return type of thegetRESTEnvironmentsView
method).Perform request duplication via the provider method for creating a request.
Includes a fix for the case when the request from the collection tree and the one open under a tab dissociates when closed and reopened. The corresponding request handle is removed from the issued handles list maintained at the
PersonalWorkspaceProvider
service level via the newsetIssuedHandles
method when a tab is closed. A new helper functionupdateIssuedHandlesForPersonalWorkspace
is added under~/helpers/tab/index.ts
abstracting the business logic for use in the REST/
page (to be extended to GQL in the future). Also, while invalidating the affected request handles while removing a collection/request, the respective handles are removed fromissuedHandles
to prevent having unnecessary invalidated handle{ type: "invalid", reason: <string> }
entries kept throughout.Checks
Note to reviewers
The changes aimed at porting GQL collections are reverted for the time being since a few issues were encountered while testing the flows e2e - To be revisited.
REST
prefixes are added to certain methods. Dedicated methods will be introduced once GQL collections-related functionality is ported with future-proofing in mind. Although the functionality is almost similar with the store update approach being the difference, they are kept distinct to account for the increase in scope (The current scope of workspace refactor only deals with the store/data source level) that might lead to diverging business logic.