-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat(compass-workspaces): adapt WorkspacePlugin to support tabs with multiple DataServices COMPASS-7718 #5667
feat(compass-workspaces): adapt WorkspacePlugin to support tabs with multiple DataServices COMPASS-7718 #5667
Conversation
aren't connectionInfoId and connectionId the same thing? |
938b0af
to
a6bd695
Compare
yeap they are the same - I renamed just now the instances of connectionInfoId to connectionId in this PR. There are a few more instances of this but those are from old PRs, I will rename them at a later point. |
5500fa7
to
044e83f
Compare
packages/compass-workspaces/src/components/workspaces-provider.tsx
Outdated
Show resolved
Hide resolved
Besides the points I mentioned there is one other point I need to confirm which are the changes for compass-web. In its current state the CompassWeb tab router does not add ConnectionInfo to the returned WorkspaceOptions. There are two ways to approach it:
So excluding this, the PR should be ready for review. |
@kmruiz do we already have a follow up task to fix the sidebar with the new |
I believe this was part of this task, but if we want to do it in another please feel free to create a ticket and we can play it when we merge this PR. |
packages/compass-sidebar/src/components/legacy/sidebar-databases-navigation.tsx
Outdated
Show resolved
Hide resolved
@paula-stacho All the usage of WorkspaceService already pass connectionId in this PR so that part is covered. |
Re @himanshusinghs and @kmruiz ConnectionId is passed to the new sidebar, but it doesn't trickle all the way down to ConnectionsNavigationTree. So the highlighting and expanding behaviour of connection items isn't complete. We weren't sure what the new structure of Workspace will be, so we didn't prepare that part. I'd say it can easily be a follow up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Then please feel free to create a task, we can play it when we merge this PR. From what you say, when we merge this passing down the connection id should be pretty straightforward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Changes: - modifed WorkspacePlugin to not depend on MongoDBInstance and DataService anymore - made connectionId a tab state - WorkspaceService now asks connectionId in exposed methods - uses ConnectionInfoProvider in: - WorkspacesPlugin to wrap active workspace element - SidebarPlugin to wrap single connection sidebar - compass/workspaces.tsx to render global modals wrapped with ConnectionInfoProvider - modified places which used useOpenWorkspace hook to also pass the connectionId now
plugins that use WorkspaceService now properly pass connectionId using ConnectionInfoAccess to the methods that require it.
…es-navigation.tsx Co-authored-by: Paula Stachova <[email protected]>
0984985
to
a5facf3
Compare
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes