Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-34766 Improve VSCode Connection Experience #73

Merged
merged 116 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
ec4f292
DOCSP-34766 Improve VSCode Connection Experience
ianf-mongodb Jan 29, 2024
9ff84a2
*
ianf-mongodb Jan 29, 2024
acda68f
*
ianf-mongodb Jan 29, 2024
45861b7
*
ianf-mongodb Jan 29, 2024
011b9a3
Empty-Commit
ianf-mongodb Jan 29, 2024
a4d0877
*
ianf-mongodb Jan 30, 2024
ab74526
Empty-Commit
ianf-mongodb Jan 30, 2024
1062973
*
ianf-mongodb Jan 30, 2024
10e1160
*
ianf-mongodb Jan 30, 2024
e151cc9
*
ianf-mongodb Jan 30, 2024
f50d815
*
ianf-mongodb Jan 30, 2024
33e0b33
*
ianf-mongodb Jan 30, 2024
a017057
*
ianf-mongodb Jan 30, 2024
0b60dcd
*
ianf-mongodb Jan 30, 2024
361bb59
Empty-Commit
ianf-mongodb Jan 31, 2024
047710f
*
ianf-mongodb Jan 31, 2024
a538712
*
ianf-mongodb Jan 31, 2024
783a7c2
*
ianf-mongodb Jan 31, 2024
cc73e69
*
ianf-mongodb Jan 31, 2024
744cbad
*
ianf-mongodb Jan 31, 2024
8d2c3ed
*
ianf-mongodb Feb 1, 2024
ffd4b01
*
ianf-mongodb Feb 1, 2024
25f1348
*
ianf-mongodb Feb 1, 2024
42cc814
*
ianf-mongodb Feb 1, 2024
4f5e156
*
ianf-mongodb Feb 1, 2024
97dad8c
*
ianf-mongodb Feb 1, 2024
ce5e380
*
ianf-mongodb Feb 1, 2024
dbd9554
*
ianf-mongodb Feb 1, 2024
5acd8f8
*
ianf-mongodb Feb 1, 2024
2643624
*
ianf-mongodb Feb 1, 2024
93f06e5
*
ianf-mongodb Feb 1, 2024
547a300
*
ianf-mongodb Feb 1, 2024
fc42be9
*
ianf-mongodb Feb 1, 2024
4468537
*
ianf-mongodb Feb 1, 2024
e7eb959
*
ianf-mongodb Feb 1, 2024
c44ab1d
*
ianf-mongodb Feb 1, 2024
f917db9
*
ianf-mongodb Feb 1, 2024
609b784
*
ianf-mongodb Feb 1, 2024
0c07ee7
*
ianf-mongodb Feb 1, 2024
1d3d06d
*
ianf-mongodb Feb 1, 2024
693b499
*
ianf-mongodb Feb 1, 2024
68752b9
*
ianf-mongodb Feb 1, 2024
a41e2e6
*
ianf-mongodb Feb 1, 2024
52301db
*
ianf-mongodb Feb 1, 2024
2ba1853
*
ianf-mongodb Feb 1, 2024
156d30d
*
ianf-mongodb Feb 1, 2024
fde7c2c
*
ianf-mongodb Feb 1, 2024
865fd3d
*
ianf-mongodb Feb 1, 2024
ba95131
*
ianf-mongodb Feb 1, 2024
127e9ab
*
ianf-mongodb Feb 1, 2024
164b306
*
ianf-mongodb Feb 1, 2024
4fe2334
*
ianf-mongodb Feb 1, 2024
45eb2a4
*
ianf-mongodb Feb 1, 2024
fcef1be
*
ianf-mongodb Feb 1, 2024
c78d51b
*
ianf-mongodb Feb 1, 2024
3cbf3dc
*
ianf-mongodb Feb 1, 2024
4f28515
*
ianf-mongodb Feb 1, 2024
0f42205
*
ianf-mongodb Feb 1, 2024
bbb7e94
*
ianf-mongodb Feb 1, 2024
0931879
*
ianf-mongodb Feb 1, 2024
7af1cf5
*
ianf-mongodb Feb 1, 2024
62fbe03
*
ianf-mongodb Feb 1, 2024
6eefcb3
*
ianf-mongodb Feb 1, 2024
0aef9c6
*
ianf-mongodb Feb 1, 2024
c91777b
*
ianf-mongodb Feb 1, 2024
ed133ac
*
ianf-mongodb Feb 1, 2024
518c1f5
*
ianf-mongodb Feb 1, 2024
02f6d1d
*
ianf-mongodb Feb 1, 2024
a6ba87d
*
ianf-mongodb Feb 1, 2024
ddc3c99
*
ianf-mongodb Feb 1, 2024
dc35a5e
*
ianf-mongodb Feb 1, 2024
34914c1
*
ianf-mongodb Feb 1, 2024
9376988
*
ianf-mongodb Feb 1, 2024
2bd790d
*
ianf-mongodb Feb 1, 2024
ac43bef
*
ianf-mongodb Feb 1, 2024
a4275e9
*
ianf-mongodb Feb 1, 2024
805135e
*
ianf-mongodb Feb 1, 2024
a115941
*
ianf-mongodb Feb 1, 2024
094bc42
*
ianf-mongodb Feb 1, 2024
6178f19
*
ianf-mongodb Feb 1, 2024
aa0bda6
*
ianf-mongodb Feb 1, 2024
cd5c685
*
ianf-mongodb Feb 1, 2024
6cb7c4f
*
ianf-mongodb Feb 1, 2024
84d16fc
*
ianf-mongodb Feb 1, 2024
5146e42
*
ianf-mongodb Feb 1, 2024
63438a2
*
ianf-mongodb Feb 1, 2024
f9d8263
*
ianf-mongodb Feb 1, 2024
bef59a8
*
ianf-mongodb Feb 1, 2024
619e2b9
*
ianf-mongodb Feb 1, 2024
3e8345f
*
ianf-mongodb Feb 1, 2024
eda13ef
*
ianf-mongodb Feb 1, 2024
714fa6a
*
ianf-mongodb Feb 1, 2024
8596e86
*
ianf-mongodb Feb 1, 2024
b0d38b1
*
ianf-mongodb Feb 1, 2024
e9425be
*
ianf-mongodb Feb 1, 2024
57cc22b
*
ianf-mongodb Feb 1, 2024
f66d955
*
ianf-mongodb Feb 1, 2024
7ad56b5
*
ianf-mongodb Feb 1, 2024
427004e
*
ianf-mongodb Feb 2, 2024
183b8cc
*
ianf-mongodb Feb 2, 2024
b50a430
Apply suggestions from code review
ianf-mongodb Feb 2, 2024
05fd578
*
ianf-mongodb Feb 2, 2024
caf16b4
remove below
ianf-mongodb Feb 2, 2024
b2784ef
*
ianf-mongodb Feb 2, 2024
3de4809
*
ianf-mongodb Feb 2, 2024
769900c
Apply suggestions from code review
ianf-mongodb Feb 6, 2024
a8e8106
*
ianf-mongodb Feb 6, 2024
bed49d4
*
ianf-mongodb Feb 6, 2024
9b0469c
*
ianf-mongodb Feb 7, 2024
cbd7fae
*
ianf-mongodb Feb 7, 2024
5bcd752
*
ianf-mongodb Feb 7, 2024
0f9264d
*
ianf-mongodb Feb 7, 2024
2eb8f0f
*
ianf-mongodb Feb 7, 2024
a8f72dc
*
ianf-mongodb Feb 7, 2024
90b1013
*
ianf-mongodb Feb 7, 2024
72eb58f
rearrange ASP task
ianf-mongodb Feb 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 168 additions & 80 deletions source/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,88 +58,51 @@

.. _vsce-connect-task:

Create a Connection to a Deployment
-----------------------------------
Create a Connection
jeff-allen-mongo marked this conversation as resolved.
Show resolved Hide resolved
-------------------

|vsce| provides two options to connect to your deployment:

.. list-table::
:header-rows: 1
:widths: 20 40

|vsce| provides two methods to create a connection to a deployment. You
can:
* - Connection Method
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - Slight cleanup for readability here.

- Description

- Provide a deployment connection string, or
- Fill in a deployment information in specific fields.
* - :guilabel:`Connect with Connection String`
- This method is faster and easier than
using the advanced connection settings. Use this option
if your deployment is hosted on |service| or you already have a
connection string for a deployment available.

Providing a connection string is faster and easier than filling in a
deployment's details. Use this option if |service| hosts your
deployment or if you have a connection string for a deployment
available.
* - :guilabel:`Advanced Connection Settings`
- This method lets you build a connection string with a form.
Use this option if you need to customize the connection

Check failure on line 81 in source/connect.txt

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.ConciseTerms] 'must' is preferred over 'need to'. Raw Output: {"message": "[MongoDB.ConciseTerms] 'must' is preferred over 'need to'.", "location": {"path": "source/connect.txt", "range": {"start": {"line": 81, "column": 31}}}, "severity": "ERROR"}
string and want to see available connection options.

Define how your connection is saved with the
:guilabel:`Default Connection Saving Location`
:ref:`setting <vsce-settings>`:
.. note::

.. include:: includes/connection-location-table.rst
To specify where |vsce| connections are saved, use
the :guilabel:`Default Connection Saving Location`
:ref:`setting <vsce-settings>`.

.. tabs::

.. tab:: Paste Connection String
:tabid: paste-connection-string
.. tab:: Connect with Connection String
:tabid: connect-with-connection-string

When you provide a connection string, |vsce| supports
most :manual:`Connection String Options
</reference/connection-string/#connection-string-options>`
supported by MongoDB.

.. include:: /includes/steps/starting-vsce-paste-string.rst

.. tab:: Fill in Individual Fields
:tabid: individual-fields

.. include:: /includes/steps/starting-vsce-individual-fields.rst

.. _vsce-activate-connection:

Activate a Connection
---------------------

You can connect |vsce| to only one deployment at a time. To change the
active connection to a different deployment, or to connect to a
deployment from which you were disconnected:

.. include:: /includes/steps/activate-connection.rst

Launch MongoDB Shell
~~~~~~~~~~~~~~~~~~~~

You can connect the :mongosh:`MongoDB Shell </>` or legacy
:binary:`mongo <mongo>` shell to your active deployment.


Considerations
``````````````

- The shell that |vsce| uses to connect to your deployment is
determined by the :guilabel:`Shell` setting in your
:ref:`extension settings <vsce-settings>`. You can choose either
the :mongosh:`MongoDB Shell </>` or the legacy :binary:`mongo <mongo>` shell.
.. include:: /includes/steps/starting-vsce-connect-with-connection-string.rst

- The path to your selected shell must exist in your system's ``PATH``.
If it does not exist in your ``PATH``, the operation errors.
.. tab:: Advanced Connection Settings
:tabid: Advanced Connection Settings

Procedure
`````````

To connect the shell to your active deployment:

1. In the |vsce| :guilabel:`Connections` list, right-click your active
deployment.

#. Select :guilabel:`Launch MongoDB Shell`.

|vsce| opens the :guilabel:`Terminal` window in VS Code and launches
the shell connected to your selected deployment.

.. seealso::

:mongosh:`Perform CRUD Operations in the MongoDB Shell </crud>`
.. include:: /includes/steps/starting-vsce-connect-with-advanced-connection-settings.rst


.. _vsce-connect-task-atlas-streams:
Expand Down Expand Up @@ -207,6 +170,129 @@
:figwidth: 700px
:alt: Image of a stream processing template

.. _vsce-activate-connection:

Activate a Connection
---------------------

You can connect |vsce| to only one deployment at a time. To change the
active connection to a different deployment, or to connect to a
deployment from which you were disconnected:

.. include:: /includes/steps/activate-connection.rst

Launch MongoDB Shell
~~~~~~~~~~~~~~~~~~~~

You can connect the :mongosh:`MongoDB Shell </>` or legacy
:binary:`mongo <mongo>` shell to your active deployment.


Considerations
``````````````

- The shell that |vsce| uses to connect to your deployment is
determined by the :guilabel:`Shell` setting in your
:ref:`extension settings <vsce-settings>`. You can choose either
the :mongosh:`MongoDB Shell </>` or the legacy :binary:`mongo <mongo>` shell.

- The path to your selected shell must exist in your system's ``PATH``.
If it does not exist in your ``PATH``, the operation errors.

Procedure
`````````

To connect the shell to your active deployment:

a. In the |vsce| :guilabel:`Connections` list, right-click your active
deployment.

#. Select :guilabel:`Launch MongoDB Shell`.

|vsce| opens the :guilabel:`Terminal` window in VS Code and launches
the shell connected to your selected deployment.

.. seealso::

:mongosh:`Perform CRUD Operations in the MongoDB Shell </crud>`

.. _vsce-edit-connection-task:

Edit a Connection
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - Edit a Connection is a new task introduced in 1.5.

-----------------

.. procedure::
:style: normal

Check failure on line 225 in source/connect.txt

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.Accessibility] Don't use language (such as 'normal') that defines people by their disability. Raw Output: {"message": "[MongoDB.Accessibility] Don't use language (such as 'normal') that defines people by their disability.", "location": {"path": "source/connect.txt", "range": {"start": {"line": 225, "column": 12}}}, "severity": "ERROR"}


.. step:: In |vscode-short|, click the :guilabel:`MongoDB` icon in the :guilabel:`Activity Bar`

.. figure:: /images/vsce-mongodb-extension-sidemenu.png
:figwidth: 600px
:alt: Image VSCode side bar menu.

.. step:: Expand the :guilabel:`Connections` pane

Expand the :guilabel:`Connections` pane in the left
navigation if it's collapsed.

.. figure:: /images/vsce-expand-connections.png
:figwidth: 600px
:alt: Image showing connections pane

.. step:: Select a connection

From the :guilabel:`Connections` menu, right-click the
connection and select :guilabel:`Edit Connection...`

.. step:: Make changes and save

Click :icon-fa5:`chevron-right`
:guilabel:`Advanced Connection Options` to display
the advanced connection form.

.. tip::

You can also click the :guilabel:`Edit Connection String`
toggle in the top-right of the form to edit the connection
string URI directly.

Once you are done editing the connection options click
:guilabel:`Save & Connect`.

.. _vsce-copy-connection-string-task:

Copy a Connection
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - Copy a Connection was previously undocumented, added to this PR.

-----------------

You can copy a connection string from an existing |vscode-short|
connection.

.. procedure::
:style: normal

Check failure on line 272 in source/connect.txt

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.Accessibility] Don't use language (such as 'normal') that defines people by their disability. Raw Output: {"message": "[MongoDB.Accessibility] Don't use language (such as 'normal') that defines people by their disability.", "location": {"path": "source/connect.txt", "range": {"start": {"line": 272, "column": 12}}}, "severity": "ERROR"}

.. step:: In |vscode-short|, click the :guilabel:`MongoDB` icon in the :guilabel:`Activity Bar`

.. figure:: /images/vsce-mongodb-extension-sidemenu.png
:figwidth: 600px
:alt: Image VSCode side bar menu.

.. step:: Expand the :guilabel:`Connections` pane

Expand the :guilabel:`Connections` pane in the left
navigation if it's collapsed.

.. figure:: /images/vsce-expand-connections.png
:figwidth: 600px
:alt: Image showing connections pane

.. step:: Select a connection

From the :guilabel:`Connections` menu, right-click the
connection and select :guilabel:`Copy Connection String`.

The connection string is copied to your clipboard.

.. _vsce-rename-connection:

Rename a Connection
Expand All @@ -223,35 +309,37 @@

|vsce| provides two methods to disconnect from a deployment. You can:

- Disconnect with the Command Palette, or
- Disconnect with the Command Palette.
- Disconnect from the :guilabel:`MongoDB` view in the
:guilabel:`Activity Bar`.

.. tabs::

.. tab:: Disconnect with the Command Palette
:tabid: command-palette

.. include:: /includes/steps/disconnect-command-palette.rst

.. tab:: Disconnect from the MongoDB View
.. tab:: MongoDB View
:tabid: mdb-view

.. include:: /includes/steps/disconnect-mongodb-view.rst

.. tab:: Command Palette
:tabid: command-palette

.. include:: /includes/steps/disconnect-command-palette.rst

Disconnecting from a MongoDB instance closes the |vsce| connection to
the active instance. You must :ref:`reconnect <vsce-connect-task>` to
interact with data in your deployment again.

.. _vsce-remove-connection-task:

Remove a Connection
-------------------

|vsce| provides two methods to remove a connection to a deployment from
|vscode-short|. You can:

- Remove a connection with the Command Palette, or
- Remove a connection from the :guilabel:`MongoDB` view in the
:guilabel:`Activity Bar`.
- Remove a connection with the Command Palette.

.. important::

Expand All @@ -260,16 +348,16 @@

.. tabs::

.. tab:: Remove Connection with the Command Palette
:tabid: command-palette

.. include:: /includes/steps/remove-connection-command-palette.rst

.. tab:: Remove Connection from the MongoDB View
.. tab:: MongoDB View
:tabid: mdb-view

.. include:: /includes/steps/remove-connection-mdb-view.rst

.. tab:: Command Palette
:tabid: command-palette

.. include:: /includes/steps/remove-connection-command-palette.rst

.. seealso::

:ref:`playground-connect-to-deployment`
Binary file added source/images/vsce-expand-connections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/vsce-mongodb-connection-dots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/vsce-mongodb-connection-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/includes/steps-activate-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source:
file: steps-open-mongodb-view.yaml
ref: open-mongodb-view
---
title: "Right-click the connection you want to activate, then click :guilabel:`Connect`."
title: "Right-click the connection you want to activate, then click :guilabel:`Connect`"
level: 4
ref: activate-connection
...
4 changes: 2 additions & 2 deletions source/includes/steps-disconnect-command-palette.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ source:
ref: vsce-command-palette
ref: vsce-connect-command-palette
---
title: Disconnect.
title: Disconnect
level: 4
ref: vsce-disconnect
content: |

#. From the Command Palette, select
a. From the Command Palette, select
:guilabel:`MongoDB: Disconnect`.

.. include:: /includes/admonitions/tip-mongodb-command-palette.rst
Expand Down
8 changes: 7 additions & 1 deletion source/includes/steps-open-mongodb-view.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: "In |vscode-short|, click the :guilabel:`MongoDB` view in the :guilabel:`Activity Bar`."
title: "In |vscode-short|, click the :guilabel:`MongoDB` icon in the :guilabel:`Activity Bar`"
level: 4
ref: open-mongodb-view
content: |

.. figure:: /images/vsce-mongodb-extension-sidemenu.png
:figwidth: 600px
:alt: Image VSCode side bar menu.

...
4 changes: 2 additions & 2 deletions source/includes/steps-source-command-palette.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "In |vscode-short|, open the Command Palette."
title: "Open the Command Palette"
level: 4
ref: vsce-command-palette
content: |

.. include:: /includes/list-tables/command-palette-options.rst
---
title: "From the Command Palette, choose where you want to save the
connection."
connection"
level: 4
ref: vsce-connect-save
content: |
Expand Down
Loading
Loading