-
Notifications
You must be signed in to change notification settings - Fork 245
chore(connections-navigation): add connect button to connections in sidebar COMPASS-8381 #6449
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
Conversation
7e199d5 to
03169bc
Compare
03169bc to
5ac6377
Compare
| isFocused={isFocused} | ||
| isExpanded={!!item.isExpanded} | ||
| hasDefaultAction={ | ||
| item.type !== 'connection' || item.connectionStatus === 'connected' |
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.
Ideally this would be co-located with or derived from the implementation in onDefaultAction in connections-navigation-tree.tsx, but that is not trivial because of the virtualization.
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 🚀
Something else I noticed, definitely not urgent for now. I feel like the ItemActionControls component interface need a little revisit (maybe from design) because one combination will render the UI un-usable, having collapseAfter set to anything >1 and one or more of the rendered actions having expandedPresentation of button. I think what I am trying to suggest is having some typecheck (if possible) to only allow combination that make sense from rendering POV but yea that depends on what design is thinks is feasible from rendering POV.
|
I ran the branch locally and have two clarifying questions: |
We do, we don't automatically connect to every cluster in the list |
betsybutton
left a comment
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 from a UX perspective!
I think that's a valid point.
Perhaps a "Disconnect" icon would be more appropriate? As this is out of scope for the original design, I suggest leaving that up for another (quick) PR to avoid holding back this one. @bsradcliffe what do you think? |
|
I would like to preserve the chevrons. They indicate that a node can be expanded, but it's simply disabled in the collapsed state. This is a fairly standard convention in explorer trees in GUIs. I wouldn't want to introduce any inconsistent leading edges/jagged jumping between the root level nodes. Disconnect is something that is needs to be "buried" for lack of a better word. It shouldn't be immediately accessible at the top level since a potential misclick can terminate the connection and close all of the associated connection's tabs. |
If this is referring to my last suggestion, I fear I didn't make myself clear: |
|
Gotcha. Even so, as we only utilize that left glyph for chevrons, I would still stay no to the proposal. Every left-most glyph should be a caret of some sort where child nodes can exist beneath it. |
|
@bsradcliffe We split up the engineering work into 2 tickets, since opening a connection in a new window is a non-trivial task. Here's the other ticket: https://jira.mongodb.org/browse/COMPASS-8473 |

Description
Merging this PR will:
Buttonto every disconnected connection item in the sidebar.cursor: 'pointer').connect-button.mov
Checklist
@mongodb-js/compass-sidebartestsMotivation and Context
Open Questions
ItemActionabstraction is the right for this feature or I should introduce another prop to inject a custom component into theNavigationBaseItem.Dependents
Types of changes