{"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/22904392","id":22904392,"diff_hunk":"@@ -64,6 +67,10 @@ define(function (require, exports, module) {\n         this._color = tinycolor(color);\n         this._originalColor = color;\n         this._redoColor = null;\n+        this._isUpperCase = PreferencesManager.get(\"uppercaseColors\");\n+        PreferencesManager.on(\"change\", \"uppercaseColors\", function () {\n+            this._isUpperCase = PreferencesManager.get(\"uppercaseColors\");\n+        }.bind(this));","path":"src/extensions/default/InlineColorEditor/ColorEditor.js","position":37,"original_position":37,"commit_id":"480666f50c647ba653183e42105b6390ee538192","original_commit_id":"480666f50c647ba653183e42105b6390ee538192","user":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=3","gravatar_id":"","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"body":"Good catch! It sucks that JS objects have a constructor but not a destructor.\r\n\r\n@le717 You could add a `ColorEditor.destroy()` method to remove the listener, which could be called from the `InlineColorEditor.onClosed()` method.","created_at":"2015-01-13T23:19:19Z","updated_at":"2015-01-13T23:19:19Z","html_url":"https://github.com/adobe/brackets/pull/9596#discussion_r22904392","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/9596","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/22904392"},"html":{"href":"https://github.com/adobe/brackets/pull/9596#discussion_r22904392"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9596"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/9596","id":22974908,"html_url":"https://github.com/adobe/brackets/pull/9596","diff_url":"https://github.com/adobe/brackets/pull/9596.diff","patch_url":"https://github.com/adobe/brackets/pull/9596.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/9596","number":9596,"state":"open","locked":false,"title":"Use upper/lowercase colors in Inline Color Editor","user":{"login":"le717","id":3382464,"avatar_url":"https://avatars.githubusercontent.com/u/3382464?v=3","gravatar_id":"","url":"https://api.github.com/users/le717","html_url":"https://github.com/le717","followers_url":"https://api.github.com/users/le717/followers","following_url":"https://api.github.com/users/le717/following{/other_user}","gists_url":"https://api.github.com/users/le717/gists{/gist_id}","starred_url":"https://api.github.com/users/le717/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/le717/subscriptions","organizations_url":"https://api.github.com/users/le717/orgs","repos_url":"https://api.github.com/users/le717/repos","events_url":"https://api.github.com/users/le717/events{/privacy}","received_events_url":"https://api.github.com/users/le717/received_events","type":"User","site_admin":false},"body":"For #9519.\r\n\r\n### Features ###\r\n* Preserves case between value conversions and slider changes\r\n* Related code updated to be case-insensitive\r\n* New tests for conversion, with all existing tests passing\r\n* Also made some minor code style fixes\r\n\r\nThis code is rather confusing (as already documented), so it was a bit of a challenge to get this written up. I once spent 30 digging around in various places for a one-line fix.\r\n\r\nNow for the issues present here:\r\n* This requires an update to [TinyColor v1.1.0+](https://github.com/bgrins/TinyColor/releases/tag/1.1.0), included with this PR. The creator refactored the library quite a bit since the v0.9.10 version currently used. TinyColor also unconditionally converts input to lowercase, which would make us have to keep track if the input is uppercase or not (which, in line with the previously documented issues, would be very hard because of the changing types). I have worked with Brian on the aforementioned patch to store the original input, which in turn makes this patch much easier to work out.","created_at":"2014-10-19T00:34:00Z","updated_at":"2015-01-13T23:19:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a843cc6b563d9a5f23dde47d55f0d4f825eba755","assignee":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=3","gravatar_id":"","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/9596/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/9596/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/9596/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/480666f50c647ba653183e42105b6390ee538192","head":{"label":"le717:issue-9519-take2","ref":"issue-9519-take2","sha":"480666f50c647ba653183e42105b6390ee538192","user":{"login":"le717","id":3382464,"avatar_url":"https://avatars.githubusercontent.com/u/3382464?v=3","gravatar_id":"","url":"https://api.github.com/users/le717","html_url":"https://github.com/le717","followers_url":"https://api.github.com/users/le717/followers","following_url":"https://api.github.com/users/le717/following{/other_user}","gists_url":"https://api.github.com/users/le717/gists{/gist_id}","starred_url":"https://api.github.com/users/le717/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/le717/subscriptions","organizations_url":"https://api.github.com/users/le717/orgs","repos_url":"https://api.github.com/users/le717/repos","events_url":"https://api.github.com/users/le717/events{/privacy}","received_events_url":"https://api.github.com/users/le717/received_events","type":"User","site_admin":false},"repo":{"id":19585345,"name":"brackets","full_name":"le717/brackets","owner":{"login":"le717","id":3382464,"avatar_url":"https://avatars.githubusercontent.com/u/3382464?v=3","gravatar_id":"","url":"https://api.github.com/users/le717","html_url":"https://github.com/le717","followers_url":"https://api.github.com/users/le717/followers","following_url":"https://api.github.com/users/le717/following{/other_user}","gists_url":"https://api.github.com/users/le717/gists{/gist_id}","starred_url":"https://api.github.com/users/le717/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/le717/subscriptions","organizations_url":"https://api.github.com/users/le717/orgs","repos_url":"https://api.github.com/users/le717/repos","events_url":"https://api.github.com/users/le717/events{/privacy}","received_events_url":"https://api.github.com/users/le717/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/le717/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":true,"url":"https://api.github.com/repos/le717/brackets","forks_url":"https://api.github.com/repos/le717/brackets/forks","keys_url":"https://api.github.com/repos/le717/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/le717/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/le717/brackets/teams","hooks_url":"https://api.github.com/repos/le717/brackets/hooks","issue_events_url":"https://api.github.com/repos/le717/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/le717/brackets/events","assignees_url":"https://api.github.com/repos/le717/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/le717/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/le717/brackets/tags","blobs_url":"https://api.github.com/repos/le717/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/le717/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/le717/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/le717/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/le717/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/le717/brackets/languages","stargazers_url":"https://api.github.com/repos/le717/brackets/stargazers","contributors_url":"https://api.github.com/repos/le717/brackets/contributors","subscribers_url":"https://api.github.com/repos/le717/brackets/subscribers","subscription_url":"https://api.github.com/repos/le717/brackets/subscription","commits_url":"https://api.github.com/repos/le717/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/le717/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/le717/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/le717/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/le717/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/le717/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/le717/brackets/merges","archive_url":"https://api.github.com/repos/le717/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/le717/brackets/downloads","issues_url":"https://api.github.com/repos/le717/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/le717/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/le717/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/le717/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/le717/brackets/labels{/name}","releases_url":"https://api.github.com/repos/le717/brackets/releases{/id}","created_at":"2014-05-08T19:03:11Z","updated_at":"2015-01-08T19:27:56Z","pushed_at":"2015-01-13T15:57:47Z","git_url":"git://github.com/le717/brackets.git","ssh_url":"git@github.com:le717/brackets.git","clone_url":"https://github.com/le717/brackets.git","svn_url":"https://github.com/le717/brackets","homepage":"http://brackets.io","size":75265,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"5e7fd6031b8f72dc0e688b5d8ee176a87787edd3","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2015-01-13T22:02:21Z","pushed_at":"2015-01-13T22:02:21Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":304298,"stargazers_count":20563,"watchers_count":20563,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4280,"mirror_url":null,"open_issues_count":1125,"forks":4280,"open_issues":1125,"watchers":20563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9596"},"html":{"href":"https://github.com/adobe/brackets/pull/9596"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/9596"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/9596/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9596/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9596/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/480666f50c647ba653183e42105b6390ee538192"}}}}