create-adapter icon indicating copy to clipboard operation
create-adapter copied to clipboard

add size attributes to template jsonConfig.json

Open mcm1957 opened this issue 1 year ago • 2 comments

Please consider to add xs/sm/md/lg/xl size attributes to template jsonConfig

mcm1957 avatar Oct 04 '24 16:10 mcm1957

An example would be helpful.

AlCalzone avatar Oct 07 '24 07:10 AlCalzone

for example see backitup adapter https://github.com/simatec/ioBroker.backitup/blob/14599fac81c7437d140a832e0708ea7fb66955ae/admin/ccu.jsonConfig.json5#L29

    "backupNow": {
      "type": "custom",
      "button": true,
      "variant": "contained",
      "url": "custom/customComponents.js",
      "name": "ConfigCustomBackItUpSet/Components/BackupNow",
      "backUpType": "ccu",
      "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iY3VycmVudENvbG9yIj4NCiAgICA8cGF0aCBkPSJNMTkuMzUgMTAuMDRDMTguNjcgNi41OSAxNS42NCA0IDEyIDQgOS4xMSA0IDYuNiA1LjY0IDUuMzUgOC4wNCAyLjM0IDguMzYgMCAxMC45MSAwIDE0YzAgMy4zMSAyLjY5IDYgNiA2aDEzYzIuNzYgMCA1LTIuMjQgNS01IDAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2ek0xNCAxM3Y0aC00di00SDdsNS01IDUgNWgtM3oiLz4NCjwvc3ZnPg0K",
      "label": "Backup now",
      "newLine": true,
      "xs": 12,
      "sm": 9,
      "md": 6,
      "lg": 3
    },

Doku https://github.com/ioBroker/ioBroker.admin/blob/master/packages/jsonConfig/SCHEMA.md#common-attributes-of-controls

Example should include all five attributes (xs, sm, md, lg, xl)

mcm1957 avatar Oct 08 '24 19:10 mcm1957

The most current best practices are:

                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4

Apollon77 avatar Aug 31 '25 20:08 Apollon77