IgniteEngine-iOS icon indicating copy to clipboard operation
IgniteEngine-iOS copied to clipboard

Custom controls should have an alternate schema instead of 'view'

Open brandonscript opened this issue 10 years ago • 2 comments

Instead of this which is confusing and hard to tell whether something is a custom control or not:

{
    "$view": {
        "actions": [],
        "attributes": {
            "_id": "popup_alert"
        },
        "controls": []
    }
}

We should enable this (or at least support it)

{
    "$custom": {
        "actions": [],
        "attributes": {
            "_id": "popup_alert"
        },
        "controls": []
    }
}

brandonscript avatar Mar 27 '15 18:03 brandonscript

This may be superseded by https://github.com/ApigeeDelta/ignite-iOS-engine/issues/77

brandonscript avatar Mar 27 '15 18:03 brandonscript

Implemented in https://github.com/ApigeeDelta/ignite-iOS-engine/commit/b16f9be.

The following schema is now supported in Custom controls:

{
  "$custom": {
    "attributes": {
      "_id": "demoCustom"
    },
    "actions": [],
    "controls": [
      {
        "_id": "layoutMain",
        "_type": "Layout",
        "attributes": {
          "size.w": "100%",
          "size.h": "100%",
          "bg.color": "000fff"
        }
      }
    ]
  }
}

jeremyanticouni avatar Apr 30 '15 19:04 jeremyanticouni