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

Redesign #166

Merged
merged 130 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
5cb219a
Update colors
TyHil Nov 13, 2023
6132800
Merge branch 'update-colors' into feedback-popup
TyHil Nov 28, 2023
594d915
Feedback UI
TyHil Nov 28, 2023
cdda35f
When to popup fix
TyHil Nov 29, 2023
b8bccc7
Add animations
TyHil Nov 29, 2023
a45d4ae
Redesign homepage (#127)
TyHil Dec 3, 2023
81ff10e
Update colors (#128)
TyHil Dec 4, 2023
2824801
Backend
TyHil Dec 5, 2023
1dac648
Merge branch 'develop' into redesign
TyHil Dec 7, 2023
cb8497c
Remove unused vars in homepage
TyHil Dec 7, 2023
10a5813
Remove unused vars in homepage again
TyHil Dec 7, 2023
187de2c
Merge branch 'redesign' into feedback-popup
TyHil Dec 7, 2023
ab877b4
Log sending environment
TyHil Dec 7, 2023
0c58ce3
Merge branch 'feedback-popup' of https://github.com/UTDNebula/utd-tre…
TyHil Dec 7, 2023
ad123fb
Move to component to clean up _app (also moved the GitHub button)
TyHil Dec 8, 2023
e6cec8c
Build fix
TyHil Dec 8, 2023
12ce1be
Autocomplete format change
TyHil Mar 27, 2024
7f21005
Reformat homepage
TyHil Mar 27, 2024
814e15b
Autocomplete allow returning course or professor
TyHil Mar 27, 2024
2e2a1b4
Homepage warning cleanup
TyHil Mar 27, 2024
4b39bd2
Input tag functionality!
TyHil Mar 27, 2024
ab22608
Format
TyHil Mar 27, 2024
5292823
Working enter
TyHil Mar 27, 2024
a78f475
Search bar on dashboard
TyHil Mar 27, 2024
13d22ec
Add tags with space from fetch
TyHil Mar 27, 2024
87c01cb
Format
TyHil Mar 27, 2024
1350832
Build fixes
TyHil Mar 27, 2024
abc0b5a
Prioritize pre-existing nodes in addWithParents for autocomplete grap…
TyHil Mar 28, 2024
c2f0750
Remove syllabi on homescreen
TyHil Mar 28, 2024
09083b7
Autocomplete tweak:
TyHil Mar 28, 2024
e5ff4ba
Fix double space problem
TyHil Mar 28, 2024
2491487
Fix using first node in addWithParents and allow number.section prof
TyHil Mar 28, 2024
3837551
Think I fixed looping back issue: must have least common node in firs…
TyHil Mar 28, 2024
b489065
Format
TyHil Mar 28, 2024
d0b45b6
Build fix
TyHil Mar 28, 2024
7578afc
Move autocomplete to seperate file
TyHil Mar 28, 2024
b6d0565
Fix course tag with space
TyHil Mar 29, 2024
51fe946
Build fix
TyHil Mar 29, 2024
a773e82
Add alert to test mobile
TyHil Mar 29, 2024
dad08e4
build fix
TyHil Mar 29, 2024
fa40569
alert all info for debugging
TyHil Mar 29, 2024
cac8297
onKeyDown to onInput bc of a chrome android bug
TyHil Mar 29, 2024
e2eb1f6
Filter Component
harshptl05 Apr 15, 2024
06127ba
Build changes
TyHil Apr 15, 2024
64a030f
change capitalization
TyHil Apr 15, 2024
8e73225
Allow multiple courses
TyHil Apr 17, 2024
4955440
Multiple filters
TyHil Apr 17, 2024
4e2b128
Small Select
harshptl05 Apr 17, 2024
2d10cf2
Labels and styling
TyHil Apr 17, 2024
87f8881
Add data to filters
TyHil Apr 17, 2024
d04e88d
None Label for Filter
harshptl05 Apr 17, 2024
6ea931a
remove default labels
harshptl05 Apr 17, 2024
397a339
Add filters to search query
TyHil Apr 17, 2024
836add3
Removing testing bits
TyHil Apr 24, 2024
7ecfd08
Build fix
TyHil Apr 24, 2024
970e866
Merge pull request #152 from UTDNebula/tags
iamwood Apr 25, 2024
304cb22
Prevent autocompletion of valid chips from triggering when deleting
iamwood Apr 27, 2024
f3ee607
Updated Dashboard to show results in an expandable table. Also rerout…
AbhiramTadepalli Apr 27, 2024
2abd994
Merge the new SearchBar with tags into the redesign-dashboard branch …
AbhiramTadepalli May 5, 2024
7bfd6d3
Lint and format fixes
TyHil May 5, 2024
9a2b247
redesign navbar
TyHil May 5, 2024
1ed0bb8
Colorful graph bars
TyHil May 5, 2024
9e734ee
Move fetchWithCache outside dashboard
TyHil May 5, 2024
e3635c8
Use next Image for background
TyHil May 7, 2024
aaa704c
Handles Cartesian Product of search tags (Courses and Professors) to …
AbhiramTadepalli May 7, 2024
d78c924
Merge pull request #156 from UTDNebula/redesign-navbar
iamwood May 7, 2024
3b6631b
Merge pull request #157 from UTDNebula/redesign-colorful-graphs
iamwood May 7, 2024
6f989e5
Merge branch 'redesign' into redesign-fetchWithCache
iamwood May 7, 2024
1bea503
Fix linting errors
iamwood May 7, 2024
6592de3
Merge pull request #158 from UTDNebula/redesign-fetchWithCache
iamwood May 7, 2024
f0e54bf
Merge pull request #136 from UTDNebula/feedback-popup
iamwood May 7, 2024
66477f3
Create the left-hand-size Search Results Component
AbhiramTadepalli May 7, 2024
cf0727c
Add dynamically generated Carousel to right hand side card
iamwood May 7, 2024
53f18bb
Remove dividers on tab nav
TyHil May 18, 2024
35c949e
Change bg color
TyHil May 18, 2024
7819dc0
Merge branch 'redesign' into redesign-dashboard
TyHil May 18, 2024
cf9e934
Rework fetch logic
TyHil Jun 13, 2024
c6bf541
Add academic session select, means working GPA
TyHil Jun 14, 2024
fea087f
Add compare rhs components and data forwarding
TyHil Jun 15, 2024
faf5b85
Show warning when not all academic sessions selected
TyHil Jun 16, 2024
cc51d75
Loading tracking and indicator
TyHil Jun 16, 2024
d132761
Table sorting
TyHil Jun 16, 2024
8f3d4ba
Type fixes
TyHil Jun 16, 2024
d29ca53
Comments
TyHil Jun 16, 2024
3fe1487
Bug fixes: autocomplete limit, rmp undefined, div in p
TyHil Jun 16, 2024
237e519
Autocomplete graph needed to be rebuilt
TyHil Jun 17, 2024
460ca70
Remove extra useEffect: move grade/rmp fetch logic to .then of result…
TyHil Jun 17, 2024
8e954d2
Reorg result dropdown
TyHil Jun 23, 2024
04ddefd
Professor RHS
TyHil Jun 24, 2024
f9da264
Remove filterdResults state
TyHil Jun 30, 2024
6d6678a
Prevent being able to add to compare before data is loaded
TyHil Jun 30, 2024
68ea660
Use skeletons for loaading
TyHil Jul 1, 2024
a7c6b4c
Remove unneeded useEffect
TyHil Jul 2, 2024
49eb989
Move dashboard empty and error to components
TyHil Jul 2, 2024
dc939cf
Fix key error for LoadingRow
TyHil Jul 2, 2024
8b9305c
Fix RMP error handling and duplicate objects when updating state to r…
TyHil Jul 2, 2024
866387d
Add single courses/profs to data fetch
TyHil Jul 4, 2024
78f6625
Add message for when no results are found
TyHil Jul 4, 2024
285e515
Refix RMP error handling
TyHil Jul 10, 2024
5b3eda3
Simplify promises
TyHil Jul 12, 2024
bcc4d21
Update dashboard on select, not change
TyHil Jul 12, 2024
fda7e31
Add search button
TyHil Jul 16, 2024
d6f0075
fix for missing prof data
TyHil Jul 16, 2024
6e44677
type fix
TyHil Jul 16, 2024
05125e3
Formatting
TyHil Jul 16, 2024
d5dd66a
Create course data API route, functions to fetch data, and variables …
AbhiramTadepalli Aug 4, 2024
b7dc0dd
Display course description in the RHS Course tab and pass through Cou…
AbhiramTadepalli Aug 5, 2024
54603a9
Format Course Description text and Class tab layout. Parse descriptio…
AbhiramTadepalli Aug 16, 2024
39866ee
Add browser navigation functionality. Allows back navigation and forw…
AbhiramTadepalli Aug 18, 2024
4ebbb57
Added course aggregate grade data (graph), course offering frequency,…
AbhiramTadepalli Aug 19, 2024
cceb8e5
Updated what data is fed to CourseOverview in index.tsx
AbhiramTadepalli Aug 19, 2024
bcae6c3
item with no rmp data fix
TyHil Aug 19, 2024
7fb9590
oops types
TyHil Aug 19, 2024
2f9a93c
Add basic Comparison function
AbhiramTadepalli Aug 21, 2024
8214ed8
Label the 'Overall' course result when applicable
AbhiramTadepalli Aug 21, 2024
a308b92
Loading animation on course RHS
TyHil Aug 21, 2024
c479789
Remove build change oops
TyHil Aug 21, 2024
a27bd27
re-fix sorting error in CourseData fetch. Makes sure that the newest …
AbhiramTadepalli Aug 21, 2024
0ea5a36
imperfect compare component. Displays all the information. Color-code…
AbhiramTadepalli Aug 24, 2024
9566da7
fixed compare state loading when grade data is not available
AbhiramTadepalli Aug 24, 2024
1403a6b
Use a type for state of fetched data instead of seperate x and xLoadi…
TyHil Aug 24, 2024
40ac424
Add more colors (I asked chatgpt for them)
TyHil Aug 24, 2024
c69ac89
Remove unused imports
TyHil Aug 24, 2024
a29d297
Add instuctions for when nothing is in compare
TyHil Aug 24, 2024
794b4a2
forgot to check types 😔
TyHil Aug 24, 2024
9365af9
forgot to format, on a roll
TyHil Aug 24, 2024
b3e5980
Big autocomplete changes!
TyHil Aug 26, 2024
af18101
Merge pull request #159 from UTDNebula/redesign-dashboard
AbhiramTadepalli Aug 26, 2024
77bd793
Merge branch 'develop' into redesign
TyHil Aug 26, 2024
512fd6f
GitHub tooltip didn't merge well
TyHil Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 27 additions & 32 deletions components/common/Carousel/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import React, { useState } from 'react';
import { TabNavMenu } from '../../navigation/tabNavMenu/tabNavMenu';

interface CarouselProps {
children: ReactJSXElement[];
names: string[] | string;
children: ReactJSXElement[] | ReactJSXElement;
}

/**
Expand Down Expand Up @@ -37,7 +38,7 @@ const variants = {
* @param props the props passed from the parent component
* @returns
*/
export const Carousel = (props: CarouselProps) => {
export const Carousel = ({ names, children }: CarouselProps) => {
//The card currently being displayed
const [currentCard, setCard] = useState(0);
//The Direction that the card is moving in
Expand All @@ -50,42 +51,36 @@ export const Carousel = (props: CarouselProps) => {
*/
const turn = (displacement: number) => {
//set direction
// console.log("displacement=",displacement);
setDir(displacement);
setCard(currentCard + displacement);
};

return (
<>
<TabNavMenu value={currentCard} turner={turn} />
<div
className="relative p-2 pt-0 lg:p-10"
style={{
height: '90%',
overflowX: 'hidden',
}}
>
<AnimatePresence>
<div className="h-full">
<motion.div
className="h-full"
key={currentCard}
custom={direction}
variants={variants}
initial="enter"
animate="center"
exit="exit"
transition={{
x: { type: 'spring', stiffness: 300, damping: 30 },
opacity: { duration: 0.2 },
}}
>
<div className="w-full h-full lg:h-full rounded-md mb-10">
{props.children[currentCard]}
</div>
</motion.div>
</div>
</AnimatePresence>
</div>
<TabNavMenu
value={currentCard}
options={Array.isArray(names) ? names : [names]}
turner={turn}
/>
<AnimatePresence>
<div className="p-4 lg:p-6">
<motion.div
key={currentCard}
custom={direction}
variants={variants}
initial="enter"
animate="center"
exit="exit"
transition={{
x: { type: 'spring', stiffness: 300, damping: 30 },
opacity: { duration: 0.2 },
}}
>
{Array.isArray(children) ? children[currentCard] : children}
</motion.div>
</div>
</AnimatePresence>
</>
);
};
Expand Down
76 changes: 76 additions & 0 deletions components/common/Compare/compare.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react';

import SearchQuery from '../../../modules/SearchQuery/SearchQuery';
import searchQueryLabel from '../../../modules/searchQueryLabel/searchQueryLabel';
import type { RateMyProfessorData } from '../../../pages/api/ratemyprofessorScraper';
import type {
GenericFetchedData,
GradesType,
} from '../../../pages/dashboard/index';
import { BarGraph } from '../../graph/BarGraph/BarGraph';
import CompareTable from '../CompareTable/compareTable';

type CompareProps = {
courses: SearchQuery[];
grades: { [key: string]: GenericFetchedData<GradesType> };
rmp: { [key: string]: GenericFetchedData<RateMyProfessorData> };
removeFromCompare: { (arg0: SearchQuery): void };
};

function convertNumbersToPercents(distribution: GradesType): number[] {
const total = distribution.total;
return distribution.grade_distribution.map(
(frequencyOfLetterGrade) => (frequencyOfLetterGrade / total) * 100,
);
}

const Compare = ({ courses, grades, rmp, removeFromCompare }: CompareProps) => {
if (courses.length === 0) {
return <p>Click a checkbox to add something to compare.</p>;
}

return (
<>
<div className="h-64">
<BarGraph
title="Grades"
xaxisLabels={[
'A+',
'A',
'A-',
'B+',
'B',
'B-',
'C+',
'C',
'C-',
'D+',
'D',
'D-',
'F',
'W',
]}
yaxisFormatter={(value) => Number(value).toLocaleString() + '%'}
series={courses.map((course) => {
const grade = grades[searchQueryLabel(course)];
return {
name: searchQueryLabel(course),
data:
grade.state === 'done'
? convertNumbersToPercents(grade.data)
: [],
};
})}
/>
</div>
<CompareTable
includedResults={courses}
grades={grades}
rmp={rmp}
removeFromCompare={removeFromCompare}
/>
</>
);
};

export default Compare;
3 changes: 3 additions & 0 deletions components/common/CompareTable/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```ts
<CompareTable />
```
Loading
Loading