{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/Timber/issues/338","labels_url":"https://api.github.com/repos/Shopify/Timber/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/Timber/issues/338/comments","events_url":"https://api.github.com/repos/Shopify/Timber/issues/338/events","html_url":"https://github.com/Shopify/Timber/pull/338","id":58257478,"number":338,"title":"Mobile menu and new ajax cart drawer","user":{"login":"cshold","id":1730309,"avatar_url":"https://avatars.githubusercontent.com/u/1730309?v=3","gravatar_id":"","url":"https://api.github.com/users/cshold","html_url":"https://github.com/cshold","followers_url":"https://api.github.com/users/cshold/followers","following_url":"https://api.github.com/users/cshold/following{/other_user}","gists_url":"https://api.github.com/users/cshold/gists{/gist_id}","starred_url":"https://api.github.com/users/cshold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cshold/subscriptions","organizations_url":"https://api.github.com/users/cshold/orgs","repos_url":"https://api.github.com/users/cshold/repos","events_url":"https://api.github.com/users/cshold/events{/privacy}","received_events_url":"https://api.github.com/users/cshold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-19T19:37:18Z","updated_at":"2015-02-25T18:31:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Shopify/Timber/pulls/338","html_url":"https://github.com/Shopify/Timber/pull/338","diff_url":"https://github.com/Shopify/Timber/pull/338.diff","patch_url":"https://github.com/Shopify/Timber/pull/338.patch"},"body":"Demo - https://carson-dev-shop.myshopify.com/\r\n\r\n### Issues addressed\r\nAdding a mobile menu fixes https://github.com/Shopify/Timber/issues/292\r\nAjax cart callback fixes https://github.com/Shopify/Timber/issues/244\r\n\r\n### Code details\r\n##### Drawers\r\n- Minimized replaceUrlParam function, added [prepareTransition](https://github.com/snookca/prepareTransition)\r\n- `timber.drawersInit` sets up multiple drawers (in this case menu and cart)\r\n- use `Drawers` module from Shopify's [Marketing Assets](https://github.com/Shopify/marketing_assets/blob/f6c830aff2809eabf64d72a0ca3ece345f32aac5/app/assets/javascripts/marketing_assets/modules/drawers.js) (private repo, sorry public folk)\r\n  - JS slightly trimmed down because of the original module using other asset properties/variables\r\n  - Added support for opening drawers with JS rather than click\r\n    - `evt` detected\r\n    - call `timber.RightDrawer.open()` after a product is added to the page\r\n  - Pulled in the CSS and animations from there too\r\n\r\n##### Ajax Cart\r\n- Removed `ajaxify.scss.liquid` and moved simplified styles into `timber.scss.liquid`. JS remains in a separate file\r\n- Cart layout in drawer comes from `snippets/ajax-cart-template.liquid` instead of using `.load()` for `templates/cart.liquid`. This gives us more flexibility in the different layouts given their use.\r\n\r\n##### Other changes\r\n- Base `<button>` reset styles\r\n- Added transform mixin\r\n- Moved search bar into header above navigation\r\n- Standardized some icon font weights and sizes\r\n\r\n##### Cart callback\r\nA few issues were tracked because the ajax cart's callback ran before the DOM was actually updated. This PR fixes that and lets you define a callback function when initializing the cart plugin the same way the Shopify `option_selection.js` does on the product page.\r\n\r\n*This should not be merged until the updated docs are ready to go*\r\n\r\n@stevebosworth @mpiotrowicz @pauldpritchard "},"comment":{"url":"https://api.github.com/repos/Shopify/Timber/issues/comments/76024928","html_url":"https://github.com/Shopify/Timber/pull/338#issuecomment-76024928","issue_url":"https://api.github.com/repos/Shopify/Timber/issues/338","id":76024928,"user":{"login":"jonasll","id":1964710,"avatar_url":"https://avatars.githubusercontent.com/u/1964710?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasll","html_url":"https://github.com/jonasll","followers_url":"https://api.github.com/users/jonasll/followers","following_url":"https://api.github.com/users/jonasll/following{/other_user}","gists_url":"https://api.github.com/users/jonasll/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasll/subscriptions","organizations_url":"https://api.github.com/users/jonasll/orgs","repos_url":"https://api.github.com/users/jonasll/repos","events_url":"https://api.github.com/users/jonasll/events{/privacy}","received_events_url":"https://api.github.com/users/jonasll/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T18:31:25Z","updated_at":"2015-02-25T18:31:25Z","body":"pt\r\nNavegar\r\nFechar menu"}}