compass icon indicating copy to clipboard operation
compass copied to clipboard

feat: disconnect action COMPASS-7874

Open paula-stacho opened this issue 1 year ago • 2 comments

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, onCollectionRemoved and the new onConnectionDisconnected).

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)

paula-stacho avatar Apr 29 '24 15:04 paula-stacho

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.

kmruiz avatar Apr 30 '24 14:04 kmruiz

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

paula-stacho avatar Apr 30 '24 14:04 paula-stacho