frontend
frontend copied to clipboard
Edge case bugs introduced through transfer of pagination of grading submissions from frontend to backend.
Relevant PRs: Frontend: https://github.com/source-academy/frontend/pull/2787 Backend: https://github.com/source-academy/backend/pull/1065
The migration of pagination work from the frontend to the backend is a breaking change, and has resulted in the following edge case bugs which are noted here, so as to scope the PRs above. These bugs do not apply for most use cases. They may have arisen due to remaining frontend filtering from tanstack or interactions with the workspace state.
Page switching with filters on result in frontend filtering taking over
https://github.com/source-academy/frontend/assets/110712708/da2e6203-581f-4f39-9c21-64b5b412eaaa
Filters, which persist throughout the same session in the workspace, typically fire off backend queries that fill the entire page up. However, if we leave the grading submissions table and revisit it, the frontend filtering takes over just for initialization. Backend-driven behaviour is reinstated after any other action.
Possible ways to fix:
- Under part of a larger pull to remove tanstack/tremor entirely.
- Rewire table initialization logic to account for non-empty filters immediately.
- Feature removal: make filters entirely self-contained and remove it from workspace state
Mutually exclusive progress column filters and dropdown viewing filters result in frontend filtering taking over
https://github.com/source-academy/frontend/assets/110712708/ea148c48-c854-4bdb-951e-e1fbb1a4371b
Entries marked as ungraded by our dropdown options must necessarily have progress 'submitted'. However, filters based on progress can persist in the switch of viewing from 'all' to 'ungraded'. If these filters become mutually exclusive, e.g. viewing ungraded, filter progress 'Attempting', the 'Attempting' filter then performs frontend filtering, while the viewing 'ungraded' option powers the backend querying as expected. This bug does not occur for non-mutually exclusive combinations, like 'Attempted' and 'all' , and 'Submitted' and 'ungraded' (for this case, suspect that frontend filtering still triggers but does not remove any entries within each page)
Possible ways to fix:
- Under part of a larger pull to remove tanstack/tremor entirely.
- Remove filtering by progress if viewing changes from 'All' to 'ungraded'
- Feature removal: make the progress column non filterable.