CS3219-AY2324S1 / ay2324s1-course-assessment-g05

A collaborative technical interview preparation platform that is going to boost your interview performance!
MIT License
0 stars 3 forks source link

Bug fix for history submission detail page and history sorting #155

Closed tryyang2001 closed 1 year ago

tryyang2001 commented 1 year ago

Pull Request

Description

Thanks @tlyi for reporting the bugs found! There are 2 bugs in master:

  1. The /questions/:questionId/history page cannot be rendered. This is due to we miss to add the HistoryProvider to that page when we remove HistoryProvider from our centralised providers.tsx component.
  2. The attempted question list shown in the dashboard table might not render in order, meaning that it is still possible that the question that you just attempted one second ago appear in the last page of the history table instead of the first page first row.

Consider the use of HistoryProvider is quite extensive, I proposed that we keep HistoryProvider in our centralised providers.tsx component. (For your information, HistoryProvider is used in dashboard, history table page, and individual question history page, so instead of creating 3 separate layout.tsx, putting in the providers.tsx is more efficient.

Please also note that for the sorting, we are only able to have an "overall sorting" for time, not for "complexity" or "question name" since we want an efficient sorting algorithm.

Related Issue(s)

Changes Made

Screenshots (if applicable)

image

From the screenshots above, we can clearly see that even with pagination, the history are in order: image

image

image

image

Checklist

Additional Notes/References