Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract non-class meetings and course instance tables into a generic component #362

Open
rmainwork opened this issue Jul 7, 2021 · 0 comments
Labels
Client Code on the client side of the application Technical Debt Code requires cleanup

Comments

@rmainwork
Copy link
Contributor

As things currently stand, the course instance table
image

and the Non-class meetings table
image

are essentially the same thing,. but are implemented as separate components.

Ideally, they should be refactored into one generic re-usable component (similar to the current implementation of the course instance table) that can show the columns passed as props. This would allow us to have tests for only one implementation of the complex table layout, and keep the logic for it in one place(as well as only having to test it once).

Perhaps an array of columns could be provided, with offset numbers for the start and end of the fall/spring header columns to determine which columns they sit above on the table.

<SemesterTable
  columns={/* some array of column data goes here (maybe reformatted table data?) */}
  fallColumnStart={/* the first column number that should be considered part of "Fall <academic year> -1 "*/}
  fallColumnEnd={/* the last column number that should be considered part of "Fall <academic year> -1 "*/}

  springColumnStart={/* the first column number that should be considered part of "Spring <academic year>"*/}
  springColumnEnd={/* the last column number that should be considered part of "Spring <academic year>"*/}

  // ... Other props
/>
@rmainwork rmainwork added Technical Debt Code requires cleanup Client Code on the client side of the application labels Jul 7, 2021
rmainwork pushed a commit that referenced this issue Jul 19, 2021
The non-class meetings table was copied from the course-instance table
however, since the non-class meetings table is static and the columns do
not change - much of that functionality was stripped out and the columns
hard coded

In future we may wish to re-use the fancy dynamic column table to save
on testing and debugging. More on that in #362
rmainwork pushed a commit that referenced this issue Jul 20, 2021
Refactor NonClassMeetings table to import the meeting layout components
from the course instances table.

In future, both the non-class meetings table and the course instances
table should be refactored to generalize the components used within.
This work will be done in #362, but for the time being the non-class
meetings table has just been changed to import the components from the
course instances directory
@jonseitz jonseitz added this to the Non-Class Meetings milestone Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Code on the client side of the application Technical Debt Code requires cleanup
Projects
None yet
Development

No branches or pull requests

2 participants