Add status reports to sonar.
Review Request #7574 — Created Aug. 8, 2015 and submitted
This is a very large change which adds a big new status reports feature to
sonar. This contains a lot of individual pieces, along with a number of
refactors to clean things up.At a high level, the new features are:
- A "My Status Reports" page which is aimed towards students. This shows a list
of the due dates that apply to them. These are color coded/labeled as either
"Submitted", "Past Due", "Due Soon", or nothing. Clicking on a due date will
open up the editor view. - An "All Status Reports" view, which is only seen by admins. This shows all of
the due dates for all groups. Users are sorted into two columns: "Submitted"
and "Not Submitted". Any dates which are in the past are color-coded either
red or green depending on whether any status reports are missing. - A status report editor view. This is pre-populated with the example text from
our welcome packet. The editor can be flipped to a "preview" mode, and has a
neato fullscreen mode that presents a side-by-side view. - A status report reading view, which just shows the rendered markdown text.
- Links to the new status reports from the user detail view.
Various things have been refactored, mostly related to the "ready" state of the
application. Things seem to be migrating towards a steady state here so I'll
probably follow up later with a new view class that handles all of this. There
was also some very confusing issues with the parsing of the "me" user, so I've
switched that out to just pre-populate the userID for the current user and then
match that up once all the users are fetched from the API.
Exercised all of the functionality a ton.
Description | From | Last Updated |
---|---|---|
Leftover from debugging? |
brennie | |
You're inconsistent with spacing between top-level definitions. |
brennie | |
You can use submitted.forEach here. |
brennie | |
Leftover from debugging? |
brennie | |
Use an arrow function. |
brennie | |
Use an arrow function. |
brennie | |
Use an arrow function. |
brennie | |
Do we care about line width here? |
brennie | |
This is indented strangely. I would expect the body to be indented relative to the function keyword. |
brennie | |
Same here. |
brennie | |
Shouldn't this be this.get('users').get(window.userID) ? |
brennie | |
Blank line between these. |
brennie | |
Shouldn't this use <%- -> ? |
brennie | |
Should 200 be a constant somewhere? |
brennie | |
If this is listening for resize events, maybe we want to _.debounce instead of _.throttle ? |
brennie | |
Use an arrow function. |
brennie | |
Should this use <%- ? |
brennie | |
Assuming dueDates is an array, you can use dueDates.each((dueDate) => { // ... }); |
brennie | |
I'm not very familiar with mongo/mongoose, but shouldn't this be a Date ? Or is this a foreign key-esque pointer … |
brennie | |
Blank line between these. |
brennie |
-
Tool: Pyflakes Ignored Files: package.json lib/frontend/config.js lib/frontend/application.js lib/frontend/user-detail-view.js lib/frontend/util.js lib/api.js views/student-list.handlebars lib/frontend/status-report-editor-view.js lib/frontend/all-status-reports-view.js lib/frontend/sidebar-view.js lib/frontend/calendar-view.js lib/frontend/application-view.js lib/frontend/confirm.js lib/frontend/status-report-checker-view.js lib/schema.js lib/frontend/my-status-reports-view.js css/style.less lib/frontend/status-report-reading-view.js lib/routes.js lib/frontend/models.js Tool: PEP8 Style Checker Ignored Files: package.json lib/frontend/config.js lib/frontend/application.js lib/frontend/user-detail-view.js lib/frontend/util.js lib/api.js views/student-list.handlebars lib/frontend/status-report-editor-view.js lib/frontend/all-status-reports-view.js lib/frontend/sidebar-view.js lib/frontend/calendar-view.js lib/frontend/application-view.js lib/frontend/confirm.js lib/frontend/status-report-checker-view.js lib/schema.js lib/frontend/my-status-reports-view.js css/style.less lib/frontend/status-report-reading-view.js lib/routes.js lib/frontend/models.js
- Change Summary:
-
Use
Array.forEach
and fat arrow functions everywhere that's appropriate. - Commit:
-
7e90bb7955154bd7ab407c85c6538d9802691d214c04f3e78a01fc16e628c4a3d330b55d73bfa570
-
Tool: PEP8 Style Checker Ignored Files: lib/frontend/user-detail-view.js lib/frontend/confirm.js lib/frontend/config.js lib/frontend/application-view.js css/style.less lib/routes.js lib/frontend/models.js package.json lib/frontend/my-status-reports-view.js lib/frontend/sidebar-view.js lib/schema.js lib/frontend/util.js lib/frontend/collection-view.js lib/frontend/status-report-editor-view.js lib/frontend/application.js lib/frontend/header-view.js lib/frontend/calendar-view.js lib/api.js views/student-list.handlebars lib/frontend/all-status-reports-view.js lib/frontend/status-report-checker-view.js lib/frontend/status-report-reading-view.js Tool: Pyflakes Ignored Files: lib/frontend/user-detail-view.js lib/frontend/confirm.js lib/frontend/config.js lib/frontend/application-view.js css/style.less lib/routes.js lib/frontend/models.js package.json lib/frontend/my-status-reports-view.js lib/frontend/sidebar-view.js lib/schema.js lib/frontend/util.js lib/frontend/collection-view.js lib/frontend/status-report-editor-view.js lib/frontend/application.js lib/frontend/header-view.js lib/frontend/calendar-view.js lib/api.js views/student-list.handlebars lib/frontend/all-status-reports-view.js lib/frontend/status-report-checker-view.js lib/frontend/status-report-reading-view.js