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

Frontend refactor #296

Merged
merged 49 commits into from
Jul 12, 2023
Merged

Frontend refactor #296

merged 49 commits into from
Jul 12, 2023

Conversation

39bytes
Copy link
Collaborator

@39bytes 39bytes commented Jun 20, 2023

General changes

  • Replaced classNames util with twMerge
  • Gave review forms a fixed width of 448px
  • Removed margins from root elements of components
  • Reduced layout margins

File specific

Alert.tsx

  • Renamed AlertProp to AlertProps

Autocomplete.tsx

  • Changed options highlight color to gray
  • Inverted the filtered condition to make it a bit cleaner

BoxToggle.tsx

  • Removed useless flex containers
  • Renamed isOpen prop to open

CourseCard.tsx

  • Allow passing a className for styles

CourseInfo.tsx

  • Remove pointless flex containers

CourseRequirements.tsx

  • Don't export ReqsBlock
  • Simplify ReqsBlock ternary expression

CourseSearchBar.tsx

  • Extract icon and matched text outside of the JSX
  • Replace enum with string union

ExploreFilter.tsx

  • Use MultiSelect instead for the input
  • Created type alias CourseTerm for 'Fall' | 'Winter' | 'Summer'
  • Removed some margins on elements

JumpToTopButton.tsx

  • Simplify toggleVisible
  • Add opacity transition

MultiSelect.tsx

  • Fixed a flickering issue when closing the dropdown
  • Changed option hover color to gray

NavItem.tsx

  • Added some top margin to the red underline
  • Show course search bar on sm and larger

ReviewFilter.tsx

  • Extract FieldLabel component

SchedulesDisplay.tsx

  • Use lodash instead of dedupe functions
  • Fixed an issue where the full inner text would appear before the height transition finished

SideNav.tsx

  • Changed overlay to black and reduced opacity

Tooltip.tsx

  • Created reusable tooltip component

About.tsx

  • Extracted out Title component
  • Removed margins from components
  • Removed weird useless spaces ({' '})

CoursePage.tsx

  • Use Loading component instead

Explore.tsx

  • Rename filterIsToggled to filterOpen
  • Remove useless flex and weird spaces

Instructor.tsx

  • Use Loading component instead

Profile.tsx

  • Remove broken py- class

Loading.tsx

  • Created reusable loading page

utils.ts

  • Remove dedupe functions

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #296 (0ec150d) into master (4d7d2c3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #296   +/-   ##
=======================================
  Coverage   86.83%   86.83%           
=======================================
  Files          43       43           
  Lines        4065     4065           
=======================================
  Hits         3530     3530           
  Misses        535      535           

@39bytes 39bytes marked this pull request as ready for review June 21, 2023 02:34
client/src/components/BoxToggle.tsx Outdated Show resolved Hide resolved
client/src/components/EditReviewForm.tsx Outdated Show resolved Hide resolved
client/src/components/ExploreFilter.tsx Outdated Show resolved Hide resolved
client/src/components/JumpToTopButton.tsx Outdated Show resolved Hide resolved
@terror terror merged commit a71ed77 into master Jul 12, 2023
6 checks passed
@terror terror deleted the frontend-refactor branch July 12, 2023 03:26
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