React TODO #1696

Closed
lvwrence opened this Issue Aug 21, 2014 · 2 comments

Comments

Projects
None yet
4 participants
@lvwrence
Contributor

lvwrence commented Aug 21, 2014

The major tables in MarkUs have been converted from Prototype to React, but there are still some things left to do w/r/t React. This issue aims to list such remaining tasks.

  • Some tables still remain to be converted. The repo_browser/file_manager and perhaps some other tables still use FilterTable, which depend on Prototype. Convert the tables to React, using one of the existing tables as a reference/guide/template.
  • I think we have a success div defined somewhere in CSS that is not being used. Create a React component similar to ErrorDiv that will show whenever an action is successful.
  • The GradersManager component is getting really bulky. It would be nice to refactor this with a fresh pair of eyes. One straightforward but not uninvolved improvement is to implement the use of selectable and onSelectedRowsChange (defined in table.js) in the tables, which should reduce the code some.
  • Currently only the grader_membership/criterion_association ids are being passed without their respective grader id/criterion id in the Graders view, which slows down the server because we have to then get them and perform operations on them in the backend to update the criteria coverage counts. So get the tables to send those as params when we are updating the graders/criteria.
  • The server-side performance can probably still be optimized further. Look for n+1-type queries (the bullet gem can be helpful), redundant calculations in the helper methods, and any suspicious string-rendering method calls (I think link_to and image_tag in the helpers might be bottlenecks).
  • Find a way, probably in a rake task, to avoid using the in-browser JSX transformer and instead compile the JSX files to vanilla javascript. This will make the client-side performance slightly faster. One possible snag though is the fact that you also have to convert the ERB tags safely (which I don't think the command-line transformer tool will recognize).
  • Minor refactoring: moving components out into their own file, noticing abstractable patterns, better naming of variables, etc.
  • #1760; another table to convert to React (Added by @david-yz-liu)
@zhangsu

This comment has been minimized.

Show comment
Hide comment
@zhangsu

zhangsu Aug 21, 2014

Member

We can turn the bullets into a list of persisting checkboxes :)

- [ ] A
- [ ] B
  • A
  • B
Member

zhangsu commented Aug 21, 2014

We can turn the bullets into a list of persisting checkboxes :)

- [ ] A
- [ ] B
  • A
  • B
@lvwrence

This comment has been minimized.

Show comment
Hide comment
@lvwrence

lvwrence Aug 21, 2014

Contributor

neat!

Contributor

lvwrence commented Aug 21, 2014

neat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment