{"action":"created","issue":{"url":"https://api.github.com/repos/dadi/publish/issues/389","repository_url":"https://api.github.com/repos/dadi/publish","labels_url":"https://api.github.com/repos/dadi/publish/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/dadi/publish/issues/389/comments","events_url":"https://api.github.com/repos/dadi/publish/issues/389/events","html_url":"https://github.com/dadi/publish/issues/389","id":329886684,"node_id":"MDU6SXNzdWUzMjk4ODY2ODQ=","number":389,"title":"Make FieldString handle array of strings","user":{"login":"abovedave","id":649231,"node_id":"MDQ6VXNlcjY0OTIzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/649231?v=4","gravatar_id":"","url":"https://api.github.com/users/abovedave","html_url":"https://github.com/abovedave","followers_url":"https://api.github.com/users/abovedave/followers","following_url":"https://api.github.com/users/abovedave/following{/other_user}","gists_url":"https://api.github.com/users/abovedave/gists{/gist_id}","starred_url":"https://api.github.com/users/abovedave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abovedave/subscriptions","organizations_url":"https://api.github.com/users/abovedave/orgs","repos_url":"https://api.github.com/users/abovedave/repos","events_url":"https://api.github.com/users/abovedave/events{/privacy}","received_events_url":"https://api.github.com/users/abovedave/received_events","type":"User","site_admin":false},"labels":[{"id":652018734,"node_id":"MDU6TGFiZWw2NTIwMTg3MzQ=","url":"https://api.github.com/repos/dadi/publish/labels/status:%20blocked","name":"status: blocked","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-06T14:14:20Z","updated_at":"2018-08-17T14:32:07Z","closed_at":null,"author_association":"MEMBER","body":"A field which can have multiple rows of content added\r\n\r\n```\r\n[-] Row 1  \r\n[-] Row 2\r\n\r\n[+] Add new row\r\n```"},"comment":{"url":"https://api.github.com/repos/dadi/publish/issues/comments/413884869","html_url":"https://github.com/dadi/publish/issues/389#issuecomment-413884869","issue_url":"https://api.github.com/repos/dadi/publish/issues/389","id":413884869,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzg4NDg2OQ==","user":{"login":"eduardoboucas","id":4162329,"node_id":"MDQ6VXNlcjQxNjIzMjk=","avatar_url":"https://avatars3.githubusercontent.com/u/4162329?v=4","gravatar_id":"","url":"https://api.github.com/users/eduardoboucas","html_url":"https://github.com/eduardoboucas","followers_url":"https://api.github.com/users/eduardoboucas/followers","following_url":"https://api.github.com/users/eduardoboucas/following{/other_user}","gists_url":"https://api.github.com/users/eduardoboucas/gists{/gist_id}","starred_url":"https://api.github.com/users/eduardoboucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduardoboucas/subscriptions","organizations_url":"https://api.github.com/users/eduardoboucas/orgs","repos_url":"https://api.github.com/users/eduardoboucas/repos","events_url":"https://api.github.com/users/eduardoboucas/events{/privacy}","received_events_url":"https://api.github.com/users/eduardoboucas/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T14:32:07Z","updated_at":"2018-08-17T14:32:07Z","author_association":"MEMBER","body":"In API, a field of type `String` also accepts an array of strings as a value. Publish can take advantage of this to render a multi-row field as described in the original comment, allowing people to add and remove rows and to change their order, which simply manipulating the array of strings.\r\n\r\nIn terms of deciding when to render this view over the normal text field, it's easy for existing documents, as we can look at the value and render the multi-row field if the value is an array, and the normal text field if the value is a string.\r\n\r\nBut what do we do when we're starting a new document? I see a couple of options:\r\n\r\n1) We have a property in the `publish` block that says this field should be rendered as multi-row. We already have similar properties in the `publish` block that could generate confusion, like `multiline`. How do we manage these? And what happens if a field is marked for multi-row view but actually contains a string value (instead of array of strings)?\r\n\r\n2) We only support this mode when `multiline` is disabled, which means the field will render a text input and not a textarea. When the user presses _Enter_, we go into multi-row mode and start adding values to the array.\r\n\r\n3) The text field has some UI element to toggle between normal mode and multi-row mode.\r\n\r\nAny thoughts?"}}
{"actor":{"display_login":"eduardoboucas"}}