Skip to content
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

Search bolding #99

Merged
merged 6 commits into from
Oct 11, 2023
Merged

Search bolding #99

merged 6 commits into from
Oct 11, 2023

Conversation

TyHil
Copy link
Member

@TyHil TyHil commented Apr 17, 2023

Overview

Add bolding to searches. If you search "CS 12" for example, results will look like CS 1200, CS 1200 John Cole, etc.
This uses, as suggested by MUI, the autosuggest-highlight library: https://github.com/moroshko/autosuggest-highlight.

What Changed

Changed renderOption in both search bars. Removing the className property on it also fixed the highlighting issues.
I used regex to split any CS1200 or 1200CS into CS 1200 or 1200 CS respectively. Also supporting partial numbers like CS1, CS12, and CS120 and numbers with letters in them like CS5V81 of which I think there is only ever the possibility of a V in the second position.

@TyHil TyHil requested a review from iamwood as a code owner April 17, 2023 06:00
@vercel
Copy link

vercel bot commented Apr 17, 2023

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

Name Status Preview Comments Updated (UTC)
utd-trends ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2023 11:28pm

@TyHil TyHil mentioned this pull request Apr 22, 2023
Copy link
Contributor

@Jake3231 Jake3231 left a comment

Choose a reason for hiding this comment

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

Looks good! Just needs conflict resolution and should be good to go

@Jake3231 Jake3231 merged commit a3c30e9 into develop Oct 11, 2023
2 checks passed
@Jake3231 Jake3231 deleted the searchBar-renderOption branch October 11, 2023 23:30
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