As a user,
I want the documents returned by a playground to be editable
So that I have a complete flow to find and update the documents in my collections
- When one or more documents returned by a playground are displayed in the editor with the results, each document has a code lens to access the editing functionality
- Non-document output won't have a code lens
- Code-lens is not displayed when the document is returned with projection applied and the _id field or other fields are missing.
- Code-lens is not displayed if the document(s) is the result of an operation that is not a find() or findOne() (e.g. aggregate(), isMaster(), getIndexes() all return documents but they are not editable)
- By clicking on the code lens, the user is taken to a new editable version of the document, displayed in EJSON (the editable document is shown with all its fields)
- When the document is saved (Cmd/Ctrl + S or with the menu), the document is saved to MongoDB.
- When the document is saved, a notification informs the user that the change has been saved in MongoDB.
- When the update results in an error, the user is notified.
- It's possible to make edits to a document and save it more than once.
- A user is connected to secondary directly instead of primary, not as part of the replica set, then it will behave as read-only access.
- The collection is read-only (e.g. could be a view or data lake).
- Authentication is turned on and a user has a read-only role.
- Do we have an EJSON syntax mode?
- Do we want a progress indicator for the update?
|Event Name||Fired when...||Properties||Property Values|
|Document Edited||... user decides to edit a document from a code lens||source||playground|
|Document Updated||... edits to the document are saved||source