Skip to content

Add ability to sort courses and clear filters #208

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 34 commits into from
Feb 6, 2025
Merged

Add ability to sort courses and clear filters #208

merged 34 commits into from
Feb 6, 2025

Conversation

ap-1
Copy link
Contributor

@ap-1 ap-1 commented Feb 3, 2025

Adds the ability to sort courses on the search page by several heuristics at once. These currently include FCE, TeachingRate, CourseRate, CourseNumber, and Units, the first 3 of which are disabled unless the user is signed in. Each heuristic can also be assigned Ascending or Descending.

The user can drag and drop heuristics (called "sort options") to set their precedence for sorting, and press on its respective pill to toggle between Ascending and Descending. The goal is to allow the user to do things like prioritize low FCE courses with high ratings, prioritize high unit courses that are low in course number, etc.

(None selected)
image

(Some selected)
image

Also adds the ability to clear individual filters or all of them at once.

image

Closes #132
Closes #206
Closes #134
Closes #213

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

@ap-1 ap-1 added enhancement New feature or request dependencies Pull requests that update a dependency file labels Feb 3, 2025
@ap-1 ap-1 self-assigned this Feb 3, 2025
Copy link

railway-app bot commented Feb 3, 2025

This PR was not deployed automatically as @ap-1 does not have access to the Railway project.

In order to get automatic PR deploys, please add @ap-1 to your team on Railway.

Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmucourses-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 7:34pm

@ap-1 ap-1 marked this pull request as ready for review February 4, 2025 07:04
@ap-1 ap-1 requested a review from xavilien February 4, 2025 07:04
@ap-1
Copy link
Contributor Author

ap-1 commented Feb 4, 2025

This works locally, but not on the preview deployments. I don't think fces even show up on the preview deployments, but I could be wrong

edit: this is fixed

Copy link
Member

@xavilien xavilien left a comment

Choose a reason for hiding this comment

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

LGTM

@xavilien xavilien merged commit 648e369 into main Feb 6, 2025
3 of 4 checks passed
@xavilien xavilien deleted the sort branch February 6, 2025 01:04
xavilien added a commit that referenced this pull request Feb 18, 2025
xavilien added a commit that referenced this pull request Feb 18, 2025
@ap-1 ap-1 restored the sort branch March 19, 2025 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
2 participants