{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6180","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6180/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6180/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6180/events","html_url":"https://github.com/Automattic/wp-calypso/pull/6180","id":161472071,"number":6180,"title":"Collect arbitrary Redux actions into a semi-permanent log","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":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/GuidedTours","name":"GuidedTours","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":"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/90","html_url":"https://github.com/Automattic/wp-calypso/milestones/GuidedTours%20M3:%20Multitours","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/90/labels","id":1768696,"number":90,"title":"GuidedTours M3: Multitours","description":"Multiple tours, contextual tour triggers.","creator":{"login":"ehg","id":215074,"avatar_url":"https://avatars.githubusercontent.com/u/215074?v=3","gravatar_id":"","url":"https://api.github.com/users/ehg","html_url":"https://github.com/ehg","followers_url":"https://api.github.com/users/ehg/followers","following_url":"https://api.github.com/users/ehg/following{/other_user}","gists_url":"https://api.github.com/users/ehg/gists{/gist_id}","starred_url":"https://api.github.com/users/ehg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehg/subscriptions","organizations_url":"https://api.github.com/users/ehg/orgs","repos_url":"https://api.github.com/users/ehg/repos","events_url":"https://api.github.com/users/ehg/events{/privacy}","received_events_url":"https://api.github.com/users/ehg/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":3,"state":"open","created_at":"2016-05-16T13:38:13Z","updated_at":"2016-06-21T15:45:19Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-06-21T15:45:18Z","updated_at":"2016-06-21T19:03:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/6180","html_url":"https://github.com/Automattic/wp-calypso/pull/6180","diff_url":"https://github.com/Automattic/wp-calypso/pull/6180.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/6180.patch"},"body":"Product of exploration in #6146. See that PR for context.\r\n\r\n### Rationale\r\n\r\nThe action log is to be consumed by Guided Tours selectors. The aforementioned PR showcases this. The tests should be self-explaining, but feel free to ask questions.\r\n\r\n### Testing\r\n\r\n- Run Calypso with the Redux Dev Tools open on the side (`state.currentUser.actionLog`).\r\n- Make sure that certain actions carried out in Calypso alter the log: navigating to a section adds a `SET_ROUTE` action to the log (temporary branch), opening a theme preview, etc.\r\n- Try the tour at http://calypso.localhost:3000/stats/day?tour=main and keep an eye on the permanent branch of the log: proceeding to the next step should only affect the temporary branch, but quitting or completing the whole tour should add an action to the permanent one.\r\n\r\n### Questions\r\n- [ ] Is this the best place in the Redux tree? The decision was made by myself, @lsinger and @ehg.\r\n\r\ncc @aduth since I believe you've worked the most on that state branch\n\nTest live: https://calypso.live/?branch=add/action-log"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/227539160","html_url":"https://github.com/Automattic/wp-calypso/pull/6180#issuecomment-227539160","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6180","id":227539160,"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},"created_at":"2016-06-21T19:03:30Z","updated_at":"2016-06-21T19:03:30Z","body":"Thanks for reviewing! Good stuff.\r\n\r\n> Also keep in mind that \"permanent\" in state is not truly permanent in that:\r\n\r\nYep (although I didn't know of the 7-day limit!). The idea is to see what an MVP of this looks like, and to persist this on the server as well, across the user's devices.\r\n\r\n> a rough idea of an alternative comes to mind:\r\n\r\nLeveraging user preferences sounds like a sound idea, though I like the idea of just having one source of actions — and that there is just one _kind_ of data: plain actions. I'll discuss the suggestion with my squad mates.\r\n\r\n> Clear on either (new) GUIDED_TOURS_CLEAR or perhaps also SET_ROUTE (if determined route has no relevant guided tours)\r\n\r\nThe idea is that we have more data from which to infer tours than just the last route taken, so clearing data this aggressively is undesirable. A naïve example: if we kept a log that the user navigated to `/foo`, then `/help`, then `/foo`, then something else, then `/foo`, we could infer that they are trying to accomplish something in `/foo` and we could provide guidance there."}}
{"actor":{"display_login":"mcsf"}}