Skip to content

Need to fix component supportedLayout #12

@taylortom

Description

@taylortom

In legacy code, supportedLayout is defined in the properties.schema, and determines which layouts are supported by a component, and is an array of strings:

"_supportedLayout": {
  "type": "string",
  "required": true,
  "enum": ["full-width", "half-width", "both"],
  "default": "both",
  "editorOnly": true
},

First thing: this value is set by the developer and never changed, so doesn't really make sense to be in the schema (maybe the bower.json or package.json?).

Second thing: as far as I can tell, this is only used in editorPageComponent view, and converted from the above array into an object with the format { full: true, half: true }. It seems more sensible to define it this way in the first place, as there's no need for the array format AFAIK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error has occurrediceboxIssue parked for nowstale

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions