hoobs-org / hoobsd

Server component for the certified HOOBS smart home stack.
GNU General Public License v3.0
8 stars 4 forks source link

Form Schema JSON Capabilities - Expandable Array Sections #93

Open mkormendy opened 3 years ago

mkormendy commented 3 years ago

As a user, I am noticing a number of features that are not in parity with the native Homebridge implementation of the config.schema.json for the form based configuration user interface.

This issue deals with missing altogether collapsibility of user-definable array sections (where they can add as many sections as limited or not). In certain cases, the "expandable": true feature works, however it seems to break when it comes to dealing with user-add-remove sections as defined by this code:

"panels": {
  "title": "Panels",
  "description": "These are the individual Konnected Alarm Panel module boards.",
  "type": "array",
  "orderable": true,
  "expandable": true,
  "expanded": true,
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "title": "Panel Name",
        "type": "string"
      },
      "uuid": {
        "title": "UUID",
        "type": "string",
        "readonly": true
      },
      "ipAddress": {
        "title": "IP Address (required but changeable)",
        "type": "string",
        "format": "ipv4"
      },
      "port": {
        "title": "Port (required but changeable)",
        "type": "number",
        "step": 1,
        "minimum": 1000,
        "maximum": 65535
      },
      "blink": {
        "title": "Blink panel LED when zones change/report their state.",
        "type": "boolean",
        "default": true
      }
    }
  }
}

In Homebridge, this section of items is collapsible, by default or by user interaction. The benefits of being able to collapse this section or nested sections like this are to reduce cognitive debt when managing 3-4 items or more. Makes it less confusing to the user and helps with managing multiple devices, etc.