Skip to content

Commit

Permalink
Merge from master to my branch (#680)
Browse files Browse the repository at this point in the history
* Creating Contribution Guide (#644)

This merge is a test to see if Lighthouse CI is being honest to us or not

Co-authored-by: dorian451 <112524240+dorian451@users.noreply.github.com>

* Fix docker (#655)

* Update requirements.txt

* Update requirements.txt

* Color Mode Button/Notification

-Changed the notification button to a switch
-Added brief text in front so user knows function
- Moved toast notification to top-center of screen

* Delete workspace.xml

* Dropdown

added drop down to condense all 3 functions of button/moon

* Drop Down Funcitonal

Drop down logic is now functional, still need to add more styling

* Updated Notifications and functions

Changed the text and color of notifications. added some logic for functions. currently have one bug where sometimes the first mode clicked is the opposite.

* Navbar highlight current page (#632)

* add highlight to currently selected page in navbar
(this took a lot longer than it should have)

* make border thicker

* fix navbar only being highlighted on top-level pages

* beep boop Github Action Master Branch CI Prettier hard at work

* Font and color branch (#625)

* Update CourseExplorer.vue

Changed the color of the title same ad other pages.

* Font_and_color_changed

* beep boop Github Action Master Branch CI Prettier hard at work

* See if  I can't specify sqlAlchemy

This is a bad news. Since the localhost Docker appears to require us to specify the version.

* remove 2020 data

* Updated Toggle Style Logic

Believe to have resolved bug, now working as intended. Need to change text color on dark mode so that its more readable

* More updates

comments to understand logic and other updates

* Cleaning up

just cleaning up code and testings

* New logic update

updated function logic to hopefully fix errors

* Fixed Dropdown Colors

Dark mode hover color changed so that the text is more visible to the user

* update to running fall 2023 instead pf spring 2023

* change to get summer class info

* fixed a summer address link

* Adding Current Item Highlight

trying to change background color based on currently selected item

* changes explore icon (#661)

changes explore icon

* beep boop Github Action Master Branch CI Prettier hard at work

* Update CourseListing.vue (#667)

* beep boop Github Action Master Branch CI Prettier hard at work

* Current Mode Selected Feature Update

Updated some logic and testing, not fully complete

* More updates

Still working out logic, changed color to what will most likely be close to final color

* Clean up

removing unnecessary code

* Bump json5 from 2.1.3 to 2.2.3 in /tests/integration (#638)

Bumps [json5](https://github.com/json5/json5) from 2.1.3 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v2.1.3...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Working on fixing cookies

reworking logic to fix cookie issue not following device theme

* Revert "Working on fixing cookies"

This reverts commit a27eab5.

* Update cookie

trying to fix logic to update cookies correctly

* Fixed Cookie

believed to have fixed cookie issue, atleast it works on my local device

* Updating Default Logic

changed default logic to toggle follow theme if user gets rid of cookie or its first time loading site

* beep boop Github Action Master Branch CI Prettier hard at work

* Update ci.yaml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Harry Tan <32246618+DarknessUnder@users.noreply.github.com>
Co-authored-by: dorian451 <112524240+dorian451@users.noreply.github.com>
Co-authored-by: Troy-bailan-King <97757033+Troy-bailan-King@users.noreply.github.com>
Co-authored-by: Matt Lammon <mlammon11@gmail.com>
Co-authored-by: Matt Lammon <91478985+mlammon11@users.noreply.github.com>
Co-authored-by: I'm a Github Action <beepboop@github.com>
Co-authored-by: charleschae12 <112535899+charleschae12@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
9 people authored Apr 7, 2023
1 parent 0af14cc commit 3f49f69
Show file tree
Hide file tree
Showing 30 changed files with 189 additions and 5,591 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
backend-unit-tests:
name: pytest
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
timeout-minutes: 5
container: python:3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
semester: [spring-2023]
semester: [summer-2023]

steps:
- name: Checkout repository
Expand Down
13 changes: 13 additions & 0 deletions docs/contributing/how_to_review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# How to Review a Pull Request

1. Find a pull request.
2. Find the name of the branch in the pull request:
* ![showing name of a pull request](img/pull_request_name.png)
* In this case, the branch name would be `contributing_guide`.
3. Open a terminal and navigate to your local repository (the `yacs.n` folder)
4. Make sure your computer's repo is up to date by running `git pull`.
5. Run `git switch <branch name>`.
6. On some computers, if you are running the local version of YACS already, it will update automatically. If it doesn't, restart Docker and refresh the localhost page.
7. Look at the pull request and verify that whatever functionality it adds works and doesn't seem to cause any problems.
8. Add your review (whether it's an approval or not) hitting the "add your review" button:
* ![add your review](img/add_review.png)
Binary file added docs/contributing/img/add_review.png
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 docs/contributing/img/assign_branch.png
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 docs/contributing/img/feature_request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 docs/contributing/img/inprogress_label.png
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 docs/contributing/img/issue.png
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 docs/contributing/img/issue_assign.png
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 docs/contributing/img/issue_listing.png
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 docs/contributing/img/navigating_to_branch.png
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 docs/contributing/img/new_issue.png
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 docs/contributing/img/new_pull_request.png
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 docs/contributing/img/opening_pull_request.png
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 docs/contributing/img/pull_request_name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/contributing/opening_an_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Opening an Issue:

1. Go to issues and hit "New Issue":

* ![new issue button](img/new_issue.png)

2. Hit "Feature Request":

* ![get started button](img/feature_request.png)

3. Fill out the template (make sure to add the appropriate labels/projects!):

* ![template screenshot](img/feature_request_template.png)

4. Hit submit issue when done.
26 changes: 26 additions & 0 deletions docs/contributing/working_on_an_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Working on an Issue:

1. Find an issue you want to work on and open it:

* ![issues page with one issue highlighted](img/issue_listing.png)

2. Assign yourself to the issue:

* ![assigning self to issue](img/issue_assign.png)

3. Add the "in progress" label:

* ![assigning in progress label](img/inprogress_label.png)

4. Create / assign a branch to the issue:

* ![creating a branch for the issue](img/assign_branch.png)

5. When done, make a pull request:

* click the branch name in the issue:
* ![hitting branch name](img/navigating_to_branch.png)
* Hit "Contribute", then hit "Open pull request":
* ![opening the pull request](img/opening_pull_request.png)
* Fill out the template and, when ready, hit "Create pull Request": (make sure to assign yourself in the Assignees section!)
* ![new pull request page](img/new_pull_request.png)
2,834 changes: 0 additions & 2,834 deletions rpi_data/fall-2020.csv

This file was deleted.

5 changes: 5 additions & 0 deletions rpi_data/get-fall-2023.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
export SEMESTER="FALL 2023"
SOURCE_URL=https://sis.rpi.edu/reg/zfs202309.htm DEST=p0.csv HEADERS=True python modules/rpi-parse.py
cat p* > fall-2023.csv
rm -rf p*.csv
7 changes: 7 additions & 0 deletions rpi_data/get-summer-2023.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
export SEMESTER="SUMMER 2023"
SOURCE_URL=https://sis.rpi.edu/reg/zs20230501.htm DEST=p0.csv HEADERS=True python ./modules/rpi-parse.py
SOURCE_URL=https://sis.rpi.edu/reg/zs20230502.htm DEST=p1.csv HEADERS=False python ./modules/rpi-parse.py
SOURCE_URL=https://sis.rpi.edu/reg/zs20230503.htm DEST=p2.csv HEADERS=False python ./modules/rpi-parse.py
cat p* > summer-2023.csv
rm -rf p*.csv
6 changes: 3 additions & 3 deletions rpi_data/modules/build_semester.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

if __name__ == '__main__':
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20200501.htm DEST=out1.csv HEADERS=True python rpi-parse.py")
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20200502.htm DEST=out2.csv HEADERS=False python rpi-parse.py")
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20200503.htm DEST=out3.csv HEADERS=False python rpi-parse.py")
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20230501.htm DEST=out1.csv HEADERS=True python rpi-parse.py")
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20230502.htm DEST=out2.csv HEADERS=False python rpi-parse.py")
os.system("SOURCE_URL=https://sis.rpi.edu/reg/zs20230503.htm DEST=out3.csv HEADERS=False python rpi-parse.py")
os.system("cat out1.csv out2.csv out3.csv > out.csv")
2,689 changes: 0 additions & 2,689 deletions rpi_data/spring-2020.csv

This file was deleted.

3 changes: 3 additions & 0 deletions src/web/src/assets/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
.dropdown-item {
color: var(--dark-text-primary) !important;
}
.dropdown-item:hover {
background-color: var(--dark-border-primary) !important;
}

.link {
color: var(--dark-text-primary) !important;
Expand Down
35 changes: 17 additions & 18 deletions src/web/src/components/CourseListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<b-list-group-item
class="selected"
button
v-for="section in course.sections"
v-for="section in sortedSections"
:key="section.crn"
@click.stop="toggleCourseSection(section)"
:style="{
Expand All @@ -66,7 +66,8 @@
>
<b-row class="mb-2" align-h="between">
<b-col cols="auto">
{{ section.crn }} - {{ section.sessions[0].section }}
{{ section.crn }} - {{ section.sessions[0].section }} -
{{ getInstructor(section.sessions) }}
</b-col>
<b-col v-if="section.seats_total > 0" cols="auto">
<course-section-seats-badge
Expand Down Expand Up @@ -99,21 +100,16 @@

<script>
import "@/typedef";
import { DAY_SHORTNAMES, readableTime, readableDate } from "@/utils";
import { getBackgroundColor, getBorderColor } from "@/services/ColorService";
import {
faTimes,
faPlus,
faChevronDown,
faChevronUp,
} from "@fortawesome/free-solid-svg-icons";
import CourseSectionSeatsBadge from "./CourseSectionSeatsBadge.vue";
import CourseSectionsOpenBadge from "./CourseSectionsOpenBadge.vue";
// Course Listing by default is a collapsible display of a course and its
// sections and sessions
// However, there are slots available to customize the information displayed
Expand All @@ -128,7 +124,6 @@ export default {
},
props: {
course: Object,
// If true, collapse is open when created
// If lazyLoadCollapse is true, this is ignored
openInitial: {
Expand All @@ -142,7 +137,6 @@ export default {
type: Boolean,
default: false,
},
// Method name of default action
// When body of CourseListing is clicked on, the
// defaultAction is called
Expand All @@ -152,7 +146,6 @@ export default {
type: String,
default: "toggleCollapse",
},
//if this is false the add course + button wont appear
//this is useful for the course explorer
showAddButton: {
Expand All @@ -167,15 +160,12 @@ export default {
faChevronDown,
faChevronUp,
DAY_SHORTNAMES,
// v-model with collapse
// true or false for open or close respectively collapse
showCollapse: !this.lazyLoadCollapse && this.openInitial,
// initially false, set to true on first collapse toggle
// Used for lazy loading
loaded: false,
showAdd: this.showAddButton,
};
},
Expand All @@ -184,12 +174,10 @@ export default {
readableDate,
getBackgroundColor,
getBorderColor,
// Just a wrapper, can't call `[defaultAction]()` in html
callDefaultAction() {
this[this.defaultAction]();
},
/**
* Toggle collapse state
* @param {boolean} collapse If provided, set collapse state
Expand All @@ -198,11 +186,9 @@ export default {
if (!this.loaded) {
this.loaded = true;
}
this.showCollapse =
collapse !== undefined ? collapse : !this.showCollapse;
},
/**
* Toggle course selected state
* Emits removeCourse and addCourse events
Expand All @@ -229,11 +215,24 @@ export default {
this.$emit("addCourseSection", this.course, section);
}
},
//used in the course explorer to show a courses info modal
showInfoModal() {
this.$emit("showCourseInfo", this.course);
},
getInstructor(sessions) {
for (let i = 0; i < sessions.length; i++) {
if (sessions[i].instructor !== "Staff") {
return sessions[i].instructor;
}
}
},
},
computed: {
sortedSections() {
return this.course.sections
.slice()
.sort((a, b) => a.sessions[0].section - b.sessions[0].section);
},
},
};
</script>
Expand Down
6 changes: 5 additions & 1 deletion src/web/src/components/DepartmentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
params: { subject: major },
}"
>
<b>{{ major }}</b>
<b class="majorShort">{{ major }}</b>
- {{ getLongName(major) }}
</b-button>
</div>
Expand Down Expand Up @@ -69,4 +69,8 @@ export default {
//important because when you click the color changes and thats annoying
background: rgba(108, 90, 90, 0.15) !important;
}
.majorShort {
color: #3395ff;
}
</style>
Loading

0 comments on commit 3f49f69

Please sign in to comment.