{"push_id":991915771,"size":7,"distinct_size":2,"ref":"refs/heads/govspeak-attachments","head":"0a4f6aa2aba547bf2be4854ac8d6200260729626","before":"f5448870224c87bec2cc7cacc16078fbc28298f7","commits":[{"sha":"861daec140c64722ad0364e3188ab0071be26511","author":{"email":"12ca95a439b13b609744183b9d2f79ca5b64ed8f@users.noreply.github.com","name":"Paul Hayes"},"message":"Create a more accessible toggle module\n\n* Use the `hidden` class provided by govuk_template to hide and show\ncontent\n* Allow multiple targets and toggles\n* Use `aria-expanded` and `aria-controls` attributes to determine\nstarting state and to indicate which toggle controls what\n* Toggle elements must have both `aria-expanded` and `aria-controls` to\nwork","distinct":false,"url":"https://api.github.com/repos/alphagov/static/commits/861daec140c64722ad0364e3188ab0071be26511"},{"sha":"6237ab0a22e32792384226c1348b7fc3d54c9331","author":{"email":"a60a20ed872330fa60413bd5d4ca7fac0d528ee0@digital.cabinet-office.gov.uk","name":"David Singleton"},"message":"Don't require class selector for JS toggle module\n\nWe can detect the control/toggle element from the module data-*\nattributes, and don't need to rely on a specific class as well.\n\nThis feels more in keeping with the data-module approach we're taking\nwhere the 'interface' to the module is encoded in data-attributes\nand their values, and doesn't rely on anything else in the element\npassed into the module, eg classes.\n\nThis allows the class of the element to be specific to use case in\nthe app invoking the module.\n\nI've removed the class part of the selector, and updated the tests\nso the examples use an example selector that is less likely to be\nconfused for module configuration.","distinct":false,"url":"https://api.github.com/repos/alphagov/static/commits/6237ab0a22e32792384226c1348b7fc3d54c9331"},{"sha":"b034efd54010aee3911be836bd120774aba34ed7","author":{"email":"a60a20ed872330fa60413bd5d4ca7fac0d528ee0@digital.cabinet-office.gov.uk","name":"David Singleton"},"message":"Use `js-hidden` in tests, to match app usage\n\nA conditional hook to hide content if JS is enabled is being added\nto `govuk_template`, and is a pattern we use a lot in other apps.\n\nDoing this, rather than hiding the content with the module JS\nprevents a flash of visible content between the content loading and\nthe JS executing.","distinct":false,"url":"https://api.github.com/repos/alphagov/static/commits/b034efd54010aee3911be836bd120774aba34ed7"},{"sha":"942118322958115b0c3e7dbfe3d564a33f8531bf","author":{"email":"a60a20ed872330fa60413bd5d4ca7fac0d528ee0@digital.cabinet-office.gov.uk","name":"David Singleton"},"message":"Bump govuk_template to latest version\n\nTo get the  hook that the toggle module uses\n\nVersion diff: https://github.com/alphagov/govuk_template/compare/v0.16.1...v0.17.0\n\nRelevant changelog:\n\n0.17.0\n\n- Add CSS hook (`.js-hidden`) for hiding content when JS is enabled. Some apps\n  have an equivalent hook, which can be removed once upgraded to this version\n\n0.16.4\n\n- Fix publish the Jinja version of the template with a `package.json` for those\n  consuming it with NPM\n\n0.16.3\n\n- make the Django version of the template into a proper Python package\n- publish the Jinja version of the template with a `package.json` for those\n  consuming it with NPM\n\n0.16.2\n\n- more static assets added to `assets.precompile` to improve\n  compatibility with apps running rails > 4.2.5","distinct":false,"url":"https://api.github.com/repos/alphagov/static/commits/942118322958115b0c3e7dbfe3d564a33f8531bf"},{"sha":"7ee7e18727108affc9f332dcdd8544e0153c3516","author":{"email":"daa5c1e9ec6da0d016c84052d1057fa3360b9f80@gmail.com","name":"Ben Lovell"},"message":"Merge pull request #740 from alphagov/toggle-module\n\nAdd a JS toggle module","distinct":false,"url":"https://api.github.com/repos/alphagov/static/commits/7ee7e18727108affc9f332dcdd8544e0153c3516"},{"sha":"476c0365c0fc2c4816f2eae88abe581f52f2009c","author":{"email":"a60a20ed872330fa60413bd5d4ca7fac0d528ee0@digital.cabinet-office.gov.uk","name":"David Singleton"},"message":"Add WH attachment styling to Govspeak component\n\nAs part of migration we are moving formats from WH to `content-store`\nand `government-frontend`. Some of the formats in WH have `body`\ncontent that includes embedded attachments, eg, markup describing\nan attachment in the rendered HTML of a document from content-store.\n\nTo render this in a new-world frontend app, like government-frontend\nthe `govspeak` component, that renders a documents `body` content,\nneeds to be able to add styling and behaviour for the attachment\nmarkup in the `body`.\n\nThis PR adds examples of attachments within govspeak, and ports the\nCSS/JS that renders them/adds toggling behaviour, to the govspeak\ncomponent on static.\n\n- Includes changes to work with accessible JS toggle module [1]\n- Fixup the attachment SCSS to pass the new linting rules, mostly\n  whitespace and not-referencing-colours-by-variable-name.\n- Switch the non-standard 1/6 margin (only used in WH, not FET)\n  to something specific to it's use here, avoid introducing the\n  additional margin size to static.\n\n[1] https://github.com/alphagov/whitehall/pull/2476\n\nNote, the CSS to styling attachment govspeak is still duplicated in\nWH and at some point will need to be reconsiled with the component\nversion, but that needs to be done for all govspeak styling, not\njust attachments. But for now we're adding the ability for the\ncomponent version to render attachments at all, to unblock the\nmigration of formats.\n\nAlso note, the static images used to represent attachments without\ntheir own cover image, eg doc, csv, html pub, have full URLs which\npoint at the WH-frontend app's assets. This is the approach we're\ntaking short term, long term the image assets should belong to\nsomething within the FE stack (most likely static). The approach of\nstoring fully rendered attachment HTML in the content store is a\ninterim approach to support migration, and will be replaced with\na system where the data for an attachment is passed to a frontend,\nwith the body content containing a placeholder, and something in\nthe FE stack owning the template to render the attachment, and\ninserting the output into the body for rendering. Keeping the\nresponsibility/ownership of attachment template and images within\nthe FE stack, not partially owned by Whitehall.","distinct":true,"url":"https://api.github.com/repos/alphagov/static/commits/476c0365c0fc2c4816f2eae88abe581f52f2009c"},{"sha":"0a4f6aa2aba547bf2be4854ac8d6200260729626","author":{"email":"a60a20ed872330fa60413bd5d4ca7fac0d528ee0@digital.cabinet-office.gov.uk","name":"David Singleton"},"message":"Refactor govspeak attachment SASS\n\nRetructure to reduce duplication, remove some selectors not used in\nthe WH version.","distinct":true,"url":"https://api.github.com/repos/alphagov/static/commits/0a4f6aa2aba547bf2be4854ac8d6200260729626"}]}