Skip to content

Conversation

@gyoge0
Copy link
Collaborator

@gyoge0 gyoge0 commented Sep 28, 2025

GitHub Issues addressed

  • N/A

What I did

  • Removed filtering by subject and discipline in the search bar

Screenshots

  • Before
Screenshot 2025-09-28 at 3 46 59 PM
  • After
Screenshot 2025-09-28 at 3 47 07 PM

Testing

  • Checkout this commit and run docker compose up

Questions/Discussions/Notes

  • Priority for this PR is to remove the feature to save on page size - 50kb vs 250kb sent to users matters a lot, and should slash our data transfer out costs.
  • Adding back this feature should be saved for later, and should be done in a way that doesn't transfer this much data.
  • We should pay attention to if people are even using this or not.

Summary by CodeRabbit

  • Refactor
    • Removed “Subject” and “Discipline” filters from the search filter panel, simplifying the filtering experience while keeping other filters (day/time, availability, GPA, etc.) unchanged.
  • Style
    • Cleaned up related styles by removing list and custom scrollbar styling associated with the removed filters, resulting in a leaner, more consistent UI.

Each page on tCF loads a templated subject and discipline filter list,
which ends up being ~200kB large.
@coderabbitai
Copy link

coderabbitai bot commented Sep 28, 2025

Walkthrough

Removed Subject and Discipline filters from the searchbar UI and deleted associated CSS, including list styling, label flex rules, and custom scrollbar styles. Remaining filters are unchanged.

Changes

Cohort / File(s) Summary
Searchbar UI template
tcf_website/templates/search/searchbar.html
Removed Subject and Discipline filter sections (headers, search inputs, checkbox lists, loops). Retained other filter controls.
Searchbar CSS cleanup
tcf_website/static/search/searchbar.css
Deleted styles for subject/discipline lists, related labels, and custom scrollbars (Firefox/WebKit). No new CSS added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled code with tidy cheer,
Two filters hopped and disappeared.
CSS trims, no scrolls to mend,
The dropdown’s lighter end to end.
With paws of regex, neat and swift—
I gift you one streamlined shift. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and succinctly summarizes the main change—which is removing the search bar filters to optimize page size—and is both specific and directly related to the modifications in the changeset.
Description Check ✅ Passed The description follows the repository’s template by including sections for GitHub Issues addressed, a clear “What I did” summary, before-and-after screenshots, testing instructions, and discussion notes, thus covering all required elements.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pagesize-searchbar-optimization

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e37a946 and 2d74970.

📒 Files selected for processing (2)
  • tcf_website/static/search/searchbar.css (0 hunks)
  • tcf_website/templates/search/searchbar.html (0 hunks)
💤 Files with no reviewable changes (2)
  • tcf_website/templates/search/searchbar.html
  • tcf_website/static/search/searchbar.css
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: pylint
  • GitHub Check: django

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ldkohler
Copy link
Collaborator

@Jay-Lalwani deprecate advanced search to save on ELB?

@Jay-Lalwani
Copy link
Collaborator

@Jay-Lalwani deprecate advanced search to save on ELB?

How much is this actually gonna save?

Could we just improve caching? It's the same list every time.

@gyoge0
Copy link
Collaborator Author

gyoge0 commented Sep 29, 2025

How much is this actually gonna save?

Estimate would be ~60-70% of ELB costs (so ~20% of total costs?) since we're decreasing page size by 75%.

Could we just improve caching? It's the same list every time.

No, since we can't cache components, only pages. We're including the filters in each page, but pages are dynamically generated. Caching + compression is still a big issue right now that we should look into.

My vote would be for removing the filters right now and making optimized filters a top priority to work on. Lou's List just has you type in subjects while SIS serves a large JSON and then generates DOM elements locally (presumably this is a framework like React underneath that plays well with a workflow like this).

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.

4 participants