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

A collection with . in the name disappears from the suggestions list

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.1
    • Affects Version/s: None
    • Component/s: Autocomplete
    • None
    • Environment:
      OS: macOS 13.3.1 (22E261)
      VSCode: 1.78.0-insider
    • 3
    • Iteration Zebrafish
    • Not Needed

      Problem Statement/Rationale

      The collection with `.` in the name disappears from the suggestions list when other collections are being properly suggested. See the https://github.com/mongodb-js/vscode/issues/513 GitHub issue.

      Steps to Reproduce

      • Connect to a cluster
      • Create a collection with `.` in the namespace, eg. `animals.humans`
      • Disconnect/Connect to the same cluster to refresh suggestions
      • Use the following playground code (with a comment line):
      use('mongodbVSCodePlaygroundDB');
      
      // Insert a few documents into the sales collection.
      db.
      

      The collections with `.` are suggested. If you look at the mongodb language server output log you can see the following format of the suggestion item:

      {
            label: 'animals.humans',
            kind: 19,
            filterText: 'db..animals.humans',
            textEdit: [Object]
      }
      
      • Use another playground code (without a comment line):
      use('mongodbVSCodePlaygroundDB');
      
      db.
      

      The collections with `.` disappear from the suggestions list.

      Expected Results

      The `animals.humans` is presented in the suggestions list.

      Actual Results

      Other collections except of the `animals.humans` are being suggested.

      Additional Notes

      Noticed that sometimes `db.animals.humans` is being converted to `db.['animals.humans']` instead of `db['animals.humans']` (extra .). It might be something with `filterText` for the completion item that is not being properly parsed.

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

              Created:
              Updated:
              Resolved: