{"action":"created","issue":{"url":"https://api.github.com/repos/Dogstudio/highway/issues/39","repository_url":"https://api.github.com/repos/Dogstudio/highway","labels_url":"https://api.github.com/repos/Dogstudio/highway/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/Dogstudio/highway/issues/39/comments","events_url":"https://api.github.com/repos/Dogstudio/highway/issues/39/events","html_url":"https://github.com/Dogstudio/highway/pull/39","id":374706477,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzM1OTI1","number":39,"title":"Change renderer to append new view, and then remove old view.","user":{"login":"joshkirk-zero","id":36864829,"node_id":"MDQ6VXNlcjM2ODY0ODI5","avatar_url":"https://avatars2.githubusercontent.com/u/36864829?v=4","gravatar_id":"","url":"https://api.github.com/users/joshkirk-zero","html_url":"https://github.com/joshkirk-zero","followers_url":"https://api.github.com/users/joshkirk-zero/followers","following_url":"https://api.github.com/users/joshkirk-zero/following{/other_user}","gists_url":"https://api.github.com/users/joshkirk-zero/gists{/gist_id}","starred_url":"https://api.github.com/users/joshkirk-zero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshkirk-zero/subscriptions","organizations_url":"https://api.github.com/users/joshkirk-zero/orgs","repos_url":"https://api.github.com/users/joshkirk-zero/repos","events_url":"https://api.github.com/users/joshkirk-zero/events{/privacy}","received_events_url":"https://api.github.com/users/joshkirk-zero/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-28T01:20:16Z","updated_at":"2018-10-28T21:12:33Z","closed_at":"2018-10-28T20:51:27Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Dogstudio/highway/pulls/39","html_url":"https://github.com/Dogstudio/highway/pull/39","diff_url":"https://github.com/Dogstudio/highway/pull/39.diff","patch_url":"https://github.com/Dogstudio/highway/pull/39.patch"},"body":"I don't expect you to merge this one for a release, but I thought you would find it interesting and perhaps others would find it useful. Also, if you want to merge it for a release I would love that 💯 \r\n\r\nI'm a big fan of what you've built with highway and I'm a huge PJAX nerd. But as you know based on my past pull request, it was missing a couple crucial things that I needed. I added the contextualTransitions, and now I changed it so instead of removing the innerHTML of the view, and changing the `data-router-view` attribute, it first appends the new view after the old one, then removes the old one. This is crucial in order to have a transition that keeps elements from the previous view until the new view elements are ready to take it's place. This solves https://github.com/Dogstudio/highway/issues/17.\r\n\r\nSo in summary, views still have their transitions assigned, as well as a default transition of course. Contextual transitions can fire on click, and now the new view is appended to the `data-router-wrapper` before the old view is removed. Then the old view is removed. The reason for this is to achieve visual trickery. Sometimes you want an element that appears to persist across views. See this video of an early WIP to see what I mean: https://zero-1.wistia.com/medias/e1qvni1ndp... when you get to the bottom of a project, you click to go to the next project. The large text appears to stay and carry over to the next view, but in reality the next view just has the same text positioned in the same way. \r\n\r\nBefore this wasn't possible, since there would be a flash of emptiness in-between the old content being removed and the new content added. Enjoy!"},"comment":{"url":"https://api.github.com/repos/Dogstudio/highway/issues/comments/433741893","html_url":"https://github.com/Dogstudio/highway/pull/39#issuecomment-433741893","issue_url":"https://api.github.com/repos/Dogstudio/highway/issues/39","id":433741893,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzc0MTg5Mw==","user":{"login":"Anthodpnt","id":6245705,"node_id":"MDQ6VXNlcjYyNDU3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/6245705?v=4","gravatar_id":"","url":"https://api.github.com/users/Anthodpnt","html_url":"https://github.com/Anthodpnt","followers_url":"https://api.github.com/users/Anthodpnt/followers","following_url":"https://api.github.com/users/Anthodpnt/following{/other_user}","gists_url":"https://api.github.com/users/Anthodpnt/gists{/gist_id}","starred_url":"https://api.github.com/users/Anthodpnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anthodpnt/subscriptions","organizations_url":"https://api.github.com/users/Anthodpnt/orgs","repos_url":"https://api.github.com/users/Anthodpnt/repos","events_url":"https://api.github.com/users/Anthodpnt/events{/privacy}","received_events_url":"https://api.github.com/users/Anthodpnt/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T21:12:33Z","updated_at":"2018-10-28T21:12:33Z","author_association":"CONTRIBUTOR","body":"@joshkirk I'm not sure to understand, when I see the code, the `add` method append the new view but remove the old one at the same time... How do you manage the overlapping of both views then ?"}}
{"actor":{"display_login":"Anthodpnt"}}