Add add collection button in the diagram toolbar

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Data Modeling
    • 3
    • Iteration I (Aug 11 - Aug 25)
    • None
    • Developer Tools

      Add a collection via a button in the toolbar. Let's open the drawer when it's added and auto-focus the collection name. It's in an incomplete state when it's initially added with a placeholder name. Once it's named or the user unfocuses it we commit the `AddCollection`.

      We can use `addNodesWithinBounds` to get the position to place it.

      z.object(

      {    type: z.literal('AddCollection'),    ns: z.string(),    position: z.tuple([z.number(), z.number()]).optional(),    initialSchema: z.custom<MongoDBJSONSchema>  }

      )

       

      https://github.com/mongodb-js/compass/blob/main/packages/compass-data-modeling/src/components/diagram-editor-toolbar.tsx 

      Figma (at the time of writing there aren't designs for this yet):
      https://www.figma.com/design/reNpAkCcrtlHEgBoNDiY6P/Ben-s-playground?node-id=1282-31551 

       

       

              Assignee:
              Paula Stachova
              Reporter:
              Rhys Howell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: