{"action":"created","issue":{"url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/218","repository_url":"https://api.github.com/repos/shipshapecode/ember-shepherd","labels_url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/218/comments","events_url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/218/events","html_url":"https://github.com/shipshapecode/ember-shepherd/issues/218","id":333072398,"node_id":"MDU6SXNzdWUzMzMwNzIzOTg=","number":218,"title":"Custom button actions","user":{"login":"chrism","id":35488,"node_id":"MDQ6VXNlcjM1NDg4","avatar_url":"https://avatars0.githubusercontent.com/u/35488?v=4","gravatar_id":"","url":"https://api.github.com/users/chrism","html_url":"https://github.com/chrism","followers_url":"https://api.github.com/users/chrism/followers","following_url":"https://api.github.com/users/chrism/following{/other_user}","gists_url":"https://api.github.com/users/chrism/gists{/gist_id}","starred_url":"https://api.github.com/users/chrism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrism/subscriptions","organizations_url":"https://api.github.com/users/chrism/orgs","repos_url":"https://api.github.com/users/chrism/repos","events_url":"https://api.github.com/users/chrism/events{/privacy}","received_events_url":"https://api.github.com/users/chrism/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-17T15:50:57Z","updated_at":"2018-06-20T16:37:34Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nThis is a great library but i'm stuck trying to use more button types that the built-in ones.\r\n\r\nIn my step I'm using the builtInButtons option taken from the dummy app but wanting to include a button which has a custom action.\r\n\r\n```js\r\n      ...\r\n      builtInButtons: [\r\n        {\r\n          classes: 'button cancel-button',\r\n          text: '<span class=\"button-text\">Close</span>',\r\n          type: 'cancel'\r\n        },\r\n        {\r\n          classes: 'button tour-button',\r\n          text: '<span class=\"button-text\">Take the tour</span>',\r\n          type: 'next'\r\n        },\r\n        {\r\n          classes: 'button sign-in-button',\r\n          text: '<span class=\"button-text\">Sign in</span>',\r\n          action: 'signin'\r\n        }\r\n      ],\r\n      ...\r\n```\r\nBoth the next and cancel work as expected, but I haven't been able to get the custom action to work no matter what I try.\r\n\r\nFirst, I tried to add it as a custom event when I set the defaults for the tour like this, \r\n\r\n```js\r\n    tour.on('signin', () => {\r\n      console.log('sign in');\r\n    });\r\n```\r\n\r\nThen as a simple action in the route from which the service is added\r\n\r\n```js\r\n  action: {\r\n    signin() {\r\n      console.log('action sign in');\r\n    }\r\n  }\r\n```\r\n\r\nAnd failing that using the `when` option in the step\r\n\r\n```js\r\n      when: {\r\n        signin: () => {\r\n          console.log('sign in from when');\r\n        }\r\n      }\r\n```\r\n\r\nI feel I must have missed something but can't seem to work out what.\r\n\r\nIf you could help I'd be happy to update the documentation to include this as it would be a big help (at least to me).\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/comments/398815808","html_url":"https://github.com/shipshapecode/ember-shepherd/issues/218#issuecomment-398815808","issue_url":"https://api.github.com/repos/shipshapecode/ember-shepherd/issues/218","id":398815808,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODgxNTgwOA==","user":{"login":"chrism","id":35488,"node_id":"MDQ6VXNlcjM1NDg4","avatar_url":"https://avatars0.githubusercontent.com/u/35488?v=4","gravatar_id":"","url":"https://api.github.com/users/chrism","html_url":"https://github.com/chrism","followers_url":"https://api.github.com/users/chrism/followers","following_url":"https://api.github.com/users/chrism/following{/other_user}","gists_url":"https://api.github.com/users/chrism/gists{/gist_id}","starred_url":"https://api.github.com/users/chrism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrism/subscriptions","organizations_url":"https://api.github.com/users/chrism/orgs","repos_url":"https://api.github.com/users/chrism/repos","events_url":"https://api.github.com/users/chrism/events{/privacy}","received_events_url":"https://api.github.com/users/chrism/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T16:37:33Z","updated_at":"2018-06-20T16:37:33Z","author_association":"NONE","body":"Hi @rwwagner90 I'm really sorry I didn't get back to you sooner on this, thanks very much for your reply.\r\n\r\nI've been on a bit of a deadline & for now decided not to include the additional button in the tour.\r\n\r\nI'm going to free up some time at the end of this week to look into this and will let you know.\r\n\r\nThanks again for the advice."}}
{"actor":{"display_login":"chrism"}}