{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/38675581","id":38675581,"diff_hunk":"@@ -4,12 +4,17 @@ define(function (require) {\n   var moment = require('moment');\n \n   // Used only by the savedDashboards service, usually no reason to change this\n-  module.factory('SavedDashboard', function (courier) {\n+  module.factory('SavedDashboard', function (courier, Private) {\n+    var BoundToConfigObj = Private(require('ui/bound_to_config_obj'));\n \n     // SavedDashboard constructor. Usually you'd interact with an instance of this.\n     // ID is option, without it one will be generated on save.\n     _.class(SavedDashboard).inherits(courier.SavedObject);\n     function SavedDashboard(id) {\n+      var defaultDarkThemeConfig = new BoundToConfigObj({","path":"src/plugins/kibana/public/dashboard/services/_saved_dashboard.js","position":12,"original_position":12,"commit_id":"6d745c2fcc3255e55e248a40938b2917f8112380","original_commit_id":"6d745c2fcc3255e55e248a40938b2917f8112380","user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"body":"The reason I suggested using `BoundToConfigObj` is because it will keep the bound properties up to date when they change. This code dereferences the pattern on line 37 though, so subsequent updates to the config will not update the dashboards that have already been created. If instead the entire defaults object was a `BoundToConfigObj` then the existing values would get the updated defaults.","created_at":"2015-09-03T17:56:15Z","updated_at":"2015-09-03T17:56:15Z","html_url":"https://github.com/elastic/kibana/pull/4702#discussion_r38675581","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/4702","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/38675581"},"html":{"href":"https://github.com/elastic/kibana/pull/4702#discussion_r38675581"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4702"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/4702","id":42738074,"html_url":"https://github.com/elastic/kibana/pull/4702","diff_url":"https://github.com/elastic/kibana/pull/4702.diff","patch_url":"https://github.com/elastic/kibana/pull/4702.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/4702","number":4702,"state":"open","locked":false,"title":"Dark theme","user":{"login":"BigFunger","id":12193008,"avatar_url":"https://avatars.githubusercontent.com/u/12193008?v=3","gravatar_id":"","url":"https://api.github.com/users/BigFunger","html_url":"https://github.com/BigFunger","followers_url":"https://api.github.com/users/BigFunger/followers","following_url":"https://api.github.com/users/BigFunger/following{/other_user}","gists_url":"https://api.github.com/users/BigFunger/gists{/gist_id}","starred_url":"https://api.github.com/users/BigFunger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigFunger/subscriptions","organizations_url":"https://api.github.com/users/BigFunger/orgs","repos_url":"https://api.github.com/users/BigFunger/repos","events_url":"https://api.github.com/users/BigFunger/events{/privacy}","received_events_url":"https://api.github.com/users/BigFunger/received_events","type":"User","site_admin":false},"body":"Implements the dark theme\r\n\r\nAddresses #2906\r\n\r\n1. Moves hard-coded values in less files into named variables\r\n2. Creates theme switching and adds a dark theme\r\n - Adds default value to 'theme' config values\r\n - Adds logic to the application chrome that sets a class on the application node\r\n - Adds a new variable file and css overrides for the dark theme\r\n\r\nNotes: This is a first attempt at the dark theme. I think that the implementation of the theme itself may be a bit heavy handed, as it duplicates a lot of existing css/less. Also, the color decisions are my first attempt and should be easy enough to tweak.\r\n","created_at":"2015-08-18T19:24:54Z","updated_at":"2015-09-03T17:56:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"542cc0aaecb20618c64b7d2b49cdb47acdbdc5d0","assignee":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/4702/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/4702/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/4702/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/6d745c2fcc3255e55e248a40938b2917f8112380","head":{"label":"BigFunger:dark-theme","ref":"dark-theme","sha":"6d745c2fcc3255e55e248a40938b2917f8112380","user":{"login":"BigFunger","id":12193008,"avatar_url":"https://avatars.githubusercontent.com/u/12193008?v=3","gravatar_id":"","url":"https://api.github.com/users/BigFunger","html_url":"https://github.com/BigFunger","followers_url":"https://api.github.com/users/BigFunger/followers","following_url":"https://api.github.com/users/BigFunger/following{/other_user}","gists_url":"https://api.github.com/users/BigFunger/gists{/gist_id}","starred_url":"https://api.github.com/users/BigFunger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigFunger/subscriptions","organizations_url":"https://api.github.com/users/BigFunger/orgs","repos_url":"https://api.github.com/users/BigFunger/repos","events_url":"https://api.github.com/users/BigFunger/events{/privacy}","received_events_url":"https://api.github.com/users/BigFunger/received_events","type":"User","site_admin":false},"repo":{"id":35180828,"name":"kibana","full_name":"BigFunger/kibana","owner":{"login":"BigFunger","id":12193008,"avatar_url":"https://avatars.githubusercontent.com/u/12193008?v=3","gravatar_id":"","url":"https://api.github.com/users/BigFunger","html_url":"https://github.com/BigFunger","followers_url":"https://api.github.com/users/BigFunger/followers","following_url":"https://api.github.com/users/BigFunger/following{/other_user}","gists_url":"https://api.github.com/users/BigFunger/gists{/gist_id}","starred_url":"https://api.github.com/users/BigFunger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigFunger/subscriptions","organizations_url":"https://api.github.com/users/BigFunger/orgs","repos_url":"https://api.github.com/users/BigFunger/repos","events_url":"https://api.github.com/users/BigFunger/events{/privacy}","received_events_url":"https://api.github.com/users/BigFunger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BigFunger/kibana","description":"Kibana","fork":true,"url":"https://api.github.com/repos/BigFunger/kibana","forks_url":"https://api.github.com/repos/BigFunger/kibana/forks","keys_url":"https://api.github.com/repos/BigFunger/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BigFunger/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BigFunger/kibana/teams","hooks_url":"https://api.github.com/repos/BigFunger/kibana/hooks","issue_events_url":"https://api.github.com/repos/BigFunger/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/BigFunger/kibana/events","assignees_url":"https://api.github.com/repos/BigFunger/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/BigFunger/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/BigFunger/kibana/tags","blobs_url":"https://api.github.com/repos/BigFunger/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BigFunger/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BigFunger/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/BigFunger/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BigFunger/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/BigFunger/kibana/languages","stargazers_url":"https://api.github.com/repos/BigFunger/kibana/stargazers","contributors_url":"https://api.github.com/repos/BigFunger/kibana/contributors","subscribers_url":"https://api.github.com/repos/BigFunger/kibana/subscribers","subscription_url":"https://api.github.com/repos/BigFunger/kibana/subscription","commits_url":"https://api.github.com/repos/BigFunger/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/BigFunger/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/BigFunger/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/BigFunger/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/BigFunger/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/BigFunger/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BigFunger/kibana/merges","archive_url":"https://api.github.com/repos/BigFunger/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BigFunger/kibana/downloads","issues_url":"https://api.github.com/repos/BigFunger/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/BigFunger/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/BigFunger/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/BigFunger/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BigFunger/kibana/labels{/name}","releases_url":"https://api.github.com/repos/BigFunger/kibana/releases{/id}","created_at":"2015-05-06T20:19:18Z","updated_at":"2015-06-03T17:01:46Z","pushed_at":"2015-09-03T15:44:41Z","git_url":"git://github.com/BigFunger/kibana.git","ssh_url":"git@github.com:BigFunger/kibana.git","clone_url":"https://github.com/BigFunger/kibana.git","svn_url":"https://github.com/BigFunger/kibana","homepage":"https://www.elastic.co/products/kibana","size":62586,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"1be7932e11d2066696c93233f64070af5f70bc57","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":7833168,"name":"kibana","full_name":"elastic/kibana","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/kibana","description":"Kibana","fork":false,"url":"https://api.github.com/repos/elastic/kibana","forks_url":"https://api.github.com/repos/elastic/kibana/forks","keys_url":"https://api.github.com/repos/elastic/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/kibana/teams","hooks_url":"https://api.github.com/repos/elastic/kibana/hooks","issue_events_url":"https://api.github.com/repos/elastic/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/kibana/events","assignees_url":"https://api.github.com/repos/elastic/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/kibana/tags","blobs_url":"https://api.github.com/repos/elastic/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/kibana/languages","stargazers_url":"https://api.github.com/repos/elastic/kibana/stargazers","contributors_url":"https://api.github.com/repos/elastic/kibana/contributors","subscribers_url":"https://api.github.com/repos/elastic/kibana/subscribers","subscription_url":"https://api.github.com/repos/elastic/kibana/subscription","commits_url":"https://api.github.com/repos/elastic/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/kibana/merges","archive_url":"https://api.github.com/repos/elastic/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/kibana/downloads","issues_url":"https://api.github.com/repos/elastic/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/kibana/labels{/name}","releases_url":"https://api.github.com/repos/elastic/kibana/releases{/id}","created_at":"2013-01-26T04:00:59Z","updated_at":"2015-09-03T14:02:11Z","pushed_at":"2015-09-03T15:44:42Z","git_url":"git://github.com/elastic/kibana.git","ssh_url":"git@github.com:elastic/kibana.git","clone_url":"https://github.com/elastic/kibana.git","svn_url":"https://github.com/elastic/kibana","homepage":"https://www.elastic.co/products/kibana","size":89711,"stargazers_count":4063,"watchers_count":4063,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1491,"mirror_url":null,"open_issues_count":612,"forks":1491,"open_issues":612,"watchers":4063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4702"},"html":{"href":"https://github.com/elastic/kibana/pull/4702"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/4702"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/4702/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4702/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4702/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/6d745c2fcc3255e55e248a40938b2917f8112380"}}}}