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

Monitor crowd-sourced data pod #734

Closed
wants to merge 324 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
324 commits
Select commit Hold shift + click to select a range
ad70465
fixed merge header
Nov 15, 2024
a665864
removed isAllTime bug
Nov 15, 2024
b58bb8c
fixed color coding
PineND Nov 15, 2024
6fc2d46
Add thank you popup and update attendance requirement logic
Jessica-Leee Nov 18, 2024
9e60b2d
Add thank you popup and update attendance requirement logic
Jessica-Leee Nov 18, 2024
e30ae68
generic type for storing metric data
Nov 18, 2024
d155d39
lint
Nov 18, 2024
c7c745b
fixed warnings
Nov 19, 2024
21f2b7a
lint
Nov 19, 2024
02625e9
error fixes
Nov 19, 2024
9306904
lint
Nov 19, 2024
78fc5ea
removed unused variables
Nov 19, 2024
a5c9d79
lint
Nov 19, 2024
359c961
Adopt to dark mode for the confimation pop up
Jessica-Leee Nov 19, 2024
57b71a4
make Deleterating returns updated Aggregation
PineND Nov 20, 2024
dbb1f11
added empty state, fixed some styling
nnicolee Nov 20, 2024
4100cc8
Minor Styling changes
Jessica-Leee Nov 20, 2024
61a6103
make rating tab allign more closely with figma
PineND Nov 21, 2024
1202d1a
font size
PineND Nov 21, 2024
dc497b0
grammar fix + border fix
PineND Nov 21, 2024
1368a39
unfinished ratings container
Nov 21, 2024
468a4df
lint
Nov 21, 2024
ed5ae62
fixed build errors
Nov 21, 2024
5ea1eb9
lint
Nov 21, 2024
ce9464f
fixed some styling
nnicolee Nov 21, 2024
90c74ba
fixed dropdown styling
nnicolee Nov 21, 2024
dd27342
removed tooltip arrow
nnicolee Nov 21, 2024
f497ef4
changed color
nnicolee Nov 22, 2024
e8d1db5
fixed rating to only show ratings
Nov 22, 2024
b730eb9
lint
Nov 22, 2024
5e316b9
Merge branch 'gql' into crowd-sourced-data
mathhulk Nov 22, 2024
4f4444d
fix: Dependencies
mathhulk Nov 22, 2024
a241155
Merge branch 'gql' into crowd-sourced-data
mathhulk Nov 22, 2024
5799558
chore: Revert docker-compose.yaml
mathhulk Nov 22, 2024
9d39f8a
fix: MongoDB replica set
mathhulk Nov 22, 2024
91044fe
fix: Remove testing hosts
mathhulk Nov 22, 2024
e0e1378
chore: One replica for the set during development
mathhulk Nov 24, 2024
b301658
ratings bubble changes
Nov 26, 2024
46a2bcd
finished my rating summary
Nov 26, 2024
cb5cdb6
lint
Nov 26, 2024
9f14510
`ratingContainer` now checks for sign in status
PineND Nov 27, 2024
893aec1
Allow for expandability of rating function through abstraction of enu…
PineND Nov 29, 2024
200b7f3
streamlined sign in to review experience
PineND Nov 29, 2024
f082b18
fix transaction handling + pop up that redownloads the inter font :b
PineND Dec 2, 2024
04d717e
small placeholder fix that edits out reccomended metrics
PineND Dec 2, 2024
ede0e7a
return boolean for rating mutations
PineND Dec 2, 2024
5064c6b
improved sign in + getCourse api
PineND Dec 2, 2024
b4ab409
pray that this works
PineND Dec 2, 2024
056a3c8
user rating matching
PineND Dec 2, 2024
eea466e
better async management for ratings
PineND Dec 2, 2024
a96e560
simplifying loading instance
PineND Dec 2, 2024
3942ad6
changed hasRatings to use memo
Dec 2, 2024
c7ec2ac
lint
Dec 2, 2024
d19ada9
debug
PineND Dec 2, 2024
54b9bb9
debug
PineND Dec 2, 2024
384e011
resolve build
PineND Dec 2, 2024
aca4d97
lint
PineND Dec 2, 2024
767f520
button styling improvement
PineND Dec 2, 2024
f0aca4b
lint
PineND Dec 2, 2024
6a9db2d
styling improvements
PineND Dec 2, 2024
e19853d
lint
PineND Dec 2, 2024
5d8d47b
tooltip improvements
PineND Dec 2, 2024
d4fbaea
Minor Styling changes
Jessica-Leee Dec 3, 2024
ca5ab90
Merge remote-tracking branch 'origin/crowd-sourced-data' into crowd-s…
Jessica-Leee Dec 3, 2024
4e7ed4e
small styling improvements
PineND Dec 3, 2024
dd44dc3
margin fix
PineND Dec 3, 2024
844e38f
Connecting UserfeedbackModal with Overview Page
Jessica-Leee Dec 3, 2024
64eee8d
styling improvements
PineND Dec 3, 2024
61e3125
lint
PineND Dec 3, 2024
cdaac2b
resolved compilation error
PineND Dec 3, 2024
6a45fb7
lint
PineND Dec 3, 2024
8bcd06c
improve code compactness
PineND Dec 3, 2024
ee9fed5
lint
PineND Dec 3, 2024
176a242
stable version
PineND Dec 3, 2024
a7d16cf
lint
PineND Dec 3, 2024
7590a73
working counter for ratings tab, clean up hardcoded hex values
PineND Dec 3, 2024
d03bea8
lint
PineND Dec 3, 2024
8518fcd
Minor style changes
Jessica-Leee Dec 3, 2024
28e0ced
enforce metrics sorting
PineND Dec 3, 2024
e79b1d4
reduce ratingsContainer complexity
PineND Dec 3, 2024
c2b163a
lint
PineND Dec 3, 2024
ad47022
Merge remote-tracking branch 'origin/crowd-sourced-data' into crowd-s…
Jessica-Leee Dec 3, 2024
5a30dc9
minor styling change for dark/ligtht mode
nnicolee Dec 3, 2024
5e0b252
Merge branch 'crowd-sourced-data' of https://github.com/asuc-octo/ber…
nnicolee Dec 3, 2024
6a3adc9
Minor style changes
Jessica-Leee Dec 3, 2024
a9b41ca
styling improvements
PineND Dec 3, 2024
a8f25e1
Merge branch 'crowd-sourced-data' of github.com:asuc-octo/berkeleytim…
PineND Dec 3, 2024
7589a77
fixed conflicts?
PineND Dec 3, 2024
b8cacf1
resolve
PineND Dec 3, 2024
7a2cfcb
lint
PineND Dec 3, 2024
87e89f0
isSemester initialization - working progress
PineND Dec 3, 2024
196adf4
schedule comparison missmatch?
PineND Dec 3, 2024
80e3f55
lint
PineND Dec 3, 2024
9a50207
add clearable property to drop down
PineND Dec 3, 2024
13ad00e
min width
PineND Dec 3, 2024
c78b1fb
semi working semester filtering
PineND Dec 4, 2024
a2697fb
compiling fix
PineND Dec 4, 2024
a0035aa
lint
PineND Dec 4, 2024
0f03f6b
better error handling
PineND Dec 4, 2024
dae256f
typecasting improvement
PineND Dec 4, 2024
21bbbd5
lint
PineND Dec 4, 2024
4ae2fb6
user interaction improvement
PineND Dec 4, 2024
2ace921
lint
PineND Dec 4, 2024
7c9959a
user feedback form update
Dec 4, 2024
6838ae1
lint
Dec 4, 2024
068a6a2
fixed overview page userfeedbackform connection
Dec 4, 2024
bc902b9
lint
Dec 4, 2024
eb37878
filtering for past classes in drop down
PineND Dec 4, 2024
881dbfc
backend to support semesters with rating
PineND Dec 4, 2024
4cabeaf
filter to show user semesters that have ratings only
PineND Dec 4, 2024
43dc2cf
lint
PineND Dec 4, 2024
7e4dd74
preserve original data when doing drop down filter
PineND Dec 4, 2024
53c51c2
lint
PineND Dec 4, 2024
89459c2
improve reload condition
PineND Dec 4, 2024
e7fad30
lint
PineND Dec 4, 2024
4ca04d3
delete confirmation popup
Dec 4, 2024
5716f54
lint
Dec 4, 2024
9cdc3d2
change isPastTerm to isValidTerm to accomodate for current semester
PineND Dec 4, 2024
daaac4d
Merge branch 'crowd-sourced-data' of github.com:asuc-octo/berkeleytim…
PineND Dec 4, 2024
1960b1c
improve styling for delete rating
PineND Dec 4, 2024
8969356
lint
PineND Dec 4, 2024
75daacd
more styling improvements
PineND Dec 4, 2024
d32670d
improved pop up
PineND Dec 4, 2024
cd17a29
fix inconsistent padding
PineND Dec 4, 2024
899e6e5
background + border inconsistencies fix
PineND Dec 4, 2024
55ff032
styling improvements
PineND Dec 4, 2024
e14d757
improve grayed out button clarity
PineND Dec 4, 2024
1955226
lint
PineND Dec 4, 2024
bd175e9
full spanning div
PineND Dec 4, 2024
d3f0ee0
improve Rate Course pop up drop down
PineND Dec 4, 2024
59a3c41
lint
PineND Dec 4, 2024
5feb50b
remove default term in the drop down
PineND Dec 4, 2024
7b8e011
padding consistency
PineND Dec 4, 2024
4a1d05e
minor changes
PineND Dec 4, 2024
01aa953
more minor changes
PineND Dec 4, 2024
27a908a
attempt at making things compile (not quite working)
PineND Dec 5, 2024
d116b59
lint
PineND Dec 5, 2024
f15caca
merge with gql
PineND Dec 5, 2024
e3d4db7
lint
PineND Dec 5, 2024
2f715cf
use replicaset in hozer
maxmwang Dec 6, 2024
7568207
fix typo
maxmwang Dec 6, 2024
03bf52a
fixed styling issues for confirmation
nnicolee Dec 6, 2024
a4df859
fixed compilation
PineND Dec 6, 2024
af9c537
Merge remote-tracking branch 'origin/crowd-sourced-data-frontend-work…
PineND Dec 6, 2024
f230515
fix catalog styling
PineND Dec 6, 2024
596d64b
lint
PineND Dec 6, 2024
e32a5b3
fix iconoir icon
PineND Dec 6, 2024
efa9950
Merge branch 'gql' into crowd-sourced-data
mathhulk Dec 6, 2024
7114636
chore: Formatting
mathhulk Dec 6, 2024
29cb431
updated metric to show counts
Dec 12, 2024
e64a71f
lint
Dec 12, 2024
b3723c3
commented out placeholder
Dec 12, 2024
ef258c8
added blur background to popup confirmations, delete state now waits …
PineND Dec 15, 2024
486bfc4
Merge branch 'crowd-sourced-data' of github.com:asuc-octo/berkeleytim…
PineND Dec 15, 2024
50fbdcf
fix bad naming
PineND Dec 15, 2024
0ebcb1e
minor padding improvement
PineND Dec 15, 2024
0e646ec
fixed padding
PineND Dec 16, 2024
3b7886d
fix persistent unsubmitted edits across different ratingcontainer ins…
PineND Dec 16, 2024
90e57a1
prevent edit submission without changes
PineND Dec 16, 2024
de77eea
better button name
PineND Dec 16, 2024
ec47e00
fixed lightmode tag coloring
PineND Dec 16, 2024
c68203e
remove unused styling
PineND Dec 16, 2024
bad5c11
darkmode proper coloring
PineND Dec 16, 2024
0337adf
remove console logs
PineND Dec 16, 2024
848f4c0
allows for edits to remove optional ratings - ratingSubmit now checks…
PineND Dec 16, 2024
c08228f
improved mutation logic for submit/edit
PineND Dec 16, 2024
fcf902a
minor padding improvement
PineND Dec 16, 2024
bfb885c
new tooltip styling
PineND Dec 16, 2024
3eb7013
improved tooltip
PineND Dec 16, 2024
7d0c398
color
PineND Dec 16, 2024
d923b03
add not logged in handling
PineND Dec 16, 2024
18352ab
fixes docker-compose configs for build
PineND Dec 17, 2024
1edd289
bug fix: unwanted page refresh
PineND Dec 17, 2024
8724b0c
clean up
PineND Dec 17, 2024
a31a3fa
improvement to reduce code duplicates and complexity in Detail/index.tsx
PineND Dec 17, 2024
9255060
speed up edit operation by a few folds through some logic layers to a…
PineND Dec 17, 2024
29a6639
minor styling improvement
PineND Dec 17, 2024
22164fb
more styling improvements
PineND Dec 17, 2024
2975e79
lint
PineND Dec 17, 2024
85aa57b
responsive url for feedbackModal
PineND Dec 17, 2024
545591a
improved submission flow
PineND Dec 17, 2024
7113b65
handle edit case
PineND Dec 17, 2024
72ef95a
logged out state handling
PineND Dec 17, 2024
cd509bc
lint
PineND Dec 17, 2024
3880f76
change custom icon to iconoir library ones
PineND Dec 17, 2024
5bdf7ce
fix illogical abstraction structure
PineND Dec 17, 2024
df5aea2
lint
PineND Dec 17, 2024
798bbc3
working frontend logic for attendance + recording
PineND Dec 18, 2024
4bd53c0
lint
PineND Dec 18, 2024
afcaafa
lint
PineND Dec 18, 2024
85934bb
fix empty state identifier
PineND Dec 18, 2024
dda0741
formatting
PineND Dec 18, 2024
3697a51
remove old method of checking for user rating count
PineND Dec 18, 2024
70425bb
new rating count constraint implementation. Contraint now checks for …
PineND Dec 18, 2024
f2ffd25
lint
PineND Dec 18, 2024
8c5662b
add filter for current class when checking maxRatings constraint
PineND Dec 20, 2024
6c98eea
combine simililar code functions into the same file, improve naming
PineND Dec 20, 2024
a906d6d
lint
PineND Dec 20, 2024
bf61bd1
move userFEedbackModal into rating folder
PineND Dec 20, 2024
cd02911
lint
PineND Dec 20, 2024
da1f8b7
improve reactSelect consistency
PineND Dec 20, 2024
9bd9b85
fix button consistencies
PineND Dec 20, 2024
73a1b57
styling improvements
PineND Dec 20, 2024
0f54b0b
styling improvements
PineND Dec 20, 2024
cc3dba2
auto select term if there is only 1 option
PineND Dec 20, 2024
7de5c93
lint
PineND Dec 20, 2024
488ed2f
fix build issue
PineND Dec 20, 2024
77ee64c
lint
PineND Dec 20, 2024
5e9979d
add update state for summary page and rating bubble count on mutations
PineND Dec 20, 2024
ce438b5
added metric.value to user submitted rating view
PineND Dec 20, 2024
89446bc
remove unnecessary aggregratedRating attached to GetClass query - we …
PineND Dec 20, 2024
959629e
improve loading behavior
PineND Dec 20, 2024
a71d558
first iteration term checker for whether rating tab should exist
PineND Dec 20, 2024
e0c15e4
removed placeholder
PineND Dec 20, 2024
ce9fea5
minor clean up
PineND Dec 20, 2024
ebd7834
lint
PineND Dec 20, 2024
0e053f1
Merge branch 'gql' into crowd-sourced-data
PineND Dec 20, 2024
37d8d0d
make prettier same as gql
PineND Dec 20, 2024
2c64d08
prettier config
PineND Dec 20, 2024
06e1f0b
graphql specific error handling
PineND Dec 20, 2024
0748bf6
adjust threshhold
PineND Dec 20, 2024
f18a8c6
compiliation error fix
PineND Dec 21, 2024
49acbe1
switch paradigm for attendance requirement logic
PineND Dec 21, 2024
c2d58ed
remove redudant courseContext
PineND Dec 21, 2024
7591e12
make Overview cleaner
PineND Dec 21, 2024
800ee8a
improvements
PineND Dec 21, 2024
a60b480
more improvements
PineND Dec 21, 2024
c64f395
clean up css
PineND Dec 21, 2024
fd6a411
remove random React import
PineND Dec 21, 2024
c3701cc
clean up
PineND Dec 21, 2024
82debc6
final clean up
PineND Dec 21, 2024
2bd536d
lint
PineND Dec 21, 2024
10d2b5f
v1 ratingsConfig hyperparams
PineND Dec 22, 2024
4dc221a
memoized rating button logic
PineND Dec 22, 2024
61939b2
frontend logic to prevent user from submitting a new rating if rating…
PineND Dec 22, 2024
59b5e9a
lint
PineND Dec 22, 2024
f050fe8
check url state for modal closing
PineND Dec 22, 2024
5cd4106
check constraint filters out other classes
PineND Dec 22, 2024
a053627
lint
PineND Dec 22, 2024
3b4b054
minor button logic improvement
PineND Dec 22, 2024
9eaaba3
add count for semester instance
PineND Dec 22, 2024
1a0afad
fix button logic
PineND Dec 22, 2024
272cc60
remove React. for import
PineND Dec 22, 2024
b58518d
lint
PineND Dec 22, 2024
8e00ced
react mouse event fix
PineND Dec 22, 2024
5666131
lint
PineND Dec 22, 2024
5cf24bc
TODO messages for future iteration
PineND Dec 22, 2024
5be16af
some more TODO messages
PineND Dec 22, 2024
52d4221
forgot to comment out everything
PineND Dec 22, 2024
5f7e51a
minor fixes
PineND Dec 22, 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
17 changes: 4 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
*.pyc
*.DS_Store
*.log
venv*
*.dump
*.rdb
.vagrant
.idea
.env*
!.env.template
vagrant/data/data.tar.gz
build/postgres-data
build/requirements.txt
.sass-cache/
postgres-data.tar.gz
bt_main.sql
/.vscode
node_modules/
build/docker-compose.yml
config.statuspage.json
.vscode
node_modules
*.cert
*.key
dist/
db/
data/
mdb.archive
bt_seed.sql
bt_seed.sql.gz
.turbo
generated-types/
generated-types
2 changes: 2 additions & 0 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
"@keyv/redis": "^4.0.2",
"@repo/common": "*",
"@repo/sis-api": "*",
"@repo/shared": "*",
"@types/papaparse": "^5.3.15",
"compression": "^1.7.5",
"connect-redis": "^7.1.1",
"cors": "^2.8.5",
Expand Down
20 changes: 20 additions & 0 deletions apps/backend/src/bootstrap/loaders/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ export default async (redis: RedisClientType) => {
// TODO(production): Disable introspection in production
introspection: true,
cache: new RedisCache(redis),
formatError: (formattedError) => {
// Return BAD_USER_INPUT errors as 400s
if (formattedError.extensions?.code === "BAD_USER_INPUT") {
return {
...formattedError,
extensions: {
...formattedError.extensions,
http: { status: 400 },
},
};
}
// Return other errors as internal server errors
return {
message: formattedError.message,
extensions: {
code: "INTERNAL_SERVER_ERROR",
http: { status: 500 },
},
};
},
});

await server.start();
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/modules/class/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface ClassRelationships {
primarySection: null;
sections: null;
gradeDistribution: null;
aggregatedRatings: null;
}

export type IntermediateClass = Omit<
Expand Down Expand Up @@ -46,6 +47,7 @@ export const formatClass = (_class: ClassType) => {
term: null,
primarySection: null,
sections: null,
aggregatedRatings: null,

description: _class.classDescription,
gradingBasis: _class.gradingBasis?.description as ClassGradingBasis,
Expand Down
15 changes: 15 additions & 0 deletions apps/backend/src/modules/class/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GraphQLError, GraphQLScalarType, Kind } from "graphql";
import { getCourse } from "../course/controller";
import { CourseModule } from "../course/generated-types/module-types";
import { getGradeDistributionByClass } from "../grade-distribution/controller";
import { getClassAggregatedRatings } from "../rating/controller";
import { getTerm } from "../term/controller";
import { TermModule } from "../term/generated-types/module-types";
import {
Expand Down Expand Up @@ -146,6 +147,20 @@ const resolvers: ClassModule.Resolvers = {

return gradeDistribution;
},

aggregatedRatings: async (
parent: IntermediateClass | ClassModule.Class
) => {
const aggregatedRatings = await getClassAggregatedRatings(
parent.subject,
parent.courseNumber,
parent.semester,
parent.year,
parent.number
);

return aggregatedRatings;
},
},

Section: {
Expand Down
1 change: 1 addition & 0 deletions apps/backend/src/modules/class/typedefs/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default gql`
sections: [Section!]!
term: Term!
gradeDistribution: GradeDistribution!
aggregatedRatings: AggregatedRatings!

"Attributes"
gradingBasis: ClassGradingBasis!
Expand Down
12 changes: 12 additions & 0 deletions apps/backend/src/modules/course/resolver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GraphQLError, GraphQLScalarType, Kind } from "graphql";

import { getGradeDistributionByCourse } from "../grade-distribution/controller";
import { getCourseAggregatedRatings } from "../rating/controller";
import {
getAssociatedCourses,
getClassesByCourse,
Expand Down Expand Up @@ -90,6 +91,17 @@ const resolvers: CourseModule.Resolvers = {

return gradeDistribution;
},

aggregatedRatings: async (
parent: IntermediateCourse | CourseModule.Course
) => {
const aggregatedRatings = await getCourseAggregatedRatings(
parent.subject,
parent.number
);

return aggregatedRatings;
},
},

// @ts-expect-error - Not sure how to type properly
Expand Down
1 change: 1 addition & 0 deletions apps/backend/src/modules/course/typedefs/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default gql`
classes: [Class!]!
crossListing: [Course!]!
requiredCourses: [Course!]!
aggregatedRatings: AggregatedRatings!

"Attributes"
requirements: String
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Common from "./common";
import Course from "./course";
import Enrollment from "./enrollment";
import GradeDistribution from "./grade-distribution";
import Rating from "./rating";
import Schedule from "./schedule";
import Term from "./term";
import User from "./user";
Expand All @@ -20,6 +21,7 @@ const modules = [
Course,
Class,
Enrollment,
Rating,
];

export const resolvers = merge(modules.map((module) => module.resolver));
Expand Down
Loading