{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9241","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9241/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9241/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9241/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9241","id":188225732,"number":9241,"title":"Guided Tours: Avoid collisions with First View","user":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"labels":[{"id":349179867,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/GuidedTours","name":"GuidedTours","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}],"state":"open","locked":false,"assignee":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"assignees":[{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/139","html_url":"https://github.com/Automattic/wp-calypso/milestones/GuidedTours%20M4:%20Pre-production","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/139/labels","id":2097262,"number":139,"title":"GuidedTours M4: Pre-production","description":null,"creator":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":10,"state":"open","created_at":"2016-10-27T12:13:49Z","updated_at":"2016-11-18T00:58:40Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2016-11-09T11:33:31Z","updated_at":"2016-11-21T09:10:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9241","html_url":"https://github.com/Automattic/wp-calypso/pull/9241","diff_url":"https://github.com/Automattic/wp-calypso/pull/9241.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9241.patch"},"body":"Fixes #6996 \r\n\r\nTo test:\r\n\r\n1. Apply the patch found at the end of this description, just so you can pretend to be a new user.\r\n2. Open Calypso and `/stats`, make sure only Guided Tours appears, not First View\r\n3. Look at the patch again; play with its values — e.g. in `MainTour`, switch the `when` predicate to return `false` instead of `true` — and make sure GT/FV behavior remains sane — i.e., for the `MainTour` example, make sure that now only First View appears.\r\n4. Generally speaking, try to break things. :)\r\n\r\n```diff\r\ndiff --git a/client/layout/guided-tours/main-tour.js b/client/layout/guided-tours/main-tour.js\r\nindex 1e190fd..b37cbf0 100644\r\n--- a/client/layout/guided-tours/main-tour.js\r\n+++ b/client/layout/guided-tours/main-tour.js\r\n@@ -27,7 +27,7 @@ const scrollSidebarToTop = () =>\r\n \tscrollTo( { y: 0, container: getScrollableSidebar() } );\r\n \r\n export const MainTour = makeTour(\r\n-\t<Tour name=\"main\" version=\"20160601\" path=\"/\" when={ and( isNewUser, isEnabled( 'guided-tours/main' ) ) }>\r\n+\t<Tour name=\"main\" version=\"20160601\" path=\"/\" when={ () => true }>\r\n \t\t<Step name=\"init\" placement=\"right\" className=\"guided-tours__step-first\">\r\n \t\t\t<p className=\"guided-tours__step-text\">\r\n \t\t\t\t{\r\ndiff --git a/client/state/ui/first-view/selectors.js b/client/state/ui/first-view/selectors.js\r\nindex 01b209d..017eed2 100644\r\n--- a/client/state/ui/first-view/selectors.js\r\n+++ b/client/state/ui/first-view/selectors.js\r\n@@ -37,6 +37,7 @@ export const getConfigForCurrentView = createSelector(\r\n );\r\n \r\n export function isUserEligible( state, config ) {\r\n+\treturn true;\r\n \tconst userStartDate = getCurrentUserDate( state );\r\n \r\n \t// If no start date is defined, all users are eligible\r\n@@ -65,7 +66,7 @@ export function isViewEnabled( state, config ) {\r\n \t\treturn false;\r\n \t}\r\n \r\n-\tconst latestFirstViewHistory = findLast( getPreference( state, 'firstViewHistory' ), { view: config.name } );\r\n+\tconst latestFirstViewHistory = findLast( []||getPreference( state, 'firstViewHistory' ), { view: config.name } );\r\n \tconst isViewDisabled = latestFirstViewHistory ? ( !! latestFirstViewHistory.disabled ) : false;\r\n \r\n \t// If the view is disabled, we want to return false, regardless of state\r\ndiff --git a/client/state/ui/guided-tours/selectors.js b/client/state/ui/guided-tours/selectors.js\r\nindex cceff9b..5932da9 100644\r\n--- a/client/state/ui/guided-tours/selectors.js\r\n+++ b/client/state/ui/guided-tours/selectors.js\r\n@@ -75,7 +75,7 @@ const getToursFromFeaturesReached = createSelector(\r\n  * recently and in the past.\r\n  */\r\n const getToursSeen = createSelector(\r\n-\tstate => uniq( map( getToursHistory( state ), 'tourName' ) ),\r\n+\tstate => []||uniq( map( getToursHistory( state ), 'tourName' ) ),\r\n \tgetToursHistory\r\n );\r\n```"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/261883032","html_url":"https://github.com/Automattic/wp-calypso/pull/9241#issuecomment-261883032","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9241","id":261883032,"user":{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T09:10:20Z","updated_at":"2016-11-21T09:10:20Z","body":"I was playing with this over the weekend and I wasn't able to trigger both GT and FV at the same time. I was using the patch from description to simulate NUX. Overall it looks very good! 👍 "}}
{"actor":{"display_login":"marekhrabe"}}