{"action":"created","issue":{"url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/191","labels_url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/191/comments","events_url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/191/events","html_url":"https://github.com/YashdalfTheGray/flintandsteel/pull/191","id":120468659,"number":191,"title":"Add and edit search tags to an Idea","user":{"login":"Daviddt17","id":5295379,"avatar_url":"https://avatars.githubusercontent.com/u/5295379?v=3","gravatar_id":"","url":"https://api.github.com/users/Daviddt17","html_url":"https://github.com/Daviddt17","followers_url":"https://api.github.com/users/Daviddt17/followers","following_url":"https://api.github.com/users/Daviddt17/following{/other_user}","gists_url":"https://api.github.com/users/Daviddt17/gists{/gist_id}","starred_url":"https://api.github.com/users/Daviddt17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daviddt17/subscriptions","organizations_url":"https://api.github.com/users/Daviddt17/orgs","repos_url":"https://api.github.com/users/Daviddt17/repos","events_url":"https://api.github.com/users/Daviddt17/events{/privacy}","received_events_url":"https://api.github.com/users/Daviddt17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-04T19:22:29Z","updated_at":"2015-12-05T19:15:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/pulls/191","html_url":"https://github.com/YashdalfTheGray/flintandsteel/pull/191","diff_url":"https://github.com/YashdalfTheGray/flintandsteel/pull/191.diff","patch_url":"https://github.com/YashdalfTheGray/flintandsteel/pull/191.patch"},"body":"## What I Added:\r\nI added the ability to add and edit search tags to an idea. Since chips in Angular Material are so broken, I opted to add tags using the custom chips I believe @alanlgirard added. There is a tag input in which every time the use presses enter, the tag will be added to the tag list which appears below the input. I've added the constraints of a limit of 5 tags and no duplicates.\r\n\r\nOnce Angular Material chips become stable it would probably be a good idea to switch over.\r\n\r\nAs of typing this I realized I didn't check for an empty tag, so I'll add that after I post the PR.\r\n\r\n## What I changed:\r\nI had to change the \"editIdea\" function as it did not take tags as a parameter. I also had to add tags to the projection of \"getHeaders\" so that the tags can be searchable. Hopefully neither of these changes will conflict with the RESTful changes @YashdalfTheGray is making.\r\n\r\n## Some Screenshots:\r\n![addtags](https://cloud.githubusercontent.com/assets/5295379/11598801/fe45a9ae-9a91-11e5-9bc0-63cd60e2a1a5.JPG)\r\n\r\n![ideatagsview](https://cloud.githubusercontent.com/assets/5295379/11598804/0289d4d6-9a92-11e5-9868-544d7a83073d.JPG)\r\n\r\n@YashdalfTheGray @bcbrennecke @Mctalian @alanlgirard @monotkate @LongArmMcGee @davethenipper "},"comment":{"url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/comments/162238390","html_url":"https://github.com/YashdalfTheGray/flintandsteel/pull/191#issuecomment-162238390","issue_url":"https://api.github.com/repos/YashdalfTheGray/flintandsteel/issues/191","id":162238390,"user":{"login":"Mctalian","id":5081281,"avatar_url":"https://avatars.githubusercontent.com/u/5081281?v=3","gravatar_id":"","url":"https://api.github.com/users/Mctalian","html_url":"https://github.com/Mctalian","followers_url":"https://api.github.com/users/Mctalian/followers","following_url":"https://api.github.com/users/Mctalian/following{/other_user}","gists_url":"https://api.github.com/users/Mctalian/gists{/gist_id}","starred_url":"https://api.github.com/users/Mctalian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mctalian/subscriptions","organizations_url":"https://api.github.com/users/Mctalian/orgs","repos_url":"https://api.github.com/users/Mctalian/repos","events_url":"https://api.github.com/users/Mctalian/events{/privacy}","received_events_url":"https://api.github.com/users/Mctalian/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T19:15:02Z","updated_at":"2015-12-05T19:15:02Z","body":"It may not be obvious for users to hit \"enter\" to submit their tags and it could result in tags not being submitted. This also occurs for a new idea:\r\n\r\n![tags](https://cloud.githubusercontent.com/assets/5081281/11609625/ba6ed822-9b59-11e5-8706-ea2952064063.gif)\r\n\r\nAlso, allowing spaces and commas should probably not be allowed. Can you do a `.split(',')` or something like that to allow the tags to be submitted in a comma-seperated list? Replace spaces with dashes, trim off trailing spaces, etc. Up to you how you want to handle this. That may be the first thing that people try to do, I'm not sure. In other sites with keyword fields, I usually assume comma or semi-colon delimited lists. It's too bad md-chips doesn't work correctly. That'd probably fix this. We might also want to provide some help text like \"Limit to 5\" or at least \"Press 'Enter' to add tags\" if we can't find a good way to work this. Maybe pop up a warning if users try to submit or edit an idea with text in the tags field? Perhaps we automagically assume they want those tags? There's a lot you can do here.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5081281/11609600/15d24e0c-9b59-11e5-926a-3c6e8cbbe00f.png)"}}