Skip to content

Commit 4e1278a

Browse files
Merge pull request mongodb#36 from kanchana-mongodb/DOCSP-13084
DOCSP-13084 Display Playground Output in editor
2 parents 6d4bbe2 + 278ba46 commit 4e1278a

9 files changed

+34
-31
lines changed

source/commands.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ Run these commands from the Command Palette to create and run
149149
Your playground runs against the deployment specified in your
150150
active connection.
151151

152-
|vsce| outputs the results of your playground in the
153-
:guilabel:`Output` view in VS Code.
152+
|vsce| splits your playground window to display the results in
153+
a pane titled :guilabel:`Playground Results.json` to the right
154+
of your playground. If you disabled split-view for your VS Code
155+
Editor window, |vsce| displays the playground results in a new
156+
tab to the right of your playground. If you manually move your
157+
playground results, |vsce| displays the results in that tab.
154158

155159
|vsce| View Commands
156160
--------------------

source/create-document-playground.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ The following example:
7777
{ "_id" : 1, "item" : "abc", "price" : 10, "quantity" : 2, "date" : new Date("2014-03-01T08:00:00Z")}
7878
);
7979

80-
When you press the :guilabel:`Play Button`, this operation outputs the
81-
following document to the :guilabel:`Output` view in Visual Studio
82-
Code:
80+
.. include:: /includes/fact-playground-results.rst
8381

8482
.. code-block:: javascript
8583

@@ -140,9 +138,7 @@ The following example:
140138
{ "_id" : 9, "item" : "abc", "price" : 10, "quantity" : 5, "date" : new Date("2016-02-06T20:20:13Z") },
141139
]);
142140

143-
When you press the :guilabel:`Play Button`, this operation outputs the
144-
following document to the :guilabel:`Output` view in Visual Studio
145-
Code:
141+
.. include:: /includes/fact-playground-results.rst
146142

147143
.. code-block:: javascript
148144
:copyable: false

source/delete-document-playground.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ The following example:
7777
{ "_id" : 1 }
7878
);
7979

80-
When you press the :guilabel:`Play Button`, this operation outputs the
81-
following document to the :guilabel:`Output` view in Visual Studio
82-
Code:
80+
.. include:: /includes/fact-playground-results.rst
8381

8482
.. code-block:: javascript
8583

@@ -129,9 +127,7 @@ The following example:
129127
{ "item" : "abc" }
130128
);
131129

132-
When you press the :guilabel:`Play Button`, this operation outputs the
133-
following document to the :guilabel:`Output` view in Visual Studio
134-
Code:
130+
.. include:: /includes/fact-playground-results.rst
135131

136132
.. code-block:: javascript
137133
:copyable: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
When you press the :guilabel:`Play Button`, |vsce| splits your
2+
Playground and outputs the following document in the
3+
:guilabel:`Playground Results.json` pane. If you disabled split-view,
4+
|vsce| outputs the following document in a new tab. If you manually
5+
move your playground results, |vsce| displays the results in that tab.

source/includes/run-playground.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
To run your Playground, press the :guilabel:`Play Button` at the top
2-
right of the Playground View. |vsce| outputs the results of your
3-
playground to the :guilabel:`Output` view in Visual Studio Code.
2+
right of the Playground View. |vsce| splits your Playground and outputs
3+
the results of your Playground in the :guilabel:`Playground
4+
Results.json` pane. If you disabled split-view, |vsce| outputs the
5+
results of your Playground in a new tab.

source/playgrounds.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ files with the ``.mongodb`` extension as playgrounds.
3030

3131
.. include:: /includes/admonitions/note-playgrounds.rst
3232

33+
|vsce| splits your Playground window to display the results of your
34+
Playground in |json| format in the right-side pane labeled ``Playground
35+
Results.json``. If you disabled split-view, |vsce| displays the
36+
Playground results in |json| format in a new tab to the right of
37+
your Playground. You cannot edit the results in the results pane.
38+
You can save the results to a file.
39+
3340
Prerequisite
3441
------------
3542

source/read-document-playground.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ The following example:
8282
{ "_id" : 0 }
8383
);
8484

85-
When you press the :guilabel:`Play Button`, this operation outputs the
86-
following document to the :guilabel:`Output` view in Visual Studio
87-
Code:
85+
.. include:: /includes/fact-playground-results.rst
8886

8987
.. code-block:: javascript
9088

@@ -134,9 +132,7 @@ The following example:
134132
{ "price" : 1 }
135133
);
136134

137-
When you press the :guilabel:`Play Button`, this operation outputs the
138-
following document to the :guilabel:`Output` view in Visual Studio
139-
Code:
135+
.. include:: /includes/fact-playground-results.rst
140136

141137
.. code-block:: javascript
142138
:copyable: false

source/run-agg-pipelines.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ This pipeline:
113113
stage adds a new field to the output called ``totalSaleAmount``,
114114
which is the culmination of the item's ``price`` and ``quantity``.
115115

116-
When you press the :guilabel:`Play Button`, this operation outputs the
117-
following documents to the :guilabel:`Output` view in Visual Studio
118-
Code:
116+
When you press the :guilabel:`Play Button`, |vsce| splits your
117+
playground and outputs the following document in the
118+
:guilabel:`Playground Results.json` pane. If you disabled split-view,
119+
|vsce| outputs the following document in a new tab:
119120

120121
.. code-block:: javascript
121122
:copyable: false

source/update-document-playground.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ The following example:
8080
{ $inc: { "quantity" : 1 }}
8181
);
8282

83-
When you press the :guilabel:`Play Button`, this operation outputs the
84-
following document to the :guilabel:`Output` view in Visual Studio
85-
Code:
83+
.. include:: /includes/fact-playground-results.rst
8684

8785
.. code-block:: javascript
8886
:copyable: false
@@ -139,9 +137,7 @@ The following example:
139137
{ $set: { "price": 9 }}
140138
);
141139

142-
When you press the :guilabel:`Play Button`, this operation outputs the
143-
following document to the :guilabel:`Output` view in Visual Studio
144-
Code:
140+
.. include:: /includes/fact-playground-results.rst
145141

146142
.. code-block:: javascript
147143
:copyable: false

0 commit comments

Comments
 (0)