Skip to content

Refactor Assignment Progress to logically group components#2065

Open
sjd210 wants to merge 15 commits intomainfrom
improvement/assignment-progress-file-structure
Open

Refactor Assignment Progress to logically group components#2065
sjd210 wants to merge 15 commits intomainfrom
improvement/assignment-progress-file-structure

Conversation

@sjd210
Copy link
Copy Markdown
Contributor

@sjd210 sjd210 commented Mar 26, 2026

The file structure of the AssignmentProgress group of files is a mess. e.g. AssignmentProgressIndividual is in the /pages/ folder but is not a page itself, it has the same naming scheme as AssignmentProgressGroup despite SingleAssignmentProgress being its equivalent in AssignmentProgressWrapper, and components like AssignmentProgressLegend are not grouped to a logically consistent location within these files.

This PR does not change the logic of these files (except where purposely mentioned) but changes the structure so it's clear where each component is meant to be.

The important changes are:

  • Adds a /pages/assignment_progress folder to associate these related pages together inside.
  • Uses a AssignmentSummaryCard component to use shared code for the nearly identical Due/Attempted/Completed summary card shown above both a quiz and assignment summary.
  • Uses a ResultsTableHeader component to group together the components that are consistently above a result table section (Title/Settings/Key) in each tab/quizzes.
    • NOTE: I have decided to make settings appear consistently on both the "Group overview" and "Detailed marks" tabs. On Sci, this means the "Hide/Show settings" button is available and the setting can be dismissed across tabs. On Ada, this means that "Show marks as percentages" checkbox appears on both tabs (it already affected both tabs). This is a change, but I think one for the better.
  • Rename and move components in files to the following structure:
    1. AssignmentProgressWrapper (unchanged)
    2. AssignmentProgressGroupsListing (unchanged)
    3. AssignmentProgressGroup (unchanged)
    4. AssignmentProgressIndividual (this is now the page linked to in AssignmentProgressWrapper for an assignment. it contains the main page structure)
    5. AssignmentProgressIndividualTabs (new. this contains the GroupAssignmentTab and DetailedMarksTab code used in AssignmentProgressIndividual)
    6. components/ResultsTableHeader (new. all components related to settings or keys are moved here rather than distributed among several files)
  • Fixes visual bug on Sci causing a gap in the top border of the assignment progress tab cards.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 32.24638% with 187 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.16%. Comparing base (7d469ba) to head (80e028b).

Files with missing lines Patch % Lines
...ment_progress/AssignmentProgressIndividualTabs.tsx 20.68% 69 Missing ⚠️
...p/components/pages/quizzes/QuizTeacherFeedback.tsx 8.69% 42 Missing ⚠️
src/app/components/elements/ResultsTableHeader.tsx 28.84% 37 Missing ⚠️
...signment_progress/AssignmentProgressIndividual.tsx 36.20% 37 Missing ⚠️
.../assignment_progress/AssignmentProgressWrapper.tsx 80.00% 1 Missing ⚠️
src/test/pages/AssignmentProgress.cy.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2065      +/-   ##
==========================================
+ Coverage   43.14%   43.16%   +0.02%     
==========================================
  Files         580      581       +1     
  Lines       24958    24966       +8     
  Branches     8276     8274       -2     
==========================================
+ Hits        10768    10777       +9     
- Misses      14133    14139       +6     
+ Partials       57       50       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sjd210 sjd210 marked this pull request as ready for review March 27, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants