{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9601","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9601/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9601/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9601/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9601","id":191236117,"number":9601,"title":"Taxonomies: Adding the \"Set as default\" link to the taxonomy manager","user":{"login":"youknowriad","id":272444,"avatar_url":"https://avatars.githubusercontent.com/u/272444?v=3","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"labels":[{"id":285009981,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Site%20Settings","name":"Site Settings","color":"006b75","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":285010032,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Task","name":"[Type] Task","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"youknowriad","id":272444,"avatar_url":"https://avatars.githubusercontent.com/u/272444?v=3","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"assignees":[{"login":"youknowriad","id":272444,"avatar_url":"https://avatars.githubusercontent.com/u/272444?v=3","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-11-23T10:37:25Z","updated_at":"2016-11-24T16:13:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9601","html_url":"https://github.com/Automattic/wp-calypso/pull/9601","diff_url":"https://github.com/Automattic/wp-calypso/pull/9601.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9601.patch"},"body":"This PR adds the possibility to set a category as default right on the Ellipsis menu.\r\nI faced two issues while working on this:\r\n\r\n - The default Category was not rerendered correctly when the site settings state was updated. This was due to the fact that `VirtualScroll` does not call `renderRow` again if the item object did not change. So, we need to avoid using any extra prop in the `renderRow` function. My solution was to move all the \"default category\" logic to `ListItem`.\r\n\r\n - Also, I noticed that when calling the siteSettings endpoint, the returned value of default_category is a \"string\". so I added a small util function to normalize settings retrieved from the API.\r\n\r\n<img width=\"730\" alt=\"capture d ecran 2016-11-23 a 11 28 42 am\" src=\"https://cloud.githubusercontent.com/assets/272444/20558568/f3e7d328-b170-11e6-8690-f4588e101180.png\">\r\n\r\ncloses #9459\r\n\r\n**How to test**\r\n\r\n * Open the taxonomy manager `/settings/taxonomies/$site/category`\r\n * Try to update the default category from the ellipsis menu\r\n * The default category should be updated correctly\r\n\r\ncc @timmyc "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/262809972","html_url":"https://github.com/Automattic/wp-calypso/pull/9601#issuecomment-262809972","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9601","id":262809972,"user":{"login":"timmyc","id":22080,"avatar_url":"https://avatars.githubusercontent.com/u/22080?v=3","gravatar_id":"","url":"https://api.github.com/users/timmyc","html_url":"https://github.com/timmyc","followers_url":"https://api.github.com/users/timmyc/followers","following_url":"https://api.github.com/users/timmyc/following{/other_user}","gists_url":"https://api.github.com/users/timmyc/gists{/gist_id}","starred_url":"https://api.github.com/users/timmyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmyc/subscriptions","organizations_url":"https://api.github.com/users/timmyc/orgs","repos_url":"https://api.github.com/users/timmyc/repos","events_url":"https://api.github.com/users/timmyc/events{/privacy}","received_events_url":"https://api.github.com/users/timmyc/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T16:13:56Z","updated_at":"2016-11-24T16:13:56Z","body":"Performance-wise it seems the same in this branch vs master.  When interacting with a long list on my woefully under-powered Asus Transformer, there is lag in master and this branch when waiting for new rows to paint.  I think updating VirtualScroll might help with that ( hopefully )."}}
{"actor":{"display_login":"timmyc"}}