{"action":"created","issue":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/1100","repository_url":"https://api.github.com/repos/netlify/netlify-cms","labels_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1100/labels{/name}","comments_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1100/comments","events_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1100/events","html_url":"https://github.com/netlify/netlify-cms/pull/1100","id":296276297,"number":1100,"title":"WIP: Relations/Tags/TBD Widget Feature","user":{"login":"moonmeister","id":2730871,"avatar_url":"https://avatars1.githubusercontent.com/u/2730871?v=4","gravatar_id":"","url":"https://api.github.com/users/moonmeister","html_url":"https://github.com/moonmeister","followers_url":"https://api.github.com/users/moonmeister/followers","following_url":"https://api.github.com/users/moonmeister/following{/other_user}","gists_url":"https://api.github.com/users/moonmeister/gists{/gist_id}","starred_url":"https://api.github.com/users/moonmeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moonmeister/subscriptions","organizations_url":"https://api.github.com/users/moonmeister/orgs","repos_url":"https://api.github.com/users/moonmeister/repos","events_url":"https://api.github.com/users/moonmeister/events{/privacy}","received_events_url":"https://api.github.com/users/moonmeister/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-12T06:19:33Z","updated_at":"2018-03-07T00:42:41Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/netlify/netlify-cms/pulls/1100","html_url":"https://github.com/netlify/netlify-cms/pull/1100","diff_url":"https://github.com/netlify/netlify-cms/pull/1100.diff","patch_url":"https://github.com/netlify/netlify-cms/pull/1100.patch"},"body":"# Summary\r\n Associating objects from another collection with specific content. My personal use case was inputting computer languages/technologies into one collection that I could then use to tag on a project in another collection for a personal portfolio.\r\n\r\nAdditionally, there are at least 3 feature requests for this... #391, #1061 , kinda #1050.\r\n\r\nAlso:\r\n\r\n1. I'm new to js/react so I wouldn't be surprised if I committed some terrible faux pas. Please educate me and please review my code closely. \r\n\r\n2. Below I've gathered my own thoughts and tried to pullin the features I've seen mentioned on various feature requests.\r\n\r\n3. If anyone else wants to contribute to the PR feel free. \r\n\r\n4. Thanks to @erquhart and @tech4him1 for answering my questions on ✨Gitter✨, this was made possible and my ignorance was lessened.\r\n\r\n# Work in Progress\r\n\r\n## Questions\r\n\r\n1. Does this _upgrade_ the relation field or is it an alternative? \r\n   - If we replace it we need to assure config compatibility for those upgrading. We could make the default mimik the `relation` widgets current functionality.\r\n   - If it's an alternative is the `relations` name confusing cause it's so similar. Or useful cause it explains the functionality is similar to that of the `relation` widget\r\n2. Do we render anything in preview?\r\n   - Like the `boolean` widget it seems kinda necessary for simple tags. \r\n   - BUT, if you're trying to include a related post or some other content...then seeing a preview could be useful.\r\n   - Maybe make this a config option?\r\n3. I copied a lot of code to implement the autocomplete functionality from the `relation` widget. Though I'm unsure how to, I'm guessing it'd be best practice to make the common code a library or react component of some kind. yes?\r\n\r\n## Task List\r\n**Configuration**\r\n\r\n- [x] Accepts a reference to a field in an entry containing a list of tags - not certain if we support this\r\n- [x] Accepts a number to limit the number of flags\r\n- [x] Accepts a flag to require unique tags\r\n- [ ] Accepts a list of tags\r\n- [ ] Accepts a flag to disallow entering tags that are not in the list / autocomplete results\r\n\r\n**Tag list editing**\r\n\r\n- [ ] Tags don't really belong in a normal entry, nor in settings, probably a third \"meta\" entry type*\r\n- [ ] The difference in entry type really only affects it's appearance in the UI\r\n- [ ] The editing experience itself will be configurable just like any collection entry*\r\n\r\n*I honestly don't understand what these means @erquhart can you explain this.\r\n\r\n**Widget UI**\r\n\r\n- [x] Autocomplete\r\n- [x] Pressing enter transforms the typed tag into a visual tag with an x for deleting\r\n- [x] Tags can also be removed via backspace\r\n- [x] Customizable input field `placeholder` text via config.\r\n- [ ] Press space transforms the typed tag into a visual tag with an x for deleting\r\n- [ ] Counter for number of tags currently over the tag limit. Maybe turns red when you hit limit. Maybe doesn't show a limit and just counts tags if you have no limit. \r\n\r\n# Test plan\r\nSo far it's been manual, I'm new at react/js so testing it uncharted territory for me. \r\n\r\n<img width=\"710\" alt=\"screen shot 2018-02-11 at 9 40 16 pm\" src=\"https://user-images.githubusercontent.com/2730871/36084663-335d481e-0f74-11e8-9447-9edd58efa135.png\">\r\n\r\n# Description for the changelog\r\n\r\nImplements a tag style widget for creating one-to-many relationships.\r\n\r\n# our cats\r\n![img_20180128_140820](https://user-images.githubusercontent.com/2730871/36084724-c515bdd6-0f74-11e8-8932-b4f18396a9db.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/comments/370981398","html_url":"https://github.com/netlify/netlify-cms/pull/1100#issuecomment-370981398","issue_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1100","id":370981398,"user":{"login":"moonmeister","id":2730871,"avatar_url":"https://avatars1.githubusercontent.com/u/2730871?v=4","gravatar_id":"","url":"https://api.github.com/users/moonmeister","html_url":"https://github.com/moonmeister","followers_url":"https://api.github.com/users/moonmeister/followers","following_url":"https://api.github.com/users/moonmeister/following{/other_user}","gists_url":"https://api.github.com/users/moonmeister/gists{/gist_id}","starred_url":"https://api.github.com/users/moonmeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moonmeister/subscriptions","organizations_url":"https://api.github.com/users/moonmeister/orgs","repos_url":"https://api.github.com/users/moonmeister/repos","events_url":"https://api.github.com/users/moonmeister/events{/privacy}","received_events_url":"https://api.github.com/users/moonmeister/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T00:42:41Z","updated_at":"2018-03-07T00:42:41Z","author_association":"NONE","body":"@erquhart Looks like there has been some good work done on #922, I didn't see that when I posted/worked on this. The overall UI design looks identical. I guess then my main question is what's the difference? If the final UIs are going to be this similar and the defining differences in the plugin are features that may be very confusing for folks. If we define the specific use cases different and show that in how the UI functions then there is a case for different plugins. Things like autocomplete should be a feature of the plugin but should not require a different plugin. Thoughts?\r\n\r\nOn another note: I'm thinking it'd be really awesome if we could make it possible for a user to pass in a React object that defines how the the searched object renders in the preview and possibly the editor."}}
{"actor":{"display_login":"moonmeister"}}