mongodb-js / vscode

Connect to MongoDB and Atlas and directly from your VS Code environment, navigate your databases and collections, inspect your schema and use playgrounds to prototype queries and aggregations.
https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode
Apache License 2.0
326 stars 58 forks source link

Feature Request - "Drop Document" option in context menu #145

Closed jcgerhard closed 1 year ago

jcgerhard commented 4 years ago

Feature Request

Having a "Drop Document" option in a documents' context menu

Detailed Description

To get a more fluent way of working with a mongo instance, it would be nice to have this additional option in the mouse context menu of a document entry. I oftentimes need to drop/delete documents while working on a collection. This feature would make it way more easy to do this.

Context

I have been working with the extension solely for a few weeks now. I really love it beacause there is no need to left VS Code to work on a database anymore. I would like to replace my mongodb client completely with this extension. This feature would make it way more comfortable to use while working the hole day with it.

Possible Implementation

mongo-vscode-document-drop

alenakhineika commented 3 years ago

Could you please create a feature request in our feedback forum?

SethFalco commented 2 years ago

I'd probably call it "Delete Document…" instead of "Drop Document" to match how MongoDB refers to deleting documents in the documentation.

I'm not sure what the best UX is, but probably best to add an "Are you sure?" prompt somehow where it shows the user the document, and they have to click y or click "Yes" in a prompt. Opinions welcome!

Just keeping this here for reference: https://www.mongodb.com/docs/manual/tutorial/remove-documents/

santiagopuentep commented 2 years ago

This feature looks critical to me. I have no idea of how to delete documents using the extension, without doing it with a playground. Am I missing something?

Anemy commented 1 year ago

@jcgerhard @santiagopuentep We've added document actions in the new 0.10.0 release. Thanks for opening the issue and the good writeup! https://github.com/mongodb-js/vscode/releases

jcgerhard commented 1 year ago

That's great! I thought this project has died. I will test it. Keep up!

santiagopuentep commented 1 year ago

I tried it and it's not working. There's not even context menu when right clicking on a document.

Anemy commented 1 year ago

@santiagopuentep Are you sure you're using the most up to date version of the extension? 0.10.0? The extension auto update in VSCode can take a bit to update. You might have to restart VSCode. Here's what right clicking a document should look like:

Screen Shot 2023-01-13 at 10 22 39 AM
santiagopuentep commented 1 year ago

@Anemy Yes, I have 0.1.0, and I had restarted VSCode, but now I restarted it again just in case and now it works. Thanks.