{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/8645","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/8645/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/8645/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/8645/events","html_url":"https://github.com/Automattic/wp-calypso/pull/8645","id":182246945,"number":8645,"title":"Components: Add site selector \"Add Site\" popover menu with Jetpack site support","user":{"login":"tyxla","id":8436925,"avatar_url":"https://avatars.githubusercontent.com/u/8436925?v=3","gravatar_id":"","url":"https://api.github.com/users/tyxla","html_url":"https://github.com/tyxla","followers_url":"https://api.github.com/users/tyxla/followers","following_url":"https://api.github.com/users/tyxla/following{/other_user}","gists_url":"https://api.github.com/users/tyxla/gists{/gist_id}","starred_url":"https://api.github.com/users/tyxla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyxla/subscriptions","organizations_url":"https://api.github.com/users/tyxla/orgs","repos_url":"https://api.github.com/users/tyxla/repos","events_url":"https://api.github.com/users/tyxla/events{/privacy}","received_events_url":"https://api.github.com/users/tyxla/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Components","name":"Components","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Jetpack","name":"Jetpack","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/NUX","name":"NUX","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Design%20Review","name":"[Status] Needs Design Review","color":"009800"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Enhancement","name":"[Type] Enhancement","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"tyxla","id":8436925,"avatar_url":"https://avatars.githubusercontent.com/u/8436925?v=3","gravatar_id":"","url":"https://api.github.com/users/tyxla","html_url":"https://github.com/tyxla","followers_url":"https://api.github.com/users/tyxla/followers","following_url":"https://api.github.com/users/tyxla/following{/other_user}","gists_url":"https://api.github.com/users/tyxla/gists{/gist_id}","starred_url":"https://api.github.com/users/tyxla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyxla/subscriptions","organizations_url":"https://api.github.com/users/tyxla/orgs","repos_url":"https://api.github.com/users/tyxla/repos","events_url":"https://api.github.com/users/tyxla/events{/privacy}","received_events_url":"https://api.github.com/users/tyxla/received_events","type":"User","site_admin":false},"assignees":[{"login":"tyxla","id":8436925,"avatar_url":"https://avatars.githubusercontent.com/u/8436925?v=3","gravatar_id":"","url":"https://api.github.com/users/tyxla","html_url":"https://github.com/tyxla","followers_url":"https://api.github.com/users/tyxla/followers","following_url":"https://api.github.com/users/tyxla/following{/other_user}","gists_url":"https://api.github.com/users/tyxla/gists{/gist_id}","starred_url":"https://api.github.com/users/tyxla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyxla/subscriptions","organizations_url":"https://api.github.com/users/tyxla/orgs","repos_url":"https://api.github.com/users/tyxla/repos","events_url":"https://api.github.com/users/tyxla/events{/privacy}","received_events_url":"https://api.github.com/users/tyxla/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/102","html_url":"https://github.com/Automattic/wp-calypso/milestones/Jetpack%20NUX%20m2","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/102/labels","id":1833285,"number":102,"title":"Jetpack NUX m2","description":"New features and experiments to the initial UI","creator":{"login":"rickybanister","id":437258,"avatar_url":"https://avatars.githubusercontent.com/u/437258?v=3","gravatar_id":"","url":"https://api.github.com/users/rickybanister","html_url":"https://github.com/rickybanister","followers_url":"https://api.github.com/users/rickybanister/followers","following_url":"https://api.github.com/users/rickybanister/following{/other_user}","gists_url":"https://api.github.com/users/rickybanister/gists{/gist_id}","starred_url":"https://api.github.com/users/rickybanister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickybanister/subscriptions","organizations_url":"https://api.github.com/users/rickybanister/orgs","repos_url":"https://api.github.com/users/rickybanister/repos","events_url":"https://api.github.com/users/rickybanister/events{/privacy}","received_events_url":"https://api.github.com/users/rickybanister/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":4,"state":"open","created_at":"2016-06-16T21:27:55Z","updated_at":"2016-10-11T12:08:35Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-10-11T12:08:35Z","updated_at":"2016-10-14T07:08:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/8645","html_url":"https://github.com/Automattic/wp-calypso/pull/8645","diff_url":"https://github.com/Automattic/wp-calypso/pull/8645.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/8645.patch"},"body":"### Summary\r\n\r\nThis PR fixes #6400, where it was suggested that we introduce a popover menu to the **Add New WordPress** button in the bottom of the site selector. The main purpose of this popover menu is to introduce another way to reach the self-hosted site connection flow (Jetpack Connect).\r\n\r\n### What this PR does\r\n\r\n1. Moves the add site button to a separate component, paving the way for the popover menu.\r\n2. Introduces the popover menu to the new component, hooks the JPC functionality and adds some  events that allow granular tracking of the new feature.\r\n3. Adds an A/B test that will show the new popover to only 10% of all users (cc @rickybanister for double-checking if this percentage makes sense for this feature).\r\n\r\n### Preview\r\n\r\nBefore:\r\n![](https://cldup.com/MkKzRCxv73.png)\r\n\r\nAfter:\r\n![](https://cldup.com/7Fv2-ONDVm-2000x2000.png)\r\n\r\n### Testing instructions\r\n\r\n1. Checkout this branch.\r\n2. Click on \"My Sites\".\r\n3. Click on \"Switch Site\".\r\n4. Verify the old \"Add New WordPress\" button looks works just like before. \r\n5. Verify the new button (currently saying \"Add WordPress Site\") opens a popover on click with 2 options, and they work as expected:\r\n * __Start a new WordPress.com site__ - should lead to `/start` or `/start/survey`;\r\n * __Add a self-hosted WordPress site__ - should lead to `/jetpack/connect`.\r\n\r\n### Testing notes\r\n\r\n1. To force the A/B test to use the old button, you can type the following in your console: `localStorage.setItem('ABTests','{\"siteSelectorAddSitePopover_20161011\":\"hidePopover\"}')`\r\n\r\n2. To force the A/B test to use the new button with popover, you can type this in the console: `localStorage.setItem('ABTests','{\"siteSelectorAddSitePopover_20161011\":\"showPopover\"}')`\r\n\r\n### Review\r\n\r\n/cc: \r\n@rickybanister, @keoshi, @meremagee for design and wording review;\r\n@johnHackworth, @mtias for code review."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/253725739","html_url":"https://github.com/Automattic/wp-calypso/pull/8645#issuecomment-253725739","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/8645","id":253725739,"user":{"login":"tyxla","id":8436925,"avatar_url":"https://avatars.githubusercontent.com/u/8436925?v=3","gravatar_id":"","url":"https://api.github.com/users/tyxla","html_url":"https://github.com/tyxla","followers_url":"https://api.github.com/users/tyxla/followers","following_url":"https://api.github.com/users/tyxla/following{/other_user}","gists_url":"https://api.github.com/users/tyxla/gists{/gist_id}","starred_url":"https://api.github.com/users/tyxla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyxla/subscriptions","organizations_url":"https://api.github.com/users/tyxla/orgs","repos_url":"https://api.github.com/users/tyxla/repos","events_url":"https://api.github.com/users/tyxla/events{/privacy}","received_events_url":"https://api.github.com/users/tyxla/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T07:08:56Z","updated_at":"2016-10-14T07:08:56Z","body":"Sounds good to me - I've shortened the button text to just **Add Site**. \r\n\r\nRegarding the popover texts - I think they're fine as they are."}}
{"actor":{"display_login":"tyxla"}}