Add filter & sort options for single course FCE aggregation #203
Labels
No labels
beginner friendly
bug
chore
documentation
duplicate
feature
help wanted
invalid
needs-triage
question
size/L
size/M
size/S
size/XL
size/XS
urgent
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/dalmatian#203
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objectives
Run
/fceon a single course and select Aggregate by Instructor or All Semesters. By default, this filters out summer FCEs (keep only Fall/Spring unless we don't have that data) and sorts by most recent first.We want to add a button that lets the user edit how we filter and sort the output. When the button is clicked, the user should be presented with these options:
F25,S26, andM25)When the user submits those options, the original FCE embed should be edited to reflect their filter & sort options, with a note in the footer indicating what they selected.
Suggested Approach
The crux of the work will be done in
src/commands/fce.ts. The current file is split into two halves: running/fceon a single course, and running/fceon multiple courses. You'll only need to focus on the former.Our codebase is unique in that we have an
EmbedPaginatorclass to handle automatic pagination and buttons for navigating pages. Add a "Filter & Sort" button to that paginator's components in the FCE code here.Edit the
onCollectfunction in the paginator's parameters such that when we receive a new button click interaction, we present the user with an ephemeral components v2 embed that displays the dropdown and a green Submit button.src/commands/redirect-setup.tsdoes something similar; refer to that file for an example of how to do this!Finally, filter and reorder
byInstructorEntriesandallSemesterEntriesas appropriate and edit the original embed message when the submit button is pressed.You may also need to edit the testcases in
tests/fce.test.ts.