kopecmaciej / vi-mongo

MongoDB TUI manager designed to simplify data visualization and quick manipulation
https://vi-mongo.com
Apache License 2.0
24 stars 0 forks source link

Vi-Mongo ? help character must be remapped before typing the Connection URI #24

Closed benjamindburke closed 2 days ago

benjamindburke commented 2 days ago

Relevant MongoDB spec: https://www.mongodb.com/docs/manual/reference/connection-string/#standard-connection-string-format

Description

In #23 I discovered that Vi-Mongo does not support sharded cluster connections. The sample connection URI provided in that issue contains an ?options URI component compliant with the MongoDB Standard Connection String Format spec. I've copied the sample URI below:

mongodb://USER:PASSWORD@shard-0.mongodb.net:27017,shard-1.mongodb.net:27017,shard-2.mongodb.net:27017/admin?ssl=true&retryWrites=false&loadBalanced=false&replicaSet=replica-set-key-shard-0&readPreference=primary&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1

Observed Behavior

When copy-pasting this URI or typing manually into the New Connection URL field, I cannot type the ? character and the Full Screen Help page is opened.

Expected Behavior

When I type a ? character into the New Connection URL field or copy-paste a MongoDB URI containing a ? into the URL field, a ? should be entered into the URL field.

benjamindburke commented 2 days ago

I've also found that changing the runes JSON key to keys still persists the ? as a keybind, so the following is my configuration for allowing ? characters in the URL field:

{
  "global": {
    "toggleFullScreenHelp": {
      "keys": ["Ctrl+Z"],
      "runes": [""],
      "description": "Toggle full screen help"
    }
  }
}
kopecmaciej commented 2 days ago

Thanks for finding another bug, I've moved second issue to another one, as it's a little bigger than I expected