Skip to content

[Feature:Forum] Overhaul search functionality#12065

Merged
bmcutler merged 14 commits intomainfrom
forum-search-overhaul
Nov 11, 2025
Merged

[Feature:Forum] Overhaul search functionality#12065
bmcutler merged 14 commits intomainfrom
forum-search-overhaul

Conversation

@DarthNyan
Copy link
Contributor

@DarthNyan DarthNyan commented Sep 16, 2025

Why is this Change Important & Necessary?

Forum search is currently clunky.

  • It takes users to a new page with clunky UI
  • It can't be used in conjunction with other filters
  • It doesn't work well with navigating through browser history

Before page:
image

What is the New Behavior?

image Forum searching now stays on the same page, and applies the query as a filter on the displayed threads. image Because searching now behaves as a filter, it can be used in conjunction with other filters. image
  • The search bar now comes with an X button to clear it.
  • Searching or filtering now saves a frame on the browser history.

What steps should a reviewer take to reproduce or test the bug or new feature?

Reviewers should:

  • Ensure searching works in conjunction with other filters
  • Ensure history navigation behaves reasonably
  • Ensure X button clears search bar
  • Ensure Clear Filters button clears all filters ( search bar, categories, status )
  • Ensure search query persists through site navigation ( ex. opening a thread )
  • Ensure users can type Enter into search bar to run a search.

Automated Testing & Documentation

Cypress test has been updated to reflect these changes.

Other information

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 0% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.66%. Comparing base (6a1d195) to head (5624b7a).
⚠️ Report is 41 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12065      +/-   ##
============================================
- Coverage     21.68%   21.66%   -0.02%     
- Complexity     9598     9601       +3     
============================================
  Files           268      268              
  Lines         36624    36654      +30     
  Branches        475      475              
============================================
  Hits           7941     7941              
- Misses        28212    28242      +30     
  Partials        471      471              
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.67% <0.00%> (-0.03%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RyanStyron RyanStyron self-assigned this Sep 23, 2025
Copy link
Contributor

@Rkoester47 Rkoester47 left a comment

Choose a reason for hiding this comment

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

I tested the new search functionality in multiple browsers, and was able to search and filter at the same time successfully. I was able to enter a thread I found and exit it, all while the search and filters remained in place. The 'x' and clear filter buttons both seem to work properly.

The innermost 'x' which only clears the word(s) entered into the bar without actually changing the current filters applied does not show up at all on Firefox, only Chrome. Also, the clear filters button on the outside of the search bar is very useful but difficult to see, especially on dark mode. I suggest making style changes so that it is more apparent.

One change I would like to see is implementation of the use of Enter key for initiating a search. The use of Enter is available on the current form of forum searching and it only feels natural. A few times during testing I found myself reflexively hitting Enter, only for nothing to happen.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Sep 23, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

Solid implementation of making use of cookies to effectively have search queries as filters. I would recommend changing the "X" button (the one outside of the query bar itself), to be slightly smaller if possible. I think that the "X" button inside of the query bar should be removed since it is not visible on all browsers. I also think that being able to use the Enter key would be a very welcomed feature. Also, I recommend making the "Clear Filters" option much more visible (such as white or yellow text color).

@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to In Review in Submitty Development Sep 26, 2025
@JManion32
Copy link
Contributor

JManion32 commented Sep 26, 2025

I agree with the above comments. Here is a suggestion for the UI of the clear button:

image

Remove the x that pops up in the Chrome <textarea>, then use a red Font Awesome X mark in a button with all styles overridden (you could just use an anchor too but this feature functions more like a button). I was able to center everything vertically by adding text-align: center to the .forum-bar .toolbar-left class. If you want, I can push these stylistic changes to your branch.

I think it would also be nice if that clear button is hidden and only appears when there is text in the text area, similar to how the clear filters button works.

Overall, great work, and I will do a more thorough review of code and functionality once all of the requested changes are addressed.

@Rkoester47
Copy link
Contributor

I tested the changes you made after the above comments, and I think this implementation is really solid. The new clear text button looks great and works well. Using the Enter key works as well and is much more intuitive. I was able to search and filter, and open threads all while keeping the search in the bar.

Overall, I think this is a definite upgrade over the current search function. Really good work on this PR!

@JManion32
Copy link
Contributor

Apologies for my original comment, I was reviewing an older branch and did not see that you had implemented more changes.

I have a few more UI things to comment on:
1. Search bar height: Prior to this PR, the search bar was the same height as the other buttons in the toolbar-left container:
image
It seems to have shrunk to its default size in this PR:
image

2. Button Visibility: I still think the clear button for the search bar should only be displayed when there is text inside of it. This behavior would keep it consistent with the Clear Filters button.

@JManion32
Copy link
Contributor

One more small change:

The clear text button should appear clickable on hover with something like:
cursor: pointer;

Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

Much improved based on recent changes. I agree with Justin's recent suggestion, and would recommend resolving the Lint failure, but all looks good otherwise.

@github-project-automation github-project-automation bot moved this from In Review to Work in Progress in Submitty Development Oct 3, 2025
@DarthNyan DarthNyan requested a review from RyanStyron October 7, 2025 20:08
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to In Review in Submitty Development Oct 7, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Please resolve the CSS Lint error, but great work otherwise.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Oct 10, 2025
@bmcutler bmcutler merged commit f23fa62 into main Nov 11, 2025
24 of 25 checks passed
@bmcutler bmcutler deleted the forum-search-overhaul branch November 11, 2025 21:47
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants