{"action":"created","issue":{"url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3112","repository_url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-","labels_url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3112/labels{/name}","comments_url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3112/comments","events_url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3112/events","html_url":"https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/3112","id":320540108,"number":3112,"title":"Slack integration to update status","user":{"login":"shaynemartin91","id":355574,"avatar_url":"https://avatars0.githubusercontent.com/u/355574?v=4","gravatar_id":"","url":"https://api.github.com/users/shaynemartin91","html_url":"https://github.com/shaynemartin91","followers_url":"https://api.github.com/users/shaynemartin91/followers","following_url":"https://api.github.com/users/shaynemartin91/following{/other_user}","gists_url":"https://api.github.com/users/shaynemartin91/gists{/gist_id}","starred_url":"https://api.github.com/users/shaynemartin91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaynemartin91/subscriptions","organizations_url":"https://api.github.com/users/shaynemartin91/orgs","repos_url":"https://api.github.com/users/shaynemartin91/repos","events_url":"https://api.github.com/users/shaynemartin91/events{/privacy}","received_events_url":"https://api.github.com/users/shaynemartin91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-05T20:46:46Z","updated_at":"2018-05-19T05:35:18Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pulls/3112","html_url":"https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/3112","diff_url":"https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/3112.diff","patch_url":"https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/3112.patch"},"body":"# Description\r\n\r\nI use [Slack](https://slack.com/) at work as well as for several private groups. I previously wrote a small script that uses the playback api to update my slack status on some of my slack teams. Right now its just a script that runs locally but I wanted to see it integrated as an actual feature so I've created this PR.\r\n \r\nI know the contribution guidlines suggest asking before adding features, but I already had the core of the functionality written out for my own purposes so this was mainly just adding the setting page.\r\n\r\n# Usage\r\n\r\nUpdates the status emoji to the headphones emoji and status text to the song and artist.\r\n\r\n<img width=\"316\" alt=\"screen shot 2018-05-05 at 2 14 31 pm\" src=\"https://user-images.githubusercontent.com/355574/39667313-259aded2-5081-11e8-99e6-0f73a1728b6b.png\">\r\n\r\nStatus is reset when playback stops or when the app is closed.\r\n\r\n<img width=\"222\" alt=\"screen shot 2018-05-05 at 2 15 46 pm\" src=\"https://user-images.githubusercontent.com/355574/39667322-43869daa-5081-11e8-99f8-c723fba4c568.png\">\r\n\r\n\r\n# Testing\r\n\r\nI added a spec for the new setting page. However, I couldn't seem to find any pattern for testing core features. If I missed a spot to put those tests, I'd be happy to add unit tests for `slack.js`.\r\n\r\n# Questions\r\n\r\nIt's common for slack users to be part of multiple teams. I'm in 9 teams and would really like for this to update my status on 4 of them. I couldn't find a pattern for dynamically adding settings or where the setting value is an array and the user can dynamically add new values. Alternatively, I considered letting the field be a comma-delimited list of tokens but that feels hacky from a user's perspective. Is there a way to achieve something like this?\r\n\r\n# Todo\r\n\r\n- [ ] Unit testing for `slack.js` if there is a convention/place to add it\r\n- [ ] Adding entries to all of the locales (that part might actually probably take more time than the rest of this,  so I wanted to make sure this feature was acceptable before doing that part)"},"comment":{"url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/comments/390381052","html_url":"https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/3112#issuecomment-390381052","issue_url":"https://api.github.com/repos/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/3112","id":390381052,"user":{"login":"MarshallOfSound","id":6634592,"avatar_url":"https://avatars3.githubusercontent.com/u/6634592?v=4","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2018-05-19T05:35:18Z","updated_at":"2018-05-19T05:35:18Z","author_association":"OWNER","body":">  I couldn't find a pattern for dynamically adding settings or where the setting value is an array and the user can dynamically add new values\r\n\r\nI don't think we have an existing pattern for this but a good one, in general, is to store the keys in an array in settings, and in the UI just show one input box that adds things to this array.  Render all keys as uneditable text on the settings page with a \"remove\" icon next to them.  Then they can add / remove them as they wish.\r\n\r\nOverall this feature looks pretty sick 👍 "}}
{"actor":{"display_login":"MarshallOfSound"}}