Return upvote and downvote from reviews endpoint#1087
Open
JasonNguyen067 wants to merge 17 commits intomainfrom
Open
Return upvote and downvote from reviews endpoint#1087JasonNguyen067 wants to merge 17 commits intomainfrom
JasonNguyen067 wants to merge 17 commits intomainfrom
Conversation
Collaborator
|
/deploy |
* add useRef to store if majors were fetched + use with initially loading majors * add useRef for minor selector + implement in inital loading useEffect * code cleanup
Co-authored-by: anthonyj33 <55033931+anthonyj33@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Mobile fixes * fix: scheduler parity * feat: reorganize mobile icons --------- Co-authored-by: Caden Lee <maltyg3332@gmail.com>
* fix preview navigation * fixed broken review card links * switch from professor to instructor * check if pathname is only /planner * prevent flicker by removing dispatch * switch to only using router * fix missing back arrow on forward history * fix lint warnings + usePreviewDepth hook * remove unused definitions --------- Co-authored-by: Caden Lee <149259302+CadenLee2@users.noreply.github.com>
This reverts commit d98b2e1.
* fixed broken mobile MUI input sizing * code doesn't do anything
* coursenotes table * fix: anomalous byte order mark introduced in b09e0a6 * chore: generate migration --------- Co-authored-by: Caden Lee <maltyg3332@gmail.com>
* added warning symbol to roadmap course cards if the class has not been offered in that quarter for the past 2 years; course popover also displays description of warning under the schedule * fixed year computation to take into account the future and past * changed using quarterIndex to data.name
* setup preview navbar (no mobile) * fix styling + switch to id prop * first draft mobile arrow navigation * horizontal preview navbar mobile
* WIP: updates to header portion of review cards * Device save logic (#1012) * passed in initial account roadmap into saveRoadmapAndUpsertTransfers * added onConflictDoNothing to inserts so that internal server error does not occur for repeated inserts of the same change * Completion Hint for (Grouped)CourseRequirement (#995) * "Pick n" for requirements Clarifies number of required courses for GroupedCourseRequirement * Show num completed out of reqd * CompletionHint for CourseRequirement and GroupedCourseRequirement Supports courses and units (x/y) for courses (x/y units) for units * chore: feedback form (#1019) * uiSlice file removed from site/src/store. Corresponding import in store.ts is also removed. (#1013) * Add data disclaimer (#1009) * create disclaimer component * open link in new tab * add inline padding * less inline padding * upgrade next.js to version 16 (#933) * Prevent installation of packages < 1 day old * upgrade to pnpm v10 * bump pnpm setup version * regenerate lockfile * upgrade to nextjs 16 * ignore next-env.d.ts * run typegen for linting on frontend * remove unneeded env * fix: react 19 always hydrates root 💀 * re-enable later * for client rendering for loading spinner * undo tsconfig change automatic typegen changes broke lint LOL --------- Co-authored-by: Ellis Liang <161268749+ellisl10@users.noreply.github.com> Co-authored-by: Caden Lee <149259302+CadenLee2@users.noreply.github.com> * Updated outdated credits text to reflect "Credits" tab. (#1021) * Undo/redo (#980) * initital impelementation * fixed bug with undo/redo * iconbutton and disabled button for undo and redo * notrounded * cleanup * undo * fix * change --------- Co-authored-by: Caden Lee <149259302+CadenLee2@users.noreply.github.com> Co-authored-by: Jasonnguyn <jasonnguyen7506@gmail.com> Co-authored-by: Jason Nguyen <jdnguy11@uci.edu> * hover logo fixed (#1002) * fix: theme switching (#1029) * feat: silent auth (#1010) * Enable CHC2 (#1030) Thanks AAPI :) * fix device or account popup (#1003) * fix: required ids when building requirements (#1036) * Save previous roadmap (#983) * Add currentPlanIndex to dev database * Save last saved roadmap index * Fix linting issues * Fix style issues in PlannerLoader * Remove unneeded array conversion * chore: remove conflicting migration files * chore: new migration --------- Co-authored-by: Caden Lee <maltyg3332@gmail.com> * Indicate GEs cleared by Transfer Credits (#973) * add badge to indicate transferred ge * modify hook to return TransferredGE * add menutile * add onClick to menutile * add success colors to transferred tile * add circular variant to badge * add badge variant augment * add inProgress color * adjust border styling * rename redux state for catalog tab * add slice to control sidebar tab * refactor slices into different files and revert name change * mobile transfer menu handling * refactor transfer credits tile * un-export function * do a recursive check for matching ges * account for multiple transfers * add label to differentiate multiple transfer credits tiles * rename badge color variant to pending * tighter filtering for an applicable ge * refactor getransferbadge * remove unneeded span * Years grid layout shift bug fix (#1038) * Updated outdated credits text to reflect "Credits" tab. * Shifted min-width of .years to fix specific screen size bug. * feat: looser review schema (#1044) * Update hamburger menu (#1005) * made profile theme its own component * moved divider out of component * moved auth button into its own component, added divider * added donate/feedback buttons, with temp comments about about/other stuff * simplified imports a bit * small changes * removed comments * added about button, fixed styling (ish) * reverted to you reviews above log out without divider * created constants file and moved feedback form link into it * replaced constants file and feedback form constant with https://antalmanac.com/feedback * various small changes to look more like AA * more small changes to make hamburger menus pixel-almost-perfect * updated sign in button * centered tab icons * initial modal * extract aboutdialog --------- Co-authored-by: Jeremiah <40682211+fiveminus1@users.noreply.github.com> Co-authored-by: Jeremiah Soe <soejeremiah@gmail.com> * migration (#1045) * Clickable div helper component (#1039) * Completed clickable div component * MajorCourseList + MenuSection refactored * Changes to MinorCourseList, ProgramRequirementsList, and MenuTile * Updated CourseHitItem and ProfessorHitItem * Update README (#1041) * about, features, technology * history and small addition to contributions * minor edits * update open source contributing section wording * update course search image * remove old images * caden is my lead :p * remove more unused images * title case * Align dark mode paper colors to match AA Scheduler (#1040) * change paper and top bar colors to match scheduler * use paper in table headers * Add support for variable units (#1026) * Create new PlannerCourse type with variable unit field * Fix errors resulting from adding variable unit support * modify ui for variable unit courses * Revert "Merge branch 'support-variable-units' of https://github.com/icssc/peterportal-client into support-variable-units" This reverts commit 681b27a, reversing changes made to 0ff3fcb. * add edit functionality + error for incorrect inputs * Reapply "Merge branch 'support-variable-units' of https://github.com/icssc/peterportal-client into support-variable-units" This reverts commit a613818. * Upgradelocal roadmaps * Extract latest version to a constant * Update db SQL query to get variable units * Replace null userChosenUnits with undefined on load from db * modify edit icon button * remove some unnecessary comments * replace textfield with outlinedinput + add input behaviors * remove comments from quarter.tsx * add setCourseVariableUnit helper function + add modifyVariableCourseUnit revision function + modify types to support course revision * Allow saving variable units * include var unit in quarter total unit calculation + modify code position * include var unit in year total unit calculation * Use correct unit calculation in Planner.tsx * Add missing version field from zot4plan imports * resolve remove some code comments * fix input spacing + implement useMemo for unitCount * refactor custom units into CustomUnits.tsx * Rewrite comment for clarity * Refactor chc variants to enum * extract UnitsContainer from MenuTile.tsx * use UnitsContainer in custom units * scope UnitsContainer.scss styling to UserContainer.tsx * remove CustomUnits.tsx * comment cleanup * unit calculation refactoring * fix build issue with latestRoadmapVersion in helpers/planner.ts * move calculateTotalUnits helper function from util.tsx to helpers/planner.ts * resolve code comments * rename UnitsContainer.tsx to CustomUnitsContainer.tsx * remove unneeded css * remove unnecessary classes from Course.scss --------- Co-authored-by: atile4 <atile4444@gmail.com> Co-authored-by: Atticus <144712135+atile4@users.noreply.github.com> * added syllabus column (#1051) * added syllabus column * updated typo link -> syllabus * Updating review card info * styling updates to info section * Revised footer of review card * Minor change to scoring * Completed styling of the review footer * WIP: styling of three dot menu and implementing variables * Updates to border colors * Fix: upvote buttons are always on the right side regardless of absent tags * Fix: styling changes to fix the review top section and icons * Additional spacing and vote button edits. * Fix: removed tag border radius styling * Fix: refactored code to use class instead of constant in tsx file. * Update to verified svg * Refactor voting classes * Refactored code duplication into displayReviewDate helper function * Revering anonymous name change. * Removed sx styling and redesigned menu scss Co-authored-by: Copilot <copilot@github.com> * Changed font size of identifier + removed unecessary font weight * Removed unnecessary MuiChip-root style * Adjusted rating box size and refactored upvote buttons into IconButtons Co-authored-by: Copilot <copilot@github.com> * Moving consts to reviews.ts, refactor const into JSX * Reduce gap; removed gap styling * Removing unnecessary code; targetting SvgIcon-root * Removed unnecessary border-radius style * Targetting SvgIcon * Refactor .reviewcard-header structure * Removed &.colored-vote class and resolved it with JSX * Added fallback to no grade specified * Removed unnecessary word-break style * Removal of dead styles * Removed unnecessary align-items styles * Removed redundant reviewcard-footer stylings * Removed unnecessary gap and justify-content styles * Removed unnecessary flex-direction styles * Removed unnecessary wrapper div * Removed some margin styles * Cutting redundant border-radius + word-wrap * Refactor reviewcard-author and icon class. * Removed redundant SvgIcon style * Removed media dead style * Changes to improve header-bottom * Removed header-bottom changes * Added margin to voting button to increase space against tags + fixed mobile menu item size --------- Co-authored-by: CLiang531 <73400286+CLiang531@users.noreply.github.com> Co-authored-by: Anthony Jenanian <55033931+anthonyj33@users.noreply.github.com> Co-authored-by: Kevin Wu <kevinwu098@gmail.com> Co-authored-by: Jeremiah Soe <soejeremiah@gmail.com> Co-authored-by: Awesome-E <54484616+Awesome-E@users.noreply.github.com> Co-authored-by: Ellis Liang <161268749+ellisl10@users.noreply.github.com> Co-authored-by: Caden Lee <149259302+CadenLee2@users.noreply.github.com> Co-authored-by: DerrickThrower <75774890+DerrickThrower@users.noreply.github.com> Co-authored-by: Jasonnguyn <jasonnguyen7506@gmail.com> Co-authored-by: Jason Nguyen <jdnguy11@uci.edu> Co-authored-by: Ascent817 <vapradeep817@gmail.com> Co-authored-by: Caden Lee <maltyg3332@gmail.com> Co-authored-by: Charlie Weinberger <70112746+charlieweinberger@users.noreply.github.com> Co-authored-by: Jeremiah <40682211+fiveminus1@users.noreply.github.com> Co-authored-by: atile4 <atile4444@gmail.com> Co-authored-by: Atticus <144712135+atile4@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summed up the counts of upvotes and downvotes separately in the backend.
Screenshots
Test Plan
Have to wait for better reviews to be merged before I reflect the frontend changes.
Issues
Closes # 1078