Skip to content

Search box for when you click on a course page and the professor box#1007

Open
JasonNguyen067 wants to merge 10 commits intomainfrom
searchError
Open

Search box for when you click on a course page and the professor box#1007
JasonNguyen067 wants to merge 10 commits intomainfrom
searchError

Conversation

@JasonNguyen067
Copy link
Contributor

@JasonNguyen067 JasonNguyen067 commented Feb 27, 2026

Added a search box

Screenshot 2026-02-26 at 4 10 13 PM

You can test this by navigating to a course, clicking on the professor and typing a professors name in the search box.

Copy link
Collaborator

@CadenLee2 CadenLee2 left a comment

Choose a reason for hiding this comment

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

Seems this mostly works, though I have a few concerns. Mostly these'll be resolved once #968 is merged and this is updated

Comment on lines +25 to +29
.MuiInputBase-input {
// @todo: try to get rid of this, likely through a variant
background-color: var(--mui-palette-overlay-overlay1);
width: 150px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be able to remove this after Derrick's select PR #968 (which updates theming) gets merged, so let's wait until then for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good

Comment on lines +190 to +191
<Autocomplete
options={profCourseOptions ?? []}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some edge case suggestions:

  • Shouldn't have the X option to clear the current option, because that means there's no data and the graphs look weird
  • May want an empty state for when there's no prof data
Image

Comment on lines +193 to +195
value={profCourseOptions?.find((o) => o.value === profCourseSelectedValue) ?? null}
onChange={(_, newValue) => updateProfCourse(newValue?.value ?? null)}
isOptionEqualToValue={(option, value) => option.value === value.value}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once Derrick's PR gets merged we can see if the way we structure these props follows the same conventions/style as that one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good

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.

3 participants