Cotton code
199 lines · 3.7 KB · JSONRaw
{  "format_version": 1,  "id": "app_report",  "name": "Report",  "plural": "Reports",  "picture": null,  "builtin": false,  "engine": null,  "visibility": "staff",  "columns": [    {      "key": "sentence",      "name": "Report",      "type": "longtext",      "required": true    },    {      "key": "status",      "name": "Status",      "type": "choice",      "choices": [        "new",        "replied",        "fixed",        "closed"      ],      "format": "words",      "default": "new",      "labels": {        "new": "New",        "replied": "Replied",        "fixed": "Fixed",        "closed": "Closed"      }    },    {      "key": "app",      "name": "App",      "type": "text"    },    {      "key": "build",      "name": "Build",      "type": "text"    },    {      "key": "platform",      "name": "Platform",      "type": "choice",      "choices": [        "ios",        "android",        "macos"      ],      "format": "words",      "labels": {        "ios": "iPhone",        "android": "Android",        "macos": "Mac"      }    },    {      "key": "device",      "name": "Device",      "type": "text"    },    {      "key": "os",      "name": "OS",      "type": "text"    },    {      "key": "route",      "name": "Screen",      "type": "text"    },    {      "key": "screenshot",      "name": "Screenshot",      "type": "photo"    },    {      "key": "log",      "name": "Log",      "type": "file"    },    {      "key": "sender",      "name": "From",      "type": "choice",      "choices": [        "signed_in",        "anonymous"      ],      "format": "words",      "labels": {        "signed_in": "Signed in",        "anonymous": "Anonymous"      }    },    {      "key": "sender_number",      "name": "Number",      "type": "text"    },    {      "key": "sender_name",      "name": "Name",      "type": "text"    },    {      "key": "made_at",      "name": "Sent",      "type": "date"    },    {      "key": "chat_thread",      "name": "Chat",      "type": "text"    }  ],  "title": "sentence",  "date": "made_at",  "project": null,  "order": null,  "slip": {    "title": "sentence",    "photo": "screenshot",    "toggle": null,    "subtitle": [      "app",      "sender_name"    ],    "trailing": "status"  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "sentence",        "status",        "screenshot",        "made_at"      ]    },    {      "heading": "From",      "columns": [        "sender",        "sender_name",        "sender_number",        "chat_thread"      ]    },    {      "heading": "Where",      "columns": [        "app",        "build",        "platform",        "device",        "os",        "route",        "log"      ]    }  ],  "sort": {    "column": "made_at",    "descending": true,    "tie": "sentence"  },  "empty": {    "title": "No reports",    "message": "What people shake their phone to tell Cotton."  },  "card": {    "face": "plain",    "fields": [      {        "slot": "title",        "column": "sentence"      },      {        "slot": "facts",        "column": "app",        "also": [          "platform",          "sender_name",          "status"        ]      }    ]  },  "instructions": "One row per report a person sent from an app's Report a problem screen: their sentence, the screenshot and log of the screen they were on, the build and phone, and who sent it (a signed-in number and name, or anonymous). The Worker writes it (POST /v1/feedback); nobody adds one by hand. Status moves new → replied → fixed or closed. chat_thread stays empty until a Cotton chat thread with the sender is opened for it."}