{"action":"created","issue":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/80","repository_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember","labels_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/80/comments","events_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/80/events","html_url":"https://github.com/Semantic-Org/Semantic-UI-Ember/issues/80","id":125625058,"number":80,"title":"Expose Module Usage Behaviors as Ember Actions","user":{"login":"Panman8201","id":3475765,"avatar_url":"https://avatars.githubusercontent.com/u/3475765?v=3","gravatar_id":"","url":"https://api.github.com/users/Panman8201","html_url":"https://github.com/Panman8201","followers_url":"https://api.github.com/users/Panman8201/followers","following_url":"https://api.github.com/users/Panman8201/following{/other_user}","gists_url":"https://api.github.com/users/Panman8201/gists{/gist_id}","starred_url":"https://api.github.com/users/Panman8201/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Panman8201/subscriptions","organizations_url":"https://api.github.com/users/Panman8201/orgs","repos_url":"https://api.github.com/users/Panman8201/repos","events_url":"https://api.github.com/users/Panman8201/events{/privacy}","received_events_url":"https://api.github.com/users/Panman8201/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-08T14:46:37Z","updated_at":"2016-04-24T21:29:52Z","closed_at":null,"body":"It would be nice to have each modules usage behaviors (I think that's what Semantic UI calls them) be exposed as ember component actions. For example; a sidebar \"toggle\" behavior/method:\r\n\r\n```javascript\r\nactions: {\r\n  toggle() {\r\n    this.$().sidebar('toggle');\r\n  }\r\n}\r\n```\r\n\r\nThen code that has access to the sidebar instance (parent/child component, controller, whatever) can call upon the action instead of using the jQuery plugin. Seems more Ember'ish anyway.\r\n\r\n```javascript\r\nsidebarComponent.send('toggle');\r\n```\r\n\r\nI'd be willing to work on a PR if I could get some guidance on how you'd like to see it implemented."},"comment":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/comments/214040718","html_url":"https://github.com/Semantic-Org/Semantic-UI-Ember/issues/80#issuecomment-214040718","issue_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/80","id":214040718,"user":{"login":"aaronbhansen","id":1092833,"avatar_url":"https://avatars.githubusercontent.com/u/1092833?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbhansen","html_url":"https://github.com/aaronbhansen","followers_url":"https://api.github.com/users/aaronbhansen/followers","following_url":"https://api.github.com/users/aaronbhansen/following{/other_user}","gists_url":"https://api.github.com/users/aaronbhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbhansen/subscriptions","organizations_url":"https://api.github.com/users/aaronbhansen/orgs","repos_url":"https://api.github.com/users/aaronbhansen/repos","events_url":"https://api.github.com/users/aaronbhansen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbhansen/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T21:29:52Z","updated_at":"2016-04-24T21:29:52Z","body":"Thanks for the example, that makes more sense. We are looking to get an initial 1.0 release out that uses mutable properties, and then move to a 2.0 release that applies data down actions up methodology. Every semantic ember component has a method called execute on it, that invokes the semantic module directly. We could expose that as a composable action, that could be called as a block parameter to nested children. I'll think about this a little more, but I think you bring up a good usage example of where to head in the next release. "}}