Skip to content

Conversation

@mirmirmirr
Copy link

This pull request introduces several improvements to the course catalog's filter UI, focusing on better usability and responsive design. The main changes include a collapsible filter section for tags, improved handling of selected filters across desktop and mobile views, and adjustments to API endpoints and state management for consistency.

UI/UX Improvements to Filtering

  • Added a collapsible, animated filter section in FilterSection.tsx that truncates tag lists longer than 12 items, with a "Show All"/"Show Less" toggle and a gradient overlay for visual indication. This uses Framer Motion for smooth transitions. [1] [2]
  • Modified the filter popup panel's position for better alignment on desktop screens (FilterPanelPopup.tsx).
  • Updated the filter panel container to support vertical scrolling when content overflows (FilterPanel.tsx).

Responsive Design & State Handling

  • Refactored how selected filters are displayed: chosen tags now appear below the search bar on both desktop and mobile, with conditional rendering based on device type in both Catalog.tsx and SearchBar.tsx. [1] [2]
  • Changed the management of the filter panel's visibility (showFilter) to be controlled by parent components, improving consistency and state flow. (src/components/SearchBar/SeachBar.tsxL1-L20, F11082baL11082baL95R98)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the course catalog filter UI with improved usability and responsive design. The main focus is on adding collapsible filter sections with animations, better state management for filter panel visibility, and improved handling of selected filters across desktop and mobile views.

  • Added collapsible filter sections with Framer Motion animations that truncate long filter lists (>12 items)
  • Moved filter panel visibility state management to parent component for better control flow
  • Implemented responsive design with different selected filter placement for desktop (below search) and mobile (within SearchBar component)

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/pages/Catalog.tsx Lifts showFilter state to parent, adds responsive rendering for selected filters and search results
src/context/FilterProvider.tsx Updates API endpoint from /departments to /subjects for consistency with domain language
src/context/CourseWorkspaceProvider.tsx Adds missing semesterID field to initial semester data
src/components/SearchBar/SeachBar.tsx Accepts showFilter props from parent, adds mobile ChosenTag rendering
src/components/SearchBar/FilterPanel/FilterSection.tsx Implements collapsible animation with gradient overlay and "Show All/Less" toggle
src/components/SearchBar/FilterPanel/FilterPanelPopup.tsx Adjusts popup positioning from right-4 to right-0 for better alignment
src/components/SearchBar/FilterPanel/FilterPanel.tsx Adds scrolling support with max-height constraint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mirmirmirr mirmirmirr force-pushed the 60-mobile-filters-dont-work branch from a917759 to 574d16f Compare November 20, 2025 15:53
@mirmirmirr mirmirmirr marked this pull request as ready for review November 23, 2025 17:43
ccheung777
ccheung777 previously approved these changes Nov 23, 2025
@mirmirmirr mirmirmirr dismissed ccheung777’s stale review November 23, 2025 21:44

The merge-base changed after approval.

Copy link

@jzgom067 jzgom067 left a comment

Choose a reason for hiding this comment

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

Looks like some stuff broke when you merged main-preview into this branch.

Firstly, all the tags are invisible, both in the courses and in the "applied filters" section under the search bar.
Image

It seems like the text, background, and outline are just pink to match the background, since you can see it when hovering over a course.
Image

The same happens to the applied filters, but only on mobile. (On the desktop filter view, they just don't change color when selected)
Image

Not sure if this is related, but the trash bin looks to be much higher than it should be when dragging a course.
Image

@mirmirmirr
Copy link
Author

man

@mirmirmirr mirmirmirr requested a review from jzgom067 November 29, 2025 04:48
Copy link
Contributor

@ramonechen ramonechen left a comment

Choose a reason for hiding this comment

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

On mobile, clicking on any of the semester filters (or anywhere in the semester filter section as a whole) immediately closes the filter menu without selecting anything. Thus, I'm unable to filter courses by semester.

This does not seem to be an issue on the desktop interface.

@mirmirmirr
Copy link
Author

It works for me on mobile, what were you pressing?

@mirmirmirr mirmirmirr requested a review from ramonechen December 2, 2025 22:24
Copy link
Contributor

@ramonechen ramonechen left a comment

Choose a reason for hiding this comment

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

The previous mobile issue in which clicking on a semester filter closes the filter menu has been resolved.

There are a few issues I found that may or may not need to be addressed (present on both desktop and mobile views):

  1. Clicking on an applied filter sometimes duplicates it instead of deleting it.
image

I found that spamming lots of random filters and then attempting to remove them one-by-one often causes one or more of them to "stick" or duplicate. Stuck filters cannot be removed either by clicking or de-selecting them via the filters menu.

  1. General unresponsiveness when clicking on filters.

No screenshot or video for this one as of now, but I noticed that the application often freezes up for up to a second at a time when quickly selecting or removing filters in succession. The filters menu also takes a second to open and close sometimes. I assume this is either because API calls are blocking in certain cases or there is somehow too much processing load on the client.

  1. Applied filters reduce the amount of visible space in the course catalog.
image

Probably the most minor issue, but with enough filters applied, the space in which courses appear in starts to shrink and there is no way to scroll down to see more courses at a time. The screenshot is just an extreme example of this. This issue might not be relevant to this pull request but I still wanted to point it out.

Copy link
Contributor

@ramonechen ramonechen left a comment

Choose a reason for hiding this comment

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

Let's get this app deployed before RCOS Expo woooooooooooo

@ramonechen ramonechen dismissed jzgom067’s stale review December 5, 2025 14:31

The issues raised by this review should have been resolved at this point, not sure why it's still up.

@ramonechen ramonechen merged commit fd89e85 into main-preview Dec 5, 2025
3 checks passed
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.

[Mobile] Hide courses if filters are open [Mobile] Filters don't work

5 participants