Skip to content
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: add support for new abstractions at the workspace level #12

Merged
merged 3 commits into from May 23, 2024

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented May 9, 2024

This PR brings about changes to support the new abstractions at the workspace level that are in the works - hoppscotch/hoppscotch#3836.

  • rootNodes & childNodes in Tree & TreeBranch components are no longer computed properties. Since a handle-based system is introduced which leverages reactivity greatly, this is necessary to prevent any UI freeze while switching between workspaces.
  • Update the key prop while rendering the SmartTreeBranch component within the same component to include node data type and ID. This ensures the UI stays consistent with the underlying state changes and necessary rerenders get triggered.
  • Adds a new optional parameter to the getChildren method nodeType (need not be supplied for root nodes, hence optional) to distinguish between the incoming node types. This helps tree adapter implementations avoid performing operations specific to collections in case the incoming node is a request.

Closes HFE-506.

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
@anwarulislam anwarulislam merged commit 49c279c into main May 23, 2024
@jamesgeorge007 jamesgeorge007 deleted the workspace-refactor-changes branch May 23, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants