{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5366","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5366/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5366/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5366/events","html_url":"https://github.com/Automattic/wp-calypso/pull/5366","id":154619564,"number":5366,"title":"Terms: Moving category-selector to term-selector","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},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Custom%20Post%20Types%20(CPT)","name":"Custom Post Types (CPT)","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":1,"created_at":"2016-05-13T02:12:49Z","updated_at":"2016-06-16T14:21:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5366","html_url":"https://github.com/Automattic/wp-calypso/pull/5366","diff_url":"https://github.com/Automattic/wp-calypso/pull/5366.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5366.patch"},"body":"For #3697- This branch begins the task of transitioning the `<CategorySelector />` to a generic `<TermSelector />` for use with CPT taxonomies.  This has branch has been a bit of a winding trail through the redux forest, but it has now arrived at a happy meadow, and is ready for a review or two 👍 \r\n\r\nThe final path of this branch involved using much of the same logic that @aduth used in #5647.  The `<CategorySelector />` and `<PostSelector />` have shared many similarities in the past, and this continues here with the adoption of ( much of the same code ) and `ReactVirtualized`.  I wonder if there might be any way to possibly merge these two components since they are quite similar.  Though there are differences, and maybe some magic is best left untouched.\r\n\r\nAkin to the `<CategorySelector />`, the first implementation of the `<TermSelector />` is in the menu builder - replacing the current usage of `<CategorySelector />` there.  This is the first bit of redux in this area, so that is kind of fun too!\r\n\r\n__To Test__\r\nEssentially to test this branch out, it would be most helpful to have a test site with over 100 categories to play with the InfiniteScroll provided by ReactVirtualized.  Additionally, if you have some nested categories, that is desirable as well.\r\n\r\nWith copious amounts of test categories available, simply work with the Menu Builder Category section in all crazy ways possible:\r\n\r\n![menus_ _testingtimmy2_wordpress_com_ _wordpress_com](https://cloud.githubusercontent.com/assets/22080/16098666/22d7b6bc-3309-11e6-8705-6ce2b24e88b9.png)\r\n\r\nSpecifically test out the search capability, and infinite scroll.  But basic actions such as selecting a different category, saving, and ensuring the menu updates properly would be excellent testing steps.\r\n\r\n__Questions__\r\nThere was some chatter around possibly naming this `<HierarchicalTermSelector />` and having a `<TermSelector />` that was smart enough to determine if this component, or the token field should be rendered.  Naming stuff is hard - so your feedback there is appreciated too.  /cc @nylen "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/226499865","html_url":"https://github.com/Automattic/wp-calypso/pull/5366#issuecomment-226499865","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5366","id":226499865,"user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.githubusercontent.com/u/1779930?v=3","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T14:21:42Z","updated_at":"2016-06-16T14:21:42Z","body":"One problem I see is that we're still using the idea of \"fetch next page of items when we need more\" type logic, which won't work with persisted state*. I've been meaning to work on `<PostSelector />` to change this. It'll need to look more like in #5995, where we determine, based on the range of rendered items, which pages should be requested (looking ahead and behind some). In fact, we'll probably be able to do away with `<InfiniteLoader />` altogether both here and in `<PostSelector />`.\r\n\r\n__*__ See \"Implementation notes\" for #5995"}}
{"actor":{"display_login":"aduth"}}