{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/460","repository_url":"https://api.github.com/repos/alphagov/govuk-frontend","labels_url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/460/comments","events_url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/460/events","html_url":"https://github.com/alphagov/govuk-frontend/issues/460","id":291255372,"number":460,"title":"Macros Component API should not require internal classes for modifiers","user":{"login":"nickcolley","id":2445413,"avatar_url":"https://avatars2.githubusercontent.com/u/2445413?v=4","gravatar_id":"","url":"https://api.github.com/users/nickcolley","html_url":"https://github.com/nickcolley","followers_url":"https://api.github.com/users/nickcolley/followers","following_url":"https://api.github.com/users/nickcolley/following{/other_user}","gists_url":"https://api.github.com/users/nickcolley/gists{/gist_id}","starred_url":"https://api.github.com/users/nickcolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickcolley/subscriptions","organizations_url":"https://api.github.com/users/nickcolley/orgs","repos_url":"https://api.github.com/users/nickcolley/repos","events_url":"https://api.github.com/users/nickcolley/events{/privacy}","received_events_url":"https://api.github.com/users/nickcolley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-01-24T15:42:51Z","updated_at":"2018-02-01T14:02:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"In our button examples, we pass the internal button modifier class to make a button into a start button.\r\n\r\nWe could consider passing a boolean instead so that if we choose to change how our classes work, macros still function.\r\n\r\nFor example instead of\r\n\r\n```yaml\r\n- name: start\r\n  data:\r\n    text: Start now button\r\n    classes: 'govuk-c-button--start'\r\n```\r\n\r\nWe could do:\r\n\r\n```yaml\r\n- name: start\r\n  data:\r\n    text: Start now button\r\n    start: true\r\n```"},"comment":{"url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/comments/362274483","html_url":"https://github.com/alphagov/govuk-frontend/issues/460#issuecomment-362274483","issue_url":"https://api.github.com/repos/alphagov/govuk-frontend/issues/460","id":362274483,"user":{"login":"36degrees","id":121939,"avatar_url":"https://avatars1.githubusercontent.com/u/121939?v=4","gravatar_id":"","url":"https://api.github.com/users/36degrees","html_url":"https://github.com/36degrees","followers_url":"https://api.github.com/users/36degrees/followers","following_url":"https://api.github.com/users/36degrees/following{/other_user}","gists_url":"https://api.github.com/users/36degrees/gists{/gist_id}","starred_url":"https://api.github.com/users/36degrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/36degrees/subscriptions","organizations_url":"https://api.github.com/users/36degrees/orgs","repos_url":"https://api.github.com/users/36degrees/repos","events_url":"https://api.github.com/users/36degrees/events{/privacy}","received_events_url":"https://api.github.com/users/36degrees/received_events","type":"User","site_admin":false},"created_at":"2018-02-01T14:02:31Z","updated_at":"2018-02-01T14:02:31Z","author_association":"CONTRIBUTOR","body":"A good example of where the convention 'breaks' is [the way the list component used to work](https://github.com/alphagov/govuk-frontend/blob/4559379446391bfcfb8ef620ff987c0b183ba63d/src/components/list/template.njk#L1-L13) - there are multiple boolean possibilities but only one of them is possible at a time and the order of precedence is undefined.\r\n\r\nI think we discussed moving to a 'modifier' approach but it's not always clear how that would work if you wanted to legitimately 'combine' modifiers - e.g. perhaps a label that is both `--bold` and `--large` and so we went with the simplest option which was to use the classes functionality we needed to provide anyway."}}
{"actor":{"display_login":"36degrees"}}