compass
compass copied to clipboard
feat: disconnect action COMPASS-7874
Description
Disconnect action -> Closes the connection & all tabs that belong to it. During implementation I've noticed that the bulk close tab actions don't follow the same pattern as a single tab close:
- if the active tab is closed, make the next tab active
- if there is no next tab, make the last tab active
Now they all follow the same pattern (
onDatabaseRemoved,onCollectionRemovedand the newonConnectionDisconnected).
Checklist
- [x] New tests and/or benchmarks are included
- [ ] Documentation is changed or added
- [ ] I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)
Motivation and Context
- [ ] Bugfix
- [ ] New feature
- [ ] Dependency update
- [ ] Misc
Open Questions
Dependents
Types of changes
- [ ] Backport Needed
- [ ] Patch (non-breaking change which fixes an issue)
- [x] Minor (non-breaking change which adds functionality)
- [ ] Major (fix or feature that would cause existing functionality to change)
I'm wondering if, when we close all the tabs after disconnecting, we should show the welcome screen or not instead of no tabs. But I don't think that should block anyhow this PR so please feel free to merge whenever you feel it's ready.
I'm wondering if, when we close all the tabs after disconnecting, we should show the welcome screen or not instead of no tabs. But I don't think that should block anyhow this PR so please feel free to merge whenever you feel it's ready.
good question. I wouldn't expect that, for example VS Code doesn't reopen the welcome screen when tabs are closed. But we can ask Ben & Julia