{"action":"created","issue":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721","labels_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721/labels{/name}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721/comments","events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721/events","html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721","id":92745180,"number":1721,"title":"React-ify scheduling check output tables","user":{"login":"jerrywu64","id":7077919,"avatar_url":"https://avatars.githubusercontent.com/u/7077919?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrywu64","html_url":"https://github.com/jerrywu64","followers_url":"https://api.github.com/users/jerrywu64/followers","following_url":"https://api.github.com/users/jerrywu64/following{/other_user}","gists_url":"https://api.github.com/users/jerrywu64/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrywu64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrywu64/subscriptions","organizations_url":"https://api.github.com/users/jerrywu64/orgs","repos_url":"https://api.github.com/users/jerrywu64/repos","events_url":"https://api.github.com/users/jerrywu64/events{/privacy}","received_events_url":"https://api.github.com/users/jerrywu64/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-02T22:03:49Z","updated_at":"2015-07-07T02:58:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721","html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721","diff_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721.diff","patch_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721.patch"},"body":"Addresses #1687.\r\n\r\nSome notes (some of which are mentioned in in-code comments):\r\nI didn't touch HTMLSCFormatter. It looks to me like there isn't actually any code which uses it (except for scheduling checks obviously except those now use JSONFormatter), but idk if it'll be useful in the future.\r\nJSONFormatter possibly contains redundant code, but maybe the code is useful for making sure things are formatted properly-- I didn't check preconditions/postconditions carefully enough to tell.\r\nI'm using JSON.parse() which apparently isn't supported in old browsers, idk if we care about that for a management page.\r\nChanges in public/media/styles/scheduling_checks.css are needed, but that's in .gitignore; stuff I added is below. (My devserver originally didn't even have this file, so I don't know what other people's  scheduling_checks.css files look like or if this conflicts.)\r\nScheduling check tables now enable sorting (upon header click) and greying-out of a row (upon row click, *provided that you make the appropriate change in scheduling_checks.css*. I didn't add any buttons to this effect, though (in my css I did do cursor:pointer-- although it's for the whole table so this is kind of silly), and the sorting can be kinda sketchy.\r\nSorting and greying does not persist across closing and reopening the scheduling check, let alone refreshing.\r\n\r\nAdditions to scheduling_checks.css:\r\ntable { border-spacing: 0; }\r\ntd { padding: 10px; cursor: pointer; }\r\nth { cursor: pointer; }\r\n.rowGreyed {\r\ncolor: grey;\r\n}\r\n.headerSelected {\r\n  color: blue;\r\n}\r\n\r\nPeople probably have opinions on the changes made, so feel free to comment. Although I note that if you want slightly different behavior upon clicking a row, if it's doable in css, you can probably just do it in css on your end."},"comment":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/comments/119056226","html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721#issuecomment-119056226","issue_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721","id":119056226,"user":{"login":"benjaminjkraft","id":111238,"avatar_url":"https://avatars.githubusercontent.com/u/111238?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminjkraft","html_url":"https://github.com/benjaminjkraft","followers_url":"https://api.github.com/users/benjaminjkraft/followers","following_url":"https://api.github.com/users/benjaminjkraft/following{/other_user}","gists_url":"https://api.github.com/users/benjaminjkraft/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminjkraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminjkraft/subscriptions","organizations_url":"https://api.github.com/users/benjaminjkraft/orgs","repos_url":"https://api.github.com/users/benjaminjkraft/repos","events_url":"https://api.github.com/users/benjaminjkraft/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminjkraft/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T02:58:24Z","updated_at":"2015-07-07T02:58:24Z","body":"Cool!  I don't particularly care about the exact CSS; I'd suggest maybe making the gray a little lighter, but I don't feel strongly.  I left a bunch of inline comments on the code style, but I think it overall looks good.\r\n\r\n> I'm using JSON.parse() which apparently isn't supported in old browsers, idk if we care about that for a management page.\r\n\r\nThat's fine, I don't think there are many admins using [IE 7](http://caniuse.com/#feat=json).\r\n\r\n> Changes in public/media/styles/scheduling_checks.css are needed, but that's in .gitignore; stuff I added is below. (My devserver originally didn't even have this file, so I don't know what other people's scheduling_checks.css files look like or if this conflicts.)\r\n\r\nYou want to look at `esp/public/media/default_styles/scheduling_checks.css`, and edit that.  Most dev servers just link `esp/public/media/styles/` to that directory; some older setups have the directories actually copied.\r\n\r\n> However, I also expect that if for whatever reason a scheduling check has two duplicate rows, it'll be impossible to apply different formatting to them, i.e. if you try to grey one, it'll also grey the other. (Although I haven't actually tested this.) Do people think this is an issue?\r\n\r\nI can't think of a reason this would happen (other than someone forgetting a `.distinct()` in a query), so I think it's fine."}}