{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25514","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25514/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25514/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25514/events","html_url":"https://github.com/Automattic/wp-calypso/pull/25514","id":332617562,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDU4MTM2","number":25514,"title":"Podcasting: save and redirect when disabling","user":{"login":"michaeldcain","id":942359,"node_id":"MDQ6VXNlcjk0MjM1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/942359?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeldcain","html_url":"https://github.com/michaeldcain","followers_url":"https://api.github.com/users/michaeldcain/followers","following_url":"https://api.github.com/users/michaeldcain/following{/other_user}","gists_url":"https://api.github.com/users/michaeldcain/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldcain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldcain/subscriptions","organizations_url":"https://api.github.com/users/michaeldcain/orgs","repos_url":"https://api.github.com/users/michaeldcain/repos","events_url":"https://api.github.com/users/michaeldcain/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldcain/received_events","type":"User","site_admin":false},"labels":[{"id":285009981,"node_id":"MDU6TGFiZWwyODUwMDk5ODE=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Site%20Settings","name":"Site Settings","color":"006b75","default":false},{"id":285010017,"node_id":"MDU6TGFiZWwyODUwMTAwMTc=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5","default":false},{"id":967395476,"node_id":"MDU6TGFiZWw5NjczOTU0NzY=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Feature%20progress","name":"[Type] Feature progress","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-15T01:32:33Z","updated_at":"2018-06-27T22:29:13Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25514","html_url":"https://github.com/Automattic/wp-calypso/pull/25514","diff_url":"https://github.com/Automattic/wp-calypso/pull/25514.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/25514.patch"},"body":"**In Progress**\r\n\r\nThis PR changes the action for disabling podcasting to automatically save and then redirect the user to the Settings > Writing screen."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/400849761","html_url":"https://github.com/Automattic/wp-calypso/pull/25514#issuecomment-400849761","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25514","id":400849761,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDg0OTc2MQ==","user":{"login":"nylen","id":227022,"node_id":"MDQ6VXNlcjIyNzAyMg==","avatar_url":"https://avatars2.githubusercontent.com/u/227022?v=4","gravatar_id":"","url":"https://api.github.com/users/nylen","html_url":"https://github.com/nylen","followers_url":"https://api.github.com/users/nylen/followers","following_url":"https://api.github.com/users/nylen/following{/other_user}","gists_url":"https://api.github.com/users/nylen/gists{/gist_id}","starred_url":"https://api.github.com/users/nylen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nylen/subscriptions","organizations_url":"https://api.github.com/users/nylen/orgs","repos_url":"https://api.github.com/users/nylen/repos","events_url":"https://api.github.com/users/nylen/events{/privacy}","received_events_url":"https://api.github.com/users/nylen/received_events","type":"User","site_admin":false},"created_at":"2018-06-27T22:29:13Z","updated_at":"2018-06-27T22:29:13Z","author_association":"MEMBER","body":"Continuing on from [the comments here](https://github.com/Automattic/wp-calypso/pull/25514#discussion_r195942239), cc @dmsnell.\r\n\r\nI think in order to handle loading a page and scrolling to a specific element without a `setTimeout`, we really need a `page.js` middleware to capture URL changes.  The most natural way to trigger this scroll is navigating to a URL that contains a fragment.  In fact it's a bit disappointing that this standard browser behavior is broken.\r\n\r\nJust a `page.js` middleware is not enough, though: when the `page( '*' )` handler added in 9537284 fires, the DOM element has not been rendered yet.\r\n\r\nSo I think in order to avoid a `setTimeout`, we need to do something like this.\r\n\r\n- Detect hash changes in a `page.js` middleware.\r\n- Flag the hash change as \"pending scroll\" until the element is rendered.\r\n- Detect when the element is rendered, whether in a Redux middleware or in each component that's interested in scrolling to one of its children.  (This is still potentially problematic, because we may have partially rendered content above the scroll target, which will cause a jump when it renders.)\r\n- At the appropriate moment, do the scroll and cancel the \"pending scroll\" flag.\r\n\r\nDoes that sound reasonable?  Anything I am missing here?  Is there anyone else that comes to mind who might know a better way to do this?"}}
{"actor":{"display_login":"nylen"}}