{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/3682","repository_url":"https://api.github.com/repos/hypothesis/h","labels_url":"https://api.github.com/repos/hypothesis/h/issues/3682/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/3682/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/3682/events","html_url":"https://github.com/hypothesis/h/pull/3682","id":170863661,"number":3682,"title":"Restructure JS files","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-12T12:47:28Z","updated_at":"2016-08-16T11:03:50Z","closed_at":"2016-08-16T11:03:43Z","pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/3682","html_url":"https://github.com/hypothesis/h/pull/3682","diff_url":"https://github.com/hypothesis/h/pull/3682.diff","patch_url":"https://github.com/hypothesis/h/pull/3682.patch"},"body":"This restructures the `h/static/scripts` dir to move everything that is not a bundle entry point into its own directory. Files are currently grouped into `controllers` (classes that upgrade elements on the page) and `base` (shared code for reading settings, setting up Raven etc.) that is used by multiple sections of the site.\r\n\r\nI haven't re-arranged the 'test/' dir accordingly because we should agree on how we want to structure that first. I think we've got three options:\r\n\r\n1. Mirror the way our Python tests are structured (eg. `tests/controllers/shiny-button-controller-test.js`)\r\n2. Put the JS unit tests alongside their modules with a `.test.js` suffix, which is probably the most common JS convention (`controllers/shiny-button-controller.test.js`)\r\n3. Follow the convention in the client/browser-extension repos of having a 'test' folder inside each dir (`controllers/test/shiny-button-controller-test.js`)\r\n\r\n(2) or (3) would be my personal preference in terms of developer convenience and making it obvious which modules have tests but I think @nickstenning you expressed a preference for having a parallel dir structure in a PR comment recently.\r\n\r\n----\r\n\r\n- [x] Bikeshed layout of unit tests and move these files accordingly"},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/240071641","html_url":"https://github.com/hypothesis/h/pull/3682#issuecomment-240071641","issue_url":"https://api.github.com/repos/hypothesis/h/issues/3682","id":240071641,"user":{"login":"sheetaluk","id":502186,"avatar_url":"https://avatars.githubusercontent.com/u/502186?v=3","gravatar_id":"","url":"https://api.github.com/users/sheetaluk","html_url":"https://github.com/sheetaluk","followers_url":"https://api.github.com/users/sheetaluk/followers","following_url":"https://api.github.com/users/sheetaluk/following{/other_user}","gists_url":"https://api.github.com/users/sheetaluk/gists{/gist_id}","starred_url":"https://api.github.com/users/sheetaluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheetaluk/subscriptions","organizations_url":"https://api.github.com/users/sheetaluk/orgs","repos_url":"https://api.github.com/users/sheetaluk/repos","events_url":"https://api.github.com/users/sheetaluk/events{/privacy}","received_events_url":"https://api.github.com/users/sheetaluk/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T11:03:50Z","updated_at":"2016-08-16T11:03:50Z","body":"LGTM."}}
{"actor":{"display_login":"sheetaluk"}}