{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/fixmystreet/issues/2212","repository_url":"https://api.github.com/repos/mysociety/fixmystreet","labels_url":"https://api.github.com/repos/mysociety/fixmystreet/issues/2212/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/fixmystreet/issues/2212/comments","events_url":"https://api.github.com/repos/mysociety/fixmystreet/issues/2212/events","html_url":"https://github.com/mysociety/fixmystreet/pull/2212","id":351621814,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MTY5Mzgz","number":2212,"title":"Make it easier to prevent a form_detail_placeholder being printed","user":{"login":"zarino","id":739624,"node_id":"MDQ6VXNlcjczOTYyNA==","avatar_url":"https://avatars1.githubusercontent.com/u/739624?v=4","gravatar_id":"","url":"https://api.github.com/users/zarino","html_url":"https://github.com/zarino","followers_url":"https://api.github.com/users/zarino/followers","following_url":"https://api.github.com/users/zarino/following{/other_user}","gists_url":"https://api.github.com/users/zarino/gists{/gist_id}","starred_url":"https://api.github.com/users/zarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zarino/subscriptions","organizations_url":"https://api.github.com/users/zarino/orgs","repos_url":"https://api.github.com/users/zarino/repos","events_url":"https://api.github.com/users/zarino/events{/privacy}","received_events_url":"https://api.github.com/users/zarino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-17T14:41:57Z","updated_at":"2018-08-17T16:27:28Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mysociety/fixmystreet/pulls/2212","html_url":"https://github.com/mysociety/fixmystreet/pull/2212","diff_url":"https://github.com/mysociety/fixmystreet/pull/2212.diff","patch_url":"https://github.com/mysociety/fixmystreet/pull/2212.patch"},"body":"Previously, if you didn’t want a hint to appear under the main \"details\" textarea on the new report form, you had to override the entire `form_report.html` template, or leave the hint element in the markup but hide it with CSS.\r\n\r\nNow, you can set `form_detail_placeholder` to a falsey value, and the template won’t output the hint element at all. It also amends the `aria-describedby` attribute on the textarea so it doesn’t end up referencing a hint element that doesn’t exist.\r\n\r\nI needed this for https://github.com/mysociety/collideoscope/pull/28, because the existing `[% DEFAULT form_detail_placeholder = … %]` block gave me no easy way to prevent the hint being shown.\r\n\r\n# How it looks:\r\n\r\nWhen no custom `form_detail_placeholder` is defined in the cobrand, eg:\r\n\r\n```\r\n# /templates/web/<cobrand>/report/new/_form_labels.html\r\n[% form_detail_label = loc('Can you describe what happened?') %]\r\n```\r\n\r\n![undefined](https://user-images.githubusercontent.com/739624/44271853-2609ac00-a233-11e8-92ca-7b932f4219e8.png)\r\n\r\nWhen a custom `form_detail_placeholder` is defined in the cobrand, eg:\r\n\r\n```\r\n# /templates/web/<cobrand>/report/new/_form_labels.html\r\n[% form_detail_placeholder = \"Helpful cobrand-specific hint here\" %]\r\n[% form_detail_label = loc('Can you describe what happened?') %]\r\n```\r\n\r\n![truthy](https://user-images.githubusercontent.com/739624/44271958-66692a00-a233-11e8-91db-41f506492375.png)\r\n\r\n**NEW:** When `form_detail_placeholder` is set to a falsey value, eg:\r\n\r\n```\r\n# /templates/web/<cobrand>/report/new/_form_labels.html\r\n[% form_detail_placeholder = 0 %]\r\n[% form_detail_label = loc('Can you describe what happened?') %]\r\n```\r\n\r\n![falsey](https://user-images.githubusercontent.com/739624/44272011-87ca1600-a233-11e8-8099-c1c836a0b023.png)\r\n"},"comment":{"url":"https://api.github.com/repos/mysociety/fixmystreet/issues/comments/413919108","html_url":"https://github.com/mysociety/fixmystreet/pull/2212#issuecomment-413919108","issue_url":"https://api.github.com/repos/mysociety/fixmystreet/issues/2212","id":413919108,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzkxOTEwOA==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-08-17T16:27:28Z","updated_at":"2018-08-17T16:27:28Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=h1) Report\n> Merging [#2212](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=desc) into [master](https://codecov.io/gh/mysociety/fixmystreet/commit/e1616a3543d2b49e6c74d9ac043b36e2e3b0c1fc?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/mysociety/fixmystreet/pull/2212/graphs/tree.svg?width=650&height=150&src=pr&token=qzUD8eL6xO)](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=tree)\n\n```diff\n@@           Coverage Diff           @@\n##           master    #2212   +/-   ##\n=======================================\n  Coverage   79.46%   79.46%           \n=======================================\n  Files         182      182           \n  Lines       11830    11830           \n  Branches     2206     2206           \n=======================================\n  Hits         9401     9401           \n  Misses       1665     1665           \n  Partials      764      764\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=footer). Last update [e1616a3...b2c1776](https://codecov.io/gh/mysociety/fixmystreet/pull/2212?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}