gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Update default schemas #63

Open Jotschi opened 7 years ago

Jotschi commented 7 years ago

Video

Name: Video Description: Fields: binary (video/*), title, description, copyright

Audio

Name: Audio Description: Fields: binary (audio/*), title, description, copyright

Image

Name: Image Description: Image Content Fields: binary (image/*), title, description, alt, copyright

Document (PDF, Word)

Name: Document Description: Documentation files Field: binary (application/pdf, application/msword ... excel..), title, description, copyright

aschauerhuber commented 7 years ago

let's keep it simple for now. I've just added title, description, copyright and alt for images.

Jotschi commented 7 years ago

@aschauerhuber I think the description field is not needed. I rarely see users use such field. The name/title field is not really needed for binary fields since the binary field filename property is used for those elements.

Audio

{
  "name": "audio",
  "description": "Schema for audio content",
  "displayField": "binary",
  "segmentField": "binary",
  "container": false,
  "fields": [
    {
      "name": "copyright",
      "label": "copyright",
      "required": false,
      "type": "string"
    },
    {
      "name": "binary",
      "label": "Binary Data",
      "required": false,
      "type": "binary",
      "allow": [ "audio/*" ]
    }
  ]
}

Video

{
  "name": "video",
  "description": "Schema for video content",
  "displayField": "binary",
  "segmentField": "binary",
  "container": false,
  "fields": [
    {
      "name": "copyright",
      "label": "copyright",
      "required": false,
      "type": "string"
    },
    {
      "name": "binary",
      "label": "Video Data",
      "required": false,
      "type": "binary",
      "allow": [ "video/*" ]
    }
  ]
}

Image

{
  "name": "image",
  "description": "Schema for images",
  "displayField": "binary",
  "segmentField": "binary",
  "container": false,
  "fields": [
    {
      "name": "alt",
      "label": "Alt text",
      "required": false,
      "type": "string"
    },
    {
      "name": "copyright",
      "label": "copyright",
      "required": false,
      "type": "string"
    },
    {
      "name": "binary",
      "label": "Image Data",
      "required": false,
      "type": "binary",
      "allow": [ "image/*" ]
    }
  ]
}

Document

{
  "name": "document",
  "description": "Schema for documents like PDFs, Spreadsheets, Presentations, Text",
  "displayField": "binary",
  "segmentField": "binary",
  "container": false,
  "fields": [
    {
      "name": "copyright",
      "label": "copyright",
      "required": false,
      "type": "string"
    },
    {
      "name": "binary",
      "label": "Document Data",
      "required": false,
      "type": "binary",
      "allow": [ " application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/pdf", "text/plain" ]
    }
  ]
}
aschauerhuber commented 7 years ago

I disagree: name - can be used as a readable link description - can be used again within the app to shortly describe the asset

since users are able to customize these example schemas i would go for name, alt and binary fields to be required others to be optional