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

Release 5.8.2 -- after prod hotfix + adding s25 courses to JHU parser #1150

Merged
merged 37 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4df39da
refractor: side scroller for course evaluations
zydtiger Apr 28, 2024
537c4b9
refractor: constants
zydtiger Apr 28, 2024
cbac6b5
refractor: endpoints
zydtiger Apr 28, 2024
b3cd708
refractor: majors
zydtiger Apr 28, 2024
c0b94ed
refractor: reactions
zydtiger Apr 28, 2024
c946c7f
refractor: school
zydtiger Apr 28, 2024
047a7d2
refractor: add types in endpoints
zydtiger May 5, 2024
96f46d2
lint: fix formatting
zydtiger May 5, 2024
a6f8036
fixed typo in screenshot button
ericzhy0815 Sep 25, 2024
f075a0d
added self portrait
ericzhy0815 Sep 25, 2024
301a296
fixed bug that showed invalid areas of focus
Oct 5, 2024
e78d179
ran prettier
Oct 5, 2024
f46a156
ran prettier.. again...
Oct 5, 2024
95cb0e3
Merge pull request #1137 from ericzhy0815/fix/screenshot-typo
spencerckhuang Oct 6, 2024
359afaa
about page updates
Oct 6, 2024
c8ada54
removed es2015 from tsconfig.json
Oct 6, 2024
48a8608
Merge pull request #1139 from spencerckhuang/feature/about-page-chang…
spencerckhuang Oct 8, 2024
e22425b
Merge pull request #1138 from spencerckhuang/fix/ui-bug-fixes-10-24
spencerckhuang Oct 8, 2024
165c5d4
fixed emoji issue
spencerckhuang Oct 10, 2024
3f6bab6
removed console log, renamed HTML variable
spencerckhuang Oct 10, 2024
63c4449
ran prettier
spencerckhuang Oct 10, 2024
626b8b6
removed package lock from commit
Oct 10, 2024
a5e7d72
nvm lol
spencerckhuang Oct 10, 2024
22016f8
adjusted twemoji import for SignupModal as well
spencerckhuang Oct 10, 2024
412b8ed
adjusted frontend test to account for new emoji img links
spencerckhuang Oct 10, 2024
b54e1f9
Merge pull request #1140 from spencerckhuang/fix/emoji-fix
spencerckhuang Oct 10, 2024
2b795df
refactor: change school type
zydtiger Oct 13, 2024
a4fb57b
refactor: adapt to endpoints compatibility
zydtiger Oct 13, 2024
161a362
fix lint
zydtiger Oct 13, 2024
5406643
Merge pull request #1123 from zydtiger/refractor/ui
spencerckhuang Oct 14, 2024
b0f1879
small about me page bug fixes
Oct 17, 2024
605df91
Merge pull request #1145 from spencerckhuang/hotfix/about-me-fixes
spencerckhuang Oct 17, 2024
fbe1c76
added s25 courses, removed 2020 courses
Oct 21, 2024
4db98b5
Merge pull request #1151 from spencerckhuang/hotfix/adding-s25-courses
spencerckhuang Oct 21, 2024
88cae80
updated run_parser.sh
Oct 21, 2024
2524cea
updated run_parser.sh again
Oct 21, 2024
ed95e56
Merge pull request #1152 from spencerckhuang/develop
spencerckhuang Oct 21, 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
2 changes: 1 addition & 1 deletion build/run_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo starting;
cd /code
# TODO: No params does not honor active-only semesters, this is hardcoded for now
python3 manage.py ingest jhu --term Fall --years 2024;
python3 manage.py ingest jhu --term Spring --years 2025;
python3 manage.py digest jhu;
python3 manage.py digest jhu --types evals;

Expand Down
1,541 changes: 884 additions & 657 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@reduxjs/toolkit": "^1.6.2",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@twemoji/api": "^15.1.0",
"@types/lodash": "^4.14.178",
"@types/twemoji": "^13.1.2",
"@typescript-eslint/eslint-plugin": "^5.6.0",
Expand Down Expand Up @@ -58,7 +59,7 @@
"lodash": "^4.17.21",
"loose-envify": "^1.4.0",
"moment": "^2.29.4",
"node-sass": "^7.0.0",
"node-sass": "^9.0.0",
"normalizr": "^3.6.1",
"postcss-loader": "^2.1.6",
"prop-types": "^15.8.1",
Expand Down Expand Up @@ -98,7 +99,6 @@
"streamify": "^0.2.9",
"style-loader": "^0.17.0",
"tinycolor2": "^1.4.2",
"twemoji": "^14.0.2",
"ua-parser-js": "^1.0.33",
"uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^0.5.8",
Expand Down Expand Up @@ -159,7 +159,6 @@
"jest": "^27.2.5",
"jest-environment-jsdom": "^27.4.4",
"nock": "^13.2.1",
"node-sass": "^7.0.0",
"prettier": "^2.5.1",
"regenerator-runtime": "^0.10.5",
"sass-loader": "^6.0.7",
Expand Down
4 changes: 2 additions & 2 deletions parsing/schools/jhu/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"full_academic_year_registration": false,
"single_access": false,
"active_semesters": {
"2020": ["Fall", "Spring"],
"2021": ["Fall", "Spring"],
"2022": ["Fall", "Spring"],
"2023": ["Fall", "Spring"],
"2024": ["Fall", "Spring"]
"2024": ["Fall", "Spring"],
"2025": ["Spring"]
},
"final_exams": {},
"registrar": true,
Expand Down
42 changes: 27 additions & 15 deletions semesterly/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,11 @@ <h2>Our Current Team</h2>
</div>
</div>
<div class="grid cf">

<div class="col-1-3 member">
<div class="circular" style="background-image: url(/static/img/jackywang.jpeg)"></div>
<h4 class="name">Jacky Wang</h4>
<h3>Team Lead</h3>
<h3>JHU '25</h3>
<div class="social">
<a href="https://www.jackywang.us/"><i class="fa fa-fw fa-link fa-2x"></i></a>
<a href="https://github.com/JiaqiWang18"><i class="fab fa-github fa-2x"></i></a>
<a href="https://www.linkedin.com/in/jiaqi-jacky-wang-y/"><i
class="fab fa-linkedin fa-2x"></i></a>
</div>
</div>
<div class="col-1-3 member">
<div class="circular" style="background-image: url(/static/img/spencerhuang.png)"></div>
<div class="circular" style="background-image: url(/static/img/shuang126_pfp.jpg)"></div>
<h4 class="name">Spencer Huang</h4>
<h3>Software Engineer - FullStack</h3>
<h3>Team Lead</h3>
<h3>JHU '26</h3>
<div class="social">
<a href="https://github.com/spencerckhuang"><i class="fab fa-github fa-2x"></i></a>
Expand Down Expand Up @@ -181,7 +170,7 @@ <h3>JHU '26</h3>
class="fab fa-linkedin fa-2x"></i></a>
</div>
</div>
<div class="col-1-3 member">
<div class="col-1-3 member">
<div class="circular" style="background-image: url(/static/img/tiger.jpg)"></div>
<h4 class="name">Tiger Ding</h4>
<h3>Software Engineer - FullStack</h3>
Expand All @@ -192,6 +181,17 @@ <h3>JHU '27</h3>
class="fab fa-linkedin fa-2x"></i></a>
</div>
</div>
<div class="col-1-3 member">
<div class="circular" style="background-image: url(/static/img/ericzhao.jpg)"></div>
<h4 class="name">Eric Zhao</h4>
<h3>Software Engineer - FullStack</h3>
<h3>JHU '26</h3>
<div class="social">
<a href="https://github.com/ericzhy0815"><i class="fab fa-github fa-2x"></i></a>
<a href="https://www.linkedin.com/in/hongyu-zhao815/"><i
class="fab fa-linkedin fa-2x"></i></a>
</div>
</div>
</div>
<div class="grid cf">
<div class="col-1-1">
Expand Down Expand Up @@ -229,6 +229,18 @@ <h3>Sr. Software Engineer - IT@JH</h3>
<div class="col-1-1">
<h2>Our Former Team Members</h2>
</div>
<div class="col-1-4 member">
<div class="circular" style="background-image: url(/static/img/jackywang.jpeg)"></div>
<h4 class="name">Jacky Wang</h4>
<h3>Former Team Lead</h3>
<h3>JHU '25</h3>
<div class="social">
<a href="https://www.jackywang.us/"><i class="fa fa-fw fa-link fa-2x"></i></a>
<a href="https://github.com/JiaqiWang18"><i class="fab fa-github fa-2x"></i></a>
<a href="https://www.linkedin.com/in/jiaqi-jacky-wang-y/"><i
class="fab fa-linkedin fa-2x"></i></a>
</div>
</div>
<div class="col-1-4 member">
<div class="circular" style="background-image: url(/static/img/jamesswang.jpg)"></div>
<h4 class="name">James Wang</h4>
Expand Down
Binary file added static/img/ericzhao.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/shuang126_pfp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/spencerhuang.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="🔥"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f525.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f525.png"
/>
</div>
<div
Expand Down Expand Up @@ -223,7 +223,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="😍"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f60d.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f60d.png"
/>
</div>
<div
Expand Down Expand Up @@ -269,7 +269,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="💩"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f4a9.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f4a9.png"
/>
</div>
<div
Expand Down Expand Up @@ -315,7 +315,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="😐"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f610.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f610.png"
/>
</div>
<div
Expand Down Expand Up @@ -361,7 +361,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="😴"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f634.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f634.png"
/>
</div>
<div
Expand Down Expand Up @@ -407,7 +407,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="😩"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f629.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f629.png"
/>
</div>
<div
Expand Down Expand Up @@ -453,7 +453,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="💯"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f4af.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f4af.png"
/>
</div>
<div
Expand Down Expand Up @@ -499,7 +499,7 @@ exports[`CourseModalBody correctly renders 1`] = `
alt="🤓"
class="emoji"
draggable="false"
src="https://twemoji.maxcdn.com/v/14.0.2/72x72/1f913.png"
src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/72x72/1f913.png"
/>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,81 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/

import { FriendRequest, User } from "../ui/modals/PeerModalComponents/Types";
import { Course, Semester, Slot, Timetable } from "./commonTypes";

/* server endpoints */
export const getLogiCalEndpoint = () => "/user/log_ical/";
export const getCourseInfoEndpoint = (courseId, semester) =>
export const getCourseInfoEndpoint = (courseId: Course["id"], semester: string) =>
`/courses/${semester}/id/${courseId}/`;
export const getCourseSearchEndpoint = (query, semester, page = 1, limit = 6) =>
`/search/${semester}/${query}/?page=${page}&limit=${limit}`;
export const getCourseSearchEndpoint = (
query: string,
semester: string,
page = 1,
limit = 6
) => `/search/${semester}/${query}/?page=${page}&limit=${limit}`;
export const getTimetablesEndpoint = () => "/timetables/";
export const getLoadSavedTimetablesEndpoint = (semester) =>
export const getLoadSavedTimetablesEndpoint = (semester: Semester) =>
`/user/timetables/${semester.name}/${semester.year}/`;
export const getSaveTimetableEndpoint = () => "/user/timetables/";
export const getPersonalEventEndpoint = () => "/user/events/";
export const getDeleteTimetableEndpoint = (semester, name) =>
export const getDeleteTimetableEndpoint = (semester: Semester, name: string) =>
`/user/timetables/${semester.name}/${semester.year}/${name}/`;
export const getTimetablePreferencesEndpoint = (id) =>
export const getTimetablePreferencesEndpoint = (id: Timetable["id"]) =>
`/user/timetables/${id}/preferences/`;
export const getSaveSettingsEndpoint = () => "/user/settings/";
export const getClassmatesEndpoint = (semester, courses) =>
export const getClassmatesEndpoint = (
semester: Semester,
courses: Array<Slot["course"]>
) =>
`/user/classmates/${semester.name}/${semester.year}?${$.param({
course_ids: courses,
})}`;
export const getClassmatesInCourseEndpoint = (school, semester, courseId) =>
`/course_classmates/${school}/${semester}/id/${courseId}/`;
export const getMostClassmatesCountEndpoint = (semester, courses) =>
export const getClassmatesInCourseEndpoint = (
school: string,
semester: string,
courseId: Course["id"]
) => `/course_classmates/${school}/${semester}/id/${courseId}/`;
export const getMostClassmatesCountEndpoint = (
semester: Semester,
courses: Array<Slot["course"]>
) =>
`/user/classmates/${semester.name}/${semester.year}?${$.param({
course_ids: courses,
count: true,
})}`;
export const getFriendsEndpoint = (semester) =>
export const getFriendsEndpoint = (semester: Semester) =>
`/user/classmates/${semester.name}/${semester.year}/`;

// Friends endpoints
export const getFetchFriendsEndpointEndpoint = () => `/friends/`;
export const getRemoveFriendEndpoint = (userId) => `/friends/remove/${userId}`;
export const getSearchFriendsEndpoint = (query) => `/friends/search/${query}`;
export const getSendFriendRequestEndpoint = (userId) =>
export const getRemoveFriendEndpoint = (userId: User["userId"]) =>
`/friends/remove/${userId}`;
export const getSearchFriendsEndpoint = (query: string) => `/friends/search/${query}`;
export const getSendFriendRequestEndpoint = (userId: User["userId"]) =>
`/friends/send_request/${userId}`;
export const getFriendRequestsSentEndpoint = () => `/friends/requests_sent`;
export const getFriendRequestsReceivedEndpoint = () => `friends/requests_received`;
export const getAcceptFriendRequestEndpoint = (friendRequestId) =>
`/friends/accept_request/${friendRequestId}`;
export const getRejectFriendRequestEndpoint = (friendRequestId) =>
`/friends/reject_request/${friendRequestId}`;
export const getAcceptFriendRequestEndpoint = (
friendRequestId: FriendRequest["friendRequestId"]
) => `/friends/accept_request/${friendRequestId}`;
export const getRejectFriendRequestEndpoint = (
friendRequestId: FriendRequest["friendRequestId"] | string
) => `/friends/reject_request/${friendRequestId}`;

export const getSchoolInfoEndpoint = (school) => `/school/${school}/`;
export const getSchoolInfoEndpoint = (school: string) => `/school/${school}/`;
export const getReactToCourseEndpoint = () => "/user/reactions/";
export const getRequestShareTimetableLinkEndpoint = () => "/timetables/links/";
export const acceptTOSEndpoint = () => "/tos/accept/";
export function getCourseShareLinkFromModal(code, semester) {
export function getCourseShareLinkFromModal(
code: Course["code"] | number,
semester: Semester
) {
return `/course/${encodeURIComponent(code)}/${semester.name}/${semester.year}`;
}
// TODO: ${window.location.href.split('/')[2]} insert above ^

export function getCourseShareLink(code, semester) {
export function getCourseShareLink(code: Course["code"] | number, semester: Semester) {
return `/course/${encodeURIComponent(code)}/${semester.name}/${semester.year}`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const VALID_SCHOOLS = [
"salisbury",
];

export const getSchoolSpecificInfo = (school) => {
export const getSchoolSpecificInfo = (school: string) => {
switch (school) {
case "uoft":
return {
Expand Down
2 changes: 1 addition & 1 deletion static/js/redux/ui/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const Calendar = (props: CalendarProps) => {

const screenShotButton = props.registrarSupported ? (
<div className="cal-btn-wrapper">
<Tooltip title={<Typography fontSize={12}>Screeshot</Typography>}>
<Tooltip title={<Typography fontSize={12}>Screenshot</Typography>}>
<button
type="submit"
form="form1"
Expand Down
14 changes: 11 additions & 3 deletions static/js/redux/ui/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,24 @@ const SearchResult = (props: SearchResultProps) => {
};

type AreaBubbleProps = { areas: string[] };
export const AreaBubble = ({ areas }: AreaBubbleProps) =>
areas.length > 0 ? (
export const AreaBubble = ({ areas }: AreaBubbleProps) => {
const isValidArea = (rawAreaSingle: string): boolean => {
const validAreas = ["H", "S", "N", "E", "Q", "writing"];
return validAreas.includes(rawAreaSingle);
};

const validAreas = areas.filter((areaCandidate) => isValidArea(areaCandidate));

return validAreas.length > 0 ? (
<div className="areas">
{areas.map((area) => (
{validAreas.map((area) => (
<div className={`bubble ${area}`} key={area}>
{area}
</div>
))}
</div>
) : null;
};

type WritingIntensiveProps = { isWritingIntensive: string };
export const WritingIntensive = ({ isWritingIntensive }: WritingIntensiveProps) =>
Expand Down
47 changes: 47 additions & 0 deletions static/js/redux/ui/SideScroller.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright (C) 2017 Semester.ly Technologies, LLC

Semester.ly is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Semester.ly is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/

import React, { useState } from "react";

interface SideScrollerProps {
content: JSX.Element[];
navItems: JSX.Element[];
}

function SideScroller(props: SideScrollerProps) {
const [activeSlide, setActiveSlide] = useState(0);

let navItems = null;
if (props.navItems) {
const navs = [];

for (let i = 0; i < props.navItems.length; i++) {
const cls = activeSlide === i ? " nav-item-active" : "";
navs.push(
<span key={i} className={`nav-item${cls}`} onClick={() => setActiveSlide(i)}>
{props.navItems[i]}
</span>
);
}
navItems = <div className="scroll-nav">{navs}</div>;
}
return (
<div>
{navItems}
{props.content[activeSlide]}
</div>
);
}

export default SideScroller;
Loading
Loading