Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-178

Edit documents returned from a search in a Playground

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
    • Story Points:
      8
    • Documentation Changes:
      Needed
    • Sprint:
      Iteration Star Apple, Iteration Tangerine

      Description

      User Story

      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

      Acceptance Criteria

      • 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.

      When trying to save a document we will get an error if...

      1. 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.
      2. The collection is read-only (e.g. could be a view or data lake).
      3. Authentication is turned on and a user has a read-only role.

      Open questions

      • Do we have an EJSON syntax mode?
      • Do we want a progress indicator for the update?

      Telemetry Events

      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
      success
      playground
      true|false

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alena.khineika Alena Khineika
              Reporter:
              massimiliano.marcon Massimiliano Marcon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: