-
Notifications
You must be signed in to change notification settings - Fork 62
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
fix: send 1 notification when switching connection #420
base: main
Are you sure you want to change the base?
Conversation
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! One suggestion on a possible improvement.
I noticed you merged one of my PRs! |
Hey @SethFalco, do you feel like picking up these PRs? They have been open for quite a while :) Or can we safely close them at this point? |
@alenakhineika Ahh, sorry about that! I actually forgot about this. A bit too much on my plate. 😓 If you don't mind, I would still like to address these PRs as I still use the extension. I can rebase and address it over the weekend. And since last time I left maintainers hanging… if I don't update the PR for whatever reason by next week, feel free to close it. When I have time, I'm happy to open a new PR and reference this one. |
e22d526
to
8e29c5f
Compare
I've amended the commit to mention the connection name on connect, disconnect, and both (switching between two connections). I've included a video of all 3 notifications in the PR description. Any other feedback is welcome! |
8e29c5f
to
4605f88
Compare
src/connectionController.ts
Outdated
: 'MongoDB server'; | ||
|
||
void vscode.window.showInformationMessage( | ||
`Disconnected from ${prevConnectionName} and connected to ${nextConnectionName}.` |
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.
`Disconnected from ${prevConnectionName} and connected to ${nextConnectionName}.` | |
`Changed the active connection to ${nextConnectionName}.` |
We could simplify it and omit all logic responsible for prevConnectionName
. Don't think the old connection details are important when connecting to a new cluster.
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.
Rather than the word Changed
, how about Set
?
The word Changed
implies the presence of a connection before, but if you'd like a single message for both an initial connection and changing connection, I think Set
is more fitting.
1712a84
to
6da3a87
Compare
Co-authored-by: Alena Khineika <[email protected]>
6da3a87
to
5aecbe8
Compare
Description
Previously, when one had 2 connections, switching created 2 notifications.
This isn't a major problem, but is a little annoying.
This instead adds a
quiet
argument to#disconnect
, and uses this argument when switching to skip the notification for disconnecting.Screencast.from.2024-06-07.23-52-02.webm
Checklist
Not sure if this PR requires them as this only really updates the use of
showInformationMessage
which is mocked in the tests anyway.Motivation and Context
Open Questions
Happy to discuss UX if you have any feedback/opinions.
Types of changes