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

Make playgrounds become proper JavaScript environments

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.11.1
    • Affects Version/s: None
    • Component/s: Playgrounds
    • None
    • 5
    • Iteration Whale
    • Needed
    • Hide

      Please see the ticket description for more context. And here is a link to a design doc that explains changes even further: https://docs.google.com/document/d/1dU4DuNRolVhNF4RiH1pbzgpDVOc9Bv_5xDm-TZ8bEaA/edit#

      Show
      Please see the ticket description for more context. And here is a link to a design doc that explains changes even further: https://docs.google.com/document/d/1dU4DuNRolVhNF4RiH1pbzgpDVOc9Bv_5xDm-TZ8bEaA/edit#

      Make playgrounds become proper JavaScript environments.

      • Update syntaxes.
        • Replace the MongoDB-TmLanguage grammar with the MongoDB injection grammar.
        • Modify the `update-grammar` script to update the MongoDB injection grammar with the most recent DevTools constants during the build process.
      • Activate the extension on `javascript` and `plaintext` languages.
        • Refactor activation events.
        • For playgrounds opened from the disc set JavaScript language to the document.
      • Identify playgrounds based on the document path.
        • Implement the `isPlayground` util function that will identify playgrounds among other JavaScrip files.
        • Refactor all places that check for `mongodb` language id and replace it with `isPlayground` check.
      • Create playgrounds as JavaScript documents.
        • Create playgrounds by the document UID.
        • Apply required changes to all templates based on playgrounds functionality (clone document, insert document, create collection, create index, search).
      • Declare global variables in playground templates to resolve linting errors.
      • Show the “Run Playground” button only for MongoDB playgrounds and hide it for regular JavaScript files in a workspace.
      • Show Active Connection CodeLens only for MongoDB playgrounds and hide it for regular JavaScript files in a workspace.
      • Show Playground Selected CodeAction only for MongoDB playgrounds and hide it for regular JavaScript files in a workspace.
      • Update the Language Server to work with JavaScript documents.

            Assignee:
            alena.khineika@mongodb.com Alena Khineika
            Reporter:
            alena.khineika@mongodb.com Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: