-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Playgrounds
-
None
-
5
-
Iteration Whale
-
Needed
-
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.