{"action":"created","issue":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/891","labels_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/891/labels{/name}","comments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/891/comments","events_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/891/events","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/891","id":120827762,"number":891,"title":"Bl 2949reorganize toolbox","user":{"login":"JohnThomson","id":1360521,"avatar_url":"https://avatars.githubusercontent.com/u/1360521?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnThomson","html_url":"https://github.com/JohnThomson","followers_url":"https://api.github.com/users/JohnThomson/followers","following_url":"https://api.github.com/users/JohnThomson/following{/other_user}","gists_url":"https://api.github.com/users/JohnThomson/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnThomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnThomson/subscriptions","organizations_url":"https://api.github.com/users/JohnThomson/orgs","repos_url":"https://api.github.com/users/JohnThomson/repos","events_url":"https://api.github.com/users/JohnThomson/events{/privacy}","received_events_url":"https://api.github.com/users/JohnThomson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T17:35:58Z","updated_at":"2015-12-07T17:42:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/891","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/891","diff_url":"https://github.com/BloomBooks/BloomDesktop/pull/891.diff","patch_url":"https://github.com/BloomBooks/BloomDesktop/pull/891.patch"},"body":"This is a fairly massive change. I think it is probably easiest to review one commit at a time. Most of them have helpful descriptions. The first commit does not. If I could figure out how to revise that one description, it would indicate that this begins the process by making a typescript file for the toolbox as a whole (previously just javascript) and one for each tool, and removing explicit knowledge of individual tools from the code that manages the toolbox as a whole.\r\nThe other changes progressively reorganize the toolbox-related code. The overall objective is to gather knowledge about the toolbox and its tools into the appropriate places and remove it from everywhere else. Appropriate places are considered to be:\r\n- BloomBrowserUI/bookEdit/toolbox for anything in js/ts/html/jade/css/less etc land. The root folder should not have knowledge of individual tools, except that the main jade and html files know what components to include. Each tool has its own folder. Partly because of their close relationship, and partly still for historical reasons, some code in the decodableReader folder still deals with aspects of the leveledReader tool.\r\n- ToolBoxTool and a subclass for each tool for CS code involved in the tool implementations\r\n- ReadersHandler.cs for aspects of our local webserver that relate to the toolbox (maybe this should be renamed ToolboxHandler? But so far I think they are all for the reader tools.)\r\nThere are still a few spots where other code is aware of the reader tools. LibraryListView manages a toolstrip menu item for making a 'Reader' Bloompack, and the Bloompack creation code has some special case code for making such a bloompack. EnhancedImageServer knows to initialize ReadersHandler and delegate requests starting with 'reader'. I haven't found a good way to improve these further.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/bloombooks/bloomdesktop/891)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/comments/162603752","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/891#issuecomment-162603752","issue_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/891","id":162603752,"user":{"login":"JohnThomson","id":1360521,"avatar_url":"https://avatars.githubusercontent.com/u/1360521?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnThomson","html_url":"https://github.com/JohnThomson","followers_url":"https://api.github.com/users/JohnThomson/followers","following_url":"https://api.github.com/users/JohnThomson/following{/other_user}","gists_url":"https://api.github.com/users/JohnThomson/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnThomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnThomson/subscriptions","organizations_url":"https://api.github.com/users/JohnThomson/orgs","repos_url":"https://api.github.com/users/JohnThomson/repos","events_url":"https://api.github.com/users/JohnThomson/events{/privacy}","received_events_url":"https://api.github.com/users/JohnThomson/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T17:42:06Z","updated_at":"2015-12-07T17:42:06Z","body":"When we merge this, we can remove the TC dependency on libpalaoso. I've so far only manually edited the getDependencies scripts; once we update TC we could possibly regenerate them."}}