opencaesar / oml-vision

A VS Code extension providing UI viewpoints for OML models
Other
4 stars 2 forks source link

Fix/36-multiple-children-objects #37

Closed pogi7 closed 5 months ago

pogi7 commented 5 months ago

Checklist before submitting a merge request

Description of contribution

Fix bug with generated a view with 2 sets of layout objects that contain the 'children' attribute

closes https://github.com/opencaesar/oml-vision/issues/36

Testing performed

How to Test Expected functionality changes

OML Model:

  1. You can use this OML model for testing https://github.com/pogi7/kepler16b-example
  2. Update the src/vision/pages.json file to look like this. PLEASE DON'T COMMIT/PUSH THIS CHANGE.:
    [
    { "title": "Home", "path": "/", "type": "home" },
    {
    "title": "Kepler16b",
    "type": "group",
    "iconUrl": "https://nasa-jpl.github.io/stellar/icons/satellite.svg",
    "children": [
      { 
        "title": "Objectives",
        "type": "table",
        "path": "objectives"
      },
      {
        "title": "Missions",
        "type": "tree",
        "path": "missions"
      },
      {
        "title": "Components",
        "type": "diagram",
        "path": "components"
      }
    ]
    },
    {
    "title": "Test",
    "type": "group",
    "iconUrl": "https://nasa-jpl.github.io/stellar/icons/satellite.svg",
    "children": [
      {
        "title": "Requirements",
        "type": "tree",
        "path": "requirements"
      },
      {
        "title": "Connections",
        "type": "table",
        "path": "connections"
      }
    ]
    }
    ]
  3. Click the OML Vision eye icon
  4. Verify that all views can open when clicking them in the Home page or in sidebar

Additional context