Skip to content

Refactor grading dashboard and reduce API overhead #2643

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

Merged
merged 11 commits into from
Aug 25, 2023

Conversation

RichDom2185
Copy link
Member

@RichDom2185 RichDom2185 commented Aug 25, 2023

Description

Mainly refactored code, but also added new custom components to support minimal dropdowns, and also restored the old behaviour of allowing staff to toggle between viewing only submissions from their own group (now the default) or all groups. This was previously removed in #2437.

With over 100 groups, this would result in a >100x performance improvement.

New UI:

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Checklist

  • I have tested this code
  • I have updated the documentation

@RichDom2185 RichDom2185 requested a review from chownces August 25, 2023 14:55
@RichDom2185 RichDom2185 self-assigned this Aug 25, 2023
@RichDom2185 RichDom2185 marked this pull request as ready for review August 25, 2023 16:51
@RichDom2185 RichDom2185 enabled auto-merge (squash) August 25, 2023 16:53
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5978391278

  • 0 of 47 (0.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 37.367%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/SimpleDropdown.tsx 0 10 0.0%
src/pages/academy/grading/Grading.tsx 0 15 0.0%
src/features/grading/GradingUtils.ts 0 22 0.0%
Files with Coverage Reduction New Missed Lines %
src/pages/academy/grading/Grading.tsx 1 0.0%
Totals Coverage Status
Change from base Build 5974244943: -0.03%
Covered Lines: 5740
Relevant Lines: 14441

💛 - Coveralls

@RichDom2185 RichDom2185 merged commit 7dcfa0f into master Aug 25, 2023
Copy link
Contributor

@chownces chownces left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@RichDom2185 RichDom2185 deleted the reduce-grading-overhead branch August 25, 2023 17:16
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Aug 25, 2023
* Use useSession hook instead of useTypedSelector

* Show all submissions only for admins by default

* Add FIXME

* Refactor CSV exporter to separate file

* Rename `data` to `submissions`

Improves descriptiveness.

* Remove unnecessary GradingDashboard abstraction

* Simplify redundant code

* Move ungraded submission filter to GradingUtils

Improves readability.

* Refactor filtering logic

* Rename `showGraded` to `showAllSubmissions` for clarity
* Pass a new copy of submissions array to table (immutability)
* Move conditional logic into array filter

* Create SimpleDropdown custom component

* Allow staff to view all groups via dropdown
@RichDom2185 RichDom2185 mentioned this pull request Aug 25, 2023
7 tasks
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Aug 25, 2023
* Use useSession hook instead of useTypedSelector

* Show all submissions only for admins by default

* Add FIXME

* Refactor CSV exporter to separate file

* Rename `data` to `submissions`

Improves descriptiveness.

* Remove unnecessary GradingDashboard abstraction

* Simplify redundant code

* Move ungraded submission filter to GradingUtils

Improves readability.

* Refactor filtering logic

* Rename `showGraded` to `showAllSubmissions` for clarity
* Pass a new copy of submissions array to table (immutability)
* Move conditional logic into array filter

* Create SimpleDropdown custom component

* Allow staff to view all groups via dropdown
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.

3 participants