{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/1658","repository_url":"https://api.github.com/repos/riot/riot","labels_url":"https://api.github.com/repos/riot/riot/issues/1658/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/1658/comments","events_url":"https://api.github.com/repos/riot/riot/issues/1658/events","html_url":"https://github.com/riot/riot/pull/1658","id":138967607,"number":1658,"title":"Unmount DOM when `if` becomes false","user":{"login":"rogueg","id":1145907,"avatar_url":"https://avatars.githubusercontent.com/u/1145907?v=3","gravatar_id":"","url":"https://api.github.com/users/rogueg","html_url":"https://github.com/rogueg","followers_url":"https://api.github.com/users/rogueg/followers","following_url":"https://api.github.com/users/rogueg/following{/other_user}","gists_url":"https://api.github.com/users/rogueg/gists{/gist_id}","starred_url":"https://api.github.com/users/rogueg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogueg/subscriptions","organizations_url":"https://api.github.com/users/rogueg/orgs","repos_url":"https://api.github.com/users/rogueg/repos","events_url":"https://api.github.com/users/rogueg/events{/privacy}","received_events_url":"https://api.github.com/users/rogueg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-03-07T12:29:50Z","updated_at":"2016-04-12T15:17:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/riot/riot/pulls/1658","html_url":"https://github.com/riot/riot/pull/1658","diff_url":"https://github.com/riot/riot/pull/1658.diff","patch_url":"https://github.com/riot/riot/pull/1658.patch"},"body":"This is a branch I've been hacking on for a couple weeks. I'm not 100% sure it's ready for merging, but I'd really like to get some feedback, and maybe some help testing/sanity-checking it.\r\n\r\nThe basic idea is that when an if statement becomes false, we want to remove that DOM, unmount it, and throw it away. The means refactoring how unmounting work, and also adds the notion that expressions (like the `id` and `name`) attributes can be unmounted.\r\n\r\nThere are a handful of breaking changes here:\r\n* When a tag is removed and then re-added by an `if`, it's state will now be completely reset. This is true of custom tags, as well as things like inputs.\r\n* `id` and `name` will no longer set a ref on the parent tag if they're within a false `if`.\r\n* The Tag.tags collection won't contain child tags if they're within a false `if`.\r\n* Tag.tags is no longer affected by `name`, which I found really unpredictable.\r\n* Both refs and Tag.tags will no longer match the order of elements in DOM."},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/208957829","html_url":"https://github.com/riot/riot/pull/1658#issuecomment-208957829","issue_url":"https://api.github.com/repos/riot/riot/issues/1658","id":208957829,"user":{"login":"rma4ok","id":470292,"avatar_url":"https://avatars.githubusercontent.com/u/470292?v=3","gravatar_id":"","url":"https://api.github.com/users/rma4ok","html_url":"https://github.com/rma4ok","followers_url":"https://api.github.com/users/rma4ok/followers","following_url":"https://api.github.com/users/rma4ok/following{/other_user}","gists_url":"https://api.github.com/users/rma4ok/gists{/gist_id}","starred_url":"https://api.github.com/users/rma4ok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rma4ok/subscriptions","organizations_url":"https://api.github.com/users/rma4ok/orgs","repos_url":"https://api.github.com/users/rma4ok/repos","events_url":"https://api.github.com/users/rma4ok/events{/privacy}","received_events_url":"https://api.github.com/users/rma4ok/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T15:17:56Z","updated_at":"2016-04-12T15:17:56Z","body":"@rsbondi @GianlucaGuarini @john-goldsmith \r\nas @rogueg mentioned above\r\n> I'm actually moving this week, so not a ton of free time. Thanks for taking a stab at merging it\r\n\r\nso it would be awesome if someone else could proceed with merging this PR"}}