{"action":"created","comment":{"url":"https://api.github.com/repos/syncthing/syncthing/pulls/comments/55642429","id":55642429,"diff_hunk":"@@ -11,11 +11,22 @@ <h4 class=\"modal-title\">\n         <form role=\"form\" name=\"folderEditor\">\n           <div class=\"row\">\n             <div class=\"col-md-12\">\n+              <div class=\"form-group\" ng-class=\"{'has-error': folderEditor.folderLabel.$invalid && folderEditor.folderLabel.$dirty}\">\n+                <label for=\"folderLabel\"><span translate>Folder Label</span></label>\n+                <input name=\"folderLabel\" id=\"folderLabel\" class=\"form-control\" type=\"text\" ng-model=\"currentFolder.label\" ng-if=\"editingExisting\"/>\n+                <input name=\"folderLabel\" id=\"folderLabel\" class=\"form-control\" type=\"text\" ng-model=\"currentFolder.label\" ng-if=\"!editingExisting &&  currentFolder.viewFlags.importFromOtherDevice\" value=\"{{currentFolder.label}}\"/>","path":"gui/default/syncthing/folder/editFolderModalView.html","position":7,"original_position":7,"commit_id":"74217f9e1ec3c48f8678197e0008647e5b900ecc","original_commit_id":"74217f9e1ec3c48f8678197e0008647e5b900ecc","user":{"login":"calmh","id":125426,"avatar_url":"https://avatars.githubusercontent.com/u/125426?v=3","gravatar_id":"","url":"https://api.github.com/users/calmh","html_url":"https://github.com/calmh","followers_url":"https://api.github.com/users/calmh/followers","following_url":"https://api.github.com/users/calmh/following{/other_user}","gists_url":"https://api.github.com/users/calmh/gists{/gist_id}","starred_url":"https://api.github.com/users/calmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calmh/subscriptions","organizations_url":"https://api.github.com/users/calmh/orgs","repos_url":"https://api.github.com/users/calmh/repos","events_url":"https://api.github.com/users/calmh/events{/privacy}","received_events_url":"https://api.github.com/users/calmh/received_events","type":"User","site_admin":false},"body":"Quick explanation of why we have the the duplication and if on importFromOtherDevice here? I'm sure there's a good reason, it's just not obvious to me when reading this. :)","created_at":"2016-03-10T07:29:09Z","updated_at":"2016-03-10T07:29:09Z","html_url":"https://github.com/syncthing/syncthing/pull/2668#discussion_r55642429","pull_request_url":"https://api.github.com/repos/syncthing/syncthing/pulls/2668","_links":{"self":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/comments/55642429"},"html":{"href":"https://github.com/syncthing/syncthing/pull/2668#discussion_r55642429"},"pull_request":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/2668"}}},"pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing/pulls/2668","id":55215548,"html_url":"https://github.com/syncthing/syncthing/pull/2668","diff_url":"https://github.com/syncthing/syncthing/pull/2668.diff","patch_url":"https://github.com/syncthing/syncthing/pull/2668.patch","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/2668","number":2668,"state":"open","locked":false,"title":"proposal for folder labels","user":{"login":"lkwg82","id":1891171,"avatar_url":"https://avatars.githubusercontent.com/u/1891171?v=3","gravatar_id":"","url":"https://api.github.com/users/lkwg82","html_url":"https://github.com/lkwg82","followers_url":"https://api.github.com/users/lkwg82/followers","following_url":"https://api.github.com/users/lkwg82/following{/other_user}","gists_url":"https://api.github.com/users/lkwg82/gists{/gist_id}","starred_url":"https://api.github.com/users/lkwg82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkwg82/subscriptions","organizations_url":"https://api.github.com/users/lkwg82/orgs","repos_url":"https://api.github.com/users/lkwg82/repos","events_url":"https://api.github.com/users/lkwg82/events{/privacy}","received_events_url":"https://api.github.com/users/lkwg82/received_events","type":"User","site_admin":false},"body":"I read the thread at https://forum.syncthing.net/t/friendly-names-for-shared-folders/2477 and #966.\r\n\r\nIt seems no one actually tried it. I digged into the code and had an idea. I tried and it runs.\r\n\r\nDisclaimer: I'm new to golang and angularjs. I lost the thread in both discussions, sry.\r\n\r\nThe idea I implemented is:\r\n- have local a local label for the folder\r\n- label is saved as attribute in folder config\r\n- label is displayed instead of folder-id (when not missing)\r\n- no protocol change\r\n- seems to be compatible with current version\r\n\r\nSome screenshots are attached.\r\n![syncthing-1](https://cloud.githubusercontent.com/assets/1891171/12144185/6724f732-b486-11e5-87d6-9a01f19e1869.jpg)\r\n\r\nautogenerating folder id based on label\r\n![syncthing-2](https://cloud.githubusercontent.com/assets/1891171/12144190/6ad13f3a-b486-11e5-8bbe-42ce345761b1.jpg)\r\n\r\n![syncthing-3](https://cloud.githubusercontent.com/assets/1891171/12144200/7787c956-b486-11e5-8022-54f83062b3c7.jpg)\r\n\r\n\r\n(I expect some changes and discussion on this. Later on if and when we are going to merge this, I catch up 'contributing code'-tasks)\r\n\r\n----\r\n\r\n- [x] Add friendly label as an extra field per folder\r\n- [x] When adding a new folder, suggest a random-ish folder ID but allow the user to set it to what they want\r\n- [x] Announce the friendly label to other devices, so they have the option of adopting it\r\n - [x] emit as event (protocol layer)\r\n - [x] integrate into UI (translation etc.)\r\n- [x] When adding a new folder from a share request, prefill both folder ID and label, allowing label to be edited at will (but not ID as it would not make sense to do so at that point)\r\n- [x] UX: Some care needs to be taken to make sure it's clear to the user what the distinction is between the two fields; i.e. that one actually matters for correct operation and the other does not.","created_at":"2016-01-06T14:02:56Z","updated_at":"2016-03-10T07:29:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd933d16cb0d7c594ff0f636390e3cc2de351973","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/syncthing/syncthing/pulls/2668/commits","review_comments_url":"https://api.github.com/repos/syncthing/syncthing/pulls/2668/comments","review_comment_url":"https://api.github.com/repos/syncthing/syncthing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/2668/comments","statuses_url":"https://api.github.com/repos/syncthing/syncthing/statuses/74217f9e1ec3c48f8678197e0008647e5b900ecc","head":{"label":"lkwg82:issue-966-folder-labels-instead-of-unique-ids","ref":"issue-966-folder-labels-instead-of-unique-ids","sha":"74217f9e1ec3c48f8678197e0008647e5b900ecc","user":{"login":"lkwg82","id":1891171,"avatar_url":"https://avatars.githubusercontent.com/u/1891171?v=3","gravatar_id":"","url":"https://api.github.com/users/lkwg82","html_url":"https://github.com/lkwg82","followers_url":"https://api.github.com/users/lkwg82/followers","following_url":"https://api.github.com/users/lkwg82/following{/other_user}","gists_url":"https://api.github.com/users/lkwg82/gists{/gist_id}","starred_url":"https://api.github.com/users/lkwg82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkwg82/subscriptions","organizations_url":"https://api.github.com/users/lkwg82/orgs","repos_url":"https://api.github.com/users/lkwg82/repos","events_url":"https://api.github.com/users/lkwg82/events{/privacy}","received_events_url":"https://api.github.com/users/lkwg82/received_events","type":"User","site_admin":false},"repo":{"id":49137539,"name":"syncthing","full_name":"lkwg82/syncthing","owner":{"login":"lkwg82","id":1891171,"avatar_url":"https://avatars.githubusercontent.com/u/1891171?v=3","gravatar_id":"","url":"https://api.github.com/users/lkwg82","html_url":"https://github.com/lkwg82","followers_url":"https://api.github.com/users/lkwg82/followers","following_url":"https://api.github.com/users/lkwg82/following{/other_user}","gists_url":"https://api.github.com/users/lkwg82/gists{/gist_id}","starred_url":"https://api.github.com/users/lkwg82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkwg82/subscriptions","organizations_url":"https://api.github.com/users/lkwg82/orgs","repos_url":"https://api.github.com/users/lkwg82/repos","events_url":"https://api.github.com/users/lkwg82/events{/privacy}","received_events_url":"https://api.github.com/users/lkwg82/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lkwg82/syncthing","description":"Open Source Continuous File Synchronization","fork":true,"url":"https://api.github.com/repos/lkwg82/syncthing","forks_url":"https://api.github.com/repos/lkwg82/syncthing/forks","keys_url":"https://api.github.com/repos/lkwg82/syncthing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lkwg82/syncthing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lkwg82/syncthing/teams","hooks_url":"https://api.github.com/repos/lkwg82/syncthing/hooks","issue_events_url":"https://api.github.com/repos/lkwg82/syncthing/issues/events{/number}","events_url":"https://api.github.com/repos/lkwg82/syncthing/events","assignees_url":"https://api.github.com/repos/lkwg82/syncthing/assignees{/user}","branches_url":"https://api.github.com/repos/lkwg82/syncthing/branches{/branch}","tags_url":"https://api.github.com/repos/lkwg82/syncthing/tags","blobs_url":"https://api.github.com/repos/lkwg82/syncthing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lkwg82/syncthing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lkwg82/syncthing/git/refs{/sha}","trees_url":"https://api.github.com/repos/lkwg82/syncthing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lkwg82/syncthing/statuses/{sha}","languages_url":"https://api.github.com/repos/lkwg82/syncthing/languages","stargazers_url":"https://api.github.com/repos/lkwg82/syncthing/stargazers","contributors_url":"https://api.github.com/repos/lkwg82/syncthing/contributors","subscribers_url":"https://api.github.com/repos/lkwg82/syncthing/subscribers","subscription_url":"https://api.github.com/repos/lkwg82/syncthing/subscription","commits_url":"https://api.github.com/repos/lkwg82/syncthing/commits{/sha}","git_commits_url":"https://api.github.com/repos/lkwg82/syncthing/git/commits{/sha}","comments_url":"https://api.github.com/repos/lkwg82/syncthing/comments{/number}","issue_comment_url":"https://api.github.com/repos/lkwg82/syncthing/issues/comments{/number}","contents_url":"https://api.github.com/repos/lkwg82/syncthing/contents/{+path}","compare_url":"https://api.github.com/repos/lkwg82/syncthing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lkwg82/syncthing/merges","archive_url":"https://api.github.com/repos/lkwg82/syncthing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lkwg82/syncthing/downloads","issues_url":"https://api.github.com/repos/lkwg82/syncthing/issues{/number}","pulls_url":"https://api.github.com/repos/lkwg82/syncthing/pulls{/number}","milestones_url":"https://api.github.com/repos/lkwg82/syncthing/milestones{/number}","notifications_url":"https://api.github.com/repos/lkwg82/syncthing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lkwg82/syncthing/labels{/name}","releases_url":"https://api.github.com/repos/lkwg82/syncthing/releases{/id}","deployments_url":"https://api.github.com/repos/lkwg82/syncthing/deployments","created_at":"2016-01-06T13:42:10Z","updated_at":"2016-01-06T13:42:13Z","pushed_at":"2016-03-09T22:36:06Z","git_url":"git://github.com/lkwg82/syncthing.git","ssh_url":"git@github.com:lkwg82/syncthing.git","clone_url":"https://github.com/lkwg82/syncthing.git","svn_url":"https://github.com/lkwg82/syncthing","homepage":"http://forum.syncthing.net/","size":61831,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"syncthing:master","ref":"master","sha":"9b1bebc9b289e3d85cb653d58982e64999dff501","user":{"login":"syncthing","id":7628018,"avatar_url":"https://avatars.githubusercontent.com/u/7628018?v=3","gravatar_id":"","url":"https://api.github.com/users/syncthing","html_url":"https://github.com/syncthing","followers_url":"https://api.github.com/users/syncthing/followers","following_url":"https://api.github.com/users/syncthing/following{/other_user}","gists_url":"https://api.github.com/users/syncthing/gists{/gist_id}","starred_url":"https://api.github.com/users/syncthing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syncthing/subscriptions","organizations_url":"https://api.github.com/users/syncthing/orgs","repos_url":"https://api.github.com/users/syncthing/repos","events_url":"https://api.github.com/users/syncthing/events{/privacy}","received_events_url":"https://api.github.com/users/syncthing/received_events","type":"Organization","site_admin":false},"repo":{"id":14712850,"name":"syncthing","full_name":"syncthing/syncthing","owner":{"login":"syncthing","id":7628018,"avatar_url":"https://avatars.githubusercontent.com/u/7628018?v=3","gravatar_id":"","url":"https://api.github.com/users/syncthing","html_url":"https://github.com/syncthing","followers_url":"https://api.github.com/users/syncthing/followers","following_url":"https://api.github.com/users/syncthing/following{/other_user}","gists_url":"https://api.github.com/users/syncthing/gists{/gist_id}","starred_url":"https://api.github.com/users/syncthing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syncthing/subscriptions","organizations_url":"https://api.github.com/users/syncthing/orgs","repos_url":"https://api.github.com/users/syncthing/repos","events_url":"https://api.github.com/users/syncthing/events{/privacy}","received_events_url":"https://api.github.com/users/syncthing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/syncthing/syncthing","description":"Open Source Continuous File Synchronization","fork":false,"url":"https://api.github.com/repos/syncthing/syncthing","forks_url":"https://api.github.com/repos/syncthing/syncthing/forks","keys_url":"https://api.github.com/repos/syncthing/syncthing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syncthing/syncthing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syncthing/syncthing/teams","hooks_url":"https://api.github.com/repos/syncthing/syncthing/hooks","issue_events_url":"https://api.github.com/repos/syncthing/syncthing/issues/events{/number}","events_url":"https://api.github.com/repos/syncthing/syncthing/events","assignees_url":"https://api.github.com/repos/syncthing/syncthing/assignees{/user}","branches_url":"https://api.github.com/repos/syncthing/syncthing/branches{/branch}","tags_url":"https://api.github.com/repos/syncthing/syncthing/tags","blobs_url":"https://api.github.com/repos/syncthing/syncthing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syncthing/syncthing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syncthing/syncthing/git/refs{/sha}","trees_url":"https://api.github.com/repos/syncthing/syncthing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syncthing/syncthing/statuses/{sha}","languages_url":"https://api.github.com/repos/syncthing/syncthing/languages","stargazers_url":"https://api.github.com/repos/syncthing/syncthing/stargazers","contributors_url":"https://api.github.com/repos/syncthing/syncthing/contributors","subscribers_url":"https://api.github.com/repos/syncthing/syncthing/subscribers","subscription_url":"https://api.github.com/repos/syncthing/syncthing/subscription","commits_url":"https://api.github.com/repos/syncthing/syncthing/commits{/sha}","git_commits_url":"https://api.github.com/repos/syncthing/syncthing/git/commits{/sha}","comments_url":"https://api.github.com/repos/syncthing/syncthing/comments{/number}","issue_comment_url":"https://api.github.com/repos/syncthing/syncthing/issues/comments{/number}","contents_url":"https://api.github.com/repos/syncthing/syncthing/contents/{+path}","compare_url":"https://api.github.com/repos/syncthing/syncthing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syncthing/syncthing/merges","archive_url":"https://api.github.com/repos/syncthing/syncthing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syncthing/syncthing/downloads","issues_url":"https://api.github.com/repos/syncthing/syncthing/issues{/number}","pulls_url":"https://api.github.com/repos/syncthing/syncthing/pulls{/number}","milestones_url":"https://api.github.com/repos/syncthing/syncthing/milestones{/number}","notifications_url":"https://api.github.com/repos/syncthing/syncthing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syncthing/syncthing/labels{/name}","releases_url":"https://api.github.com/repos/syncthing/syncthing/releases{/id}","deployments_url":"https://api.github.com/repos/syncthing/syncthing/deployments","created_at":"2013-11-26T09:48:21Z","updated_at":"2016-03-10T03:51:28Z","pushed_at":"2016-03-10T06:50:32Z","git_url":"git://github.com/syncthing/syncthing.git","ssh_url":"git@github.com:syncthing/syncthing.git","clone_url":"https://github.com/syncthing/syncthing.git","svn_url":"https://github.com/syncthing/syncthing","homepage":"http://forum.syncthing.net/","size":94976,"stargazers_count":11455,"watchers_count":11455,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":874,"mirror_url":null,"open_issues_count":183,"forks":874,"open_issues":183,"watchers":11455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/2668"},"html":{"href":"https://github.com/syncthing/syncthing/pull/2668"},"issue":{"href":"https://api.github.com/repos/syncthing/syncthing/issues/2668"},"comments":{"href":"https://api.github.com/repos/syncthing/syncthing/issues/2668/comments"},"review_comments":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/2668/comments"},"review_comment":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/syncthing/syncthing/pulls/2668/commits"},"statuses":{"href":"https://api.github.com/repos/syncthing/syncthing/statuses/74217f9e1ec3c48f8678197e0008647e5b900ecc"}}}}