Skip to content

Enhanced-search-brian merge to enhanced-search#996

Merged
Jay-Lalwani merged 8 commits intoenhanced-searchfrom
enhanced_search_brian
Feb 3, 2025
Merged

Enhanced-search-brian merge to enhanced-search#996
Jay-Lalwani merged 8 commits intoenhanced-searchfrom
enhanced_search_brian

Conversation

@brianlogic
Copy link
Collaborator

@brianlogic brianlogic commented Feb 3, 2025

GitHub Issues addressed

  • This PR closes

What I did

  1. Fixed querying and filters not working together.

Files changed: Search.py

  • Original logic of having fetch_courses() and filter_courses() return the search has remained the same.
  • However, fetch_courses now takes in filters as a parameter rather than just query so filters are also applied when searching.
  • Accordingly, the if statements to apply filters to results was copied from filter_courses to fetch_courses (check screenshot)
  1. Implemented UI improvements from Chai

Files changed: searchbar.html

Multiple changes to the styling to improve color consistency and size of elements.

  • Changed colors of the day selection to be orange
  • Added search bar for disciplines and implemented JavaScript for it
  • Reduced the list size for subjects and disciplines
  • Search icons in the search bar for subjects and disciplines were not working correctly so they were replaced with
  • Changed apply filters button
  1. Removed active filters indicator in the search bar and filters button displays "Filters Active"

Files changed: searchbar.html

  • The JavaScript to display the filters indicators was removed.
  • If any filters are activated the filters button will display "Filters Active" and change to orange.
  • JavaScript implemented to achieve this (check screenshot).
  • Note: since all days are selected automatically, unselecting any filter will be considered activating a filter.

Screenshots

  • After

If statements added to fetch_courses and filters added as parameter
Screenshot 2025-02-03 at 12 40 37 PM

New design implemented
image

Main JavaScript logic for filters active
image

Testing

Questions/Discussions/Notes

brianlogic and others added 8 commits January 25, 2025 23:52
1. Removed indicator for filters active and instead button displays
"Filters Active". Added Javascript to detect if filters are active.
2. Shortened subject and discipline lists
3. Added searchbar for disciplines list
4. Fixed search icon not showing up in subjects/discipline search bar
5. Improved color consistency
version. Retained most of the original logic
but added fix to allow for query and filters.

Fixed icon issue cause by loading in Font-Awesome
Icons incorrectly causing icons to break.
@Jay-Lalwani Jay-Lalwani merged commit ef85cea into enhanced-search Feb 3, 2025
3 checks passed
chaizhang pushed a commit that referenced this pull request Aug 10, 2025
Enhanced-search-brian merge to enhanced-search
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.

2 participants