Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6432

When inserting item to an array, automatically type based on last item

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.36.0
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • 3
    • Not Needed
    • Iteration Seahorse, Iteration Turtle, Iteration Unicornfish

      Originally created from user feedback:
      https://mongodb.slack.com/archives/C039T3GDDPC/p1673277712431899 

      I do have some feedback for MongoDB Compass. Hoping this could be implemented. It is a small detail, but important for UX. I have included my feedback below.

      -------

      Here is the example use case:

      I am editing a document within the object editor UI.
      I have an array which contains Int32 values.
      I click the button to add an element to the array.

      A new object is created with the type String

      Preferred use case:

      I am editing a document within the object editor UI.
      I have an array which contains Int32 values.
      I click the button to add an element to the array.

      A new object is created with the type Int32

      Summary

      When clicking the to add a new array element, the newly created element should inherit the type of its previous sibling. It should not always default to String. Well it can, and it works... however if I have an array of 7 Int32s, and I'm clicking the .. I am very highly likely wanting to add another Int32. Definitely not a String. I hope that makes sense

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: