Skip to content

Commit

Permalink
January 2022 Release (#634)
Browse files Browse the repository at this point in the history
* [easy] Delete AP/IB override code (#587)

They will be replaced by the new opt-in/opt-out infra.

* Convert TrackUsers to script to store data in Firestore daily (#601)

* Copy track users to ts file and make it a script

* Output track users script to new track-users collection

* Set up cron job to call npm command and run script

* Fix lint

* Delete Firebase TrackUsers and move function call

* Fix Mobile Navbar Click Outside (#598)

* Have clicking outside navbar close menu instead of opening onboarding

* Bump z-index so modals display above navbar

* Fix lint

* [easy] Fix enforce release workflow job (#602)

* fix enforce release workflow job

* Revert "fix enforce release workflow job"

This reverts commit 94c05b3.

* Revert "Revert "fix enforce release workflow job""

This reverts commit 719fc57.

* Add AS Major (#589)

* Added as major

* Ran prettier, unbroke test

* Added requirement to frontend

* Fixed up frontend

* Fixed slot count error

* Ran req-gen

* Add NPM clean install to fix failing track-users (#605)

* Remove semester type from codebase (#604)

* remove semester type

* fix type errors

* Add prod service account secret to track-users (#608)

* Use service account secret when provided (#609)

* Add prod service account secret to track-users

* Use service account secret when provided

* Fix lint

* JSON parse service account

* Added the template file for the ECE major (#600)

* Added the template file for the ECE major

* Update ece.ts

* Update ece.ts

* Requirement builder with the new data format (#588)

* add test for minimize semester (#613)

* Avoid tracking users that have not finished onboarding (#610)

* Avoid tracking users that have not finished onboarding

* Fix lint

* Add analytics data to CoursePlan route (#607)

* Create analytics container and add it to route file (copied from old branch)

* Get newest doc to display as json

* Pretty print json

* Fix lint and type checks

* Require auth to access route

* Style page if no data shown

* Add timestamp of last analytics run

* Remove accidental commit

* Bug fix for non-cp users

* Refactor analytics retrieval to global-firestore-data

* Optimize code by only retrieving newest document from collection (and adding timestamp field)

* Change timestamp to date type

* Remove null check, add comment

* Add FA21 contributors to README (#619)

### Summary <!-- Required -->

<!-- Provide a general summary of your changes in the Title above -->
<!-- Itemize bug fixes, new features, and other changes -->
<!-- Feel free to break this into sub-sections, i.e. features, fixes, etc. -->
<!-- Some examples are shown below. -->

This pull request adds the list of FA21 contributors to CoursePlan now that the semester is over.


### Test Plan <!-- Required -->

Confirm the list matches the one on Notion here: https://www.notion.so/courseplan/CoursePlanners-cc431147c85d4d4abfdf47bdbe8b1a1c

* Setup infrastructure for two-graph-based progress computation (#615)

* Placeholder courses (#592)

* Add placeholder component, place after every course temporarily

* Make code improvements

* Match placeholder styling to Figma in both views

* Support FirestoreSemesterPlaceholder type, shows placeholders from Firestore

* Define isPlaceholderCourse function, use to resolve type errors & fix bugs

* Fix failing jest test

* Fix lint

* Implement warnings when semester mismatches, in either semester ordering

* Simplify utility function

* Update comment (and refresh deployment)

* Add hover state to 6 dots, change cursor to grab

* Delete comment

* Implement Intl API for warnings

* Add EAS Major (#590)

* Added eas reqs

* Added chem fulfillment option

* (Mostly) finished EAS requirements

* Added major

* Unbroke test

* Cleaned up frontend

* Made labeling clearer

* Cleaned up message

* Fixed typo

* Added field work requirement

* Changed field work requirement

* Specialize requirements (#611)

* Implemented specialization functiionality

* Added CS specialization

* Ran prettier

* Ran req-gen

* Fixed linter errors

* Refactored infra

* Added math 2930

* Fixed linter error

* Create useful exam mappings derived from exam data (#606)

* map exam id to equivalent course and conditions

* add exam to course and course to exam mappings

* remove majors and colleges from export

* fix college type

* Address nits

* fix tests

* fix lint

* Fix college type

* use fromEntries

* nit

* Fix AG foreign language checker (#623)

* Fix BIO major BIOMG 4320 requirement (#624)

* Add exam course ids and conditions to requirements json (#625)

* set up structure

* add exam course ids and conditions to requirements json

* move toggleable conditions to same level as course list

* refactor decorators

* fix lint issues

* add back college name sort

* conditional specializations property

* Add check-req-json workflow job (#628)

* Add check-req-json workflow job

* Fix req-json discrepancy

* Split up npm install and npm run req-gen

* [easy] Fix AP/IB old infra bug for multiple equivalent courses (#631)

* fix bug

* fix object set

* Remove hardcoded dropdown start year to fix new year Cypress bug (#629)

* Make start year code common and use in cypress instead of hardcoding 2015

* Turn getYearRange into constant and clarify comment

* Fix lint

* Switch to new AP/IB infra (#627)

* Switch to new AP/IB infra

* rename no fulfillments course id

* req-gen

* fix lint

* Update CS major (#626)

* add CHEM 2080 requirement and CS 4414

* prettier?

* did it update

* what about now

* now?

* hi will

* address nit and package lock changes

* run req gen

Co-authored-by: Will Spencer <[email protected]>

* Fix HE credits double counting and DEA statistics req (#630)

* Add script for migrating old subject colors to new subject colors (#614)

* add color migration script

* use if-else instead of switch

* reuse switch with hasOwnProperty

* lint

* delete console log

* Run on subjectColorsCollection instead of usernameCollection

Co-authored-by: Benjamin Shen <[email protected]>

* remove usernaemCollection import

Co-authored-by: Hahnbee Lee <[email protected]>
Co-authored-by: Benjamin Shen <[email protected]>
Co-authored-by: Hahnbee Lee <[email protected]>

* Dashboard entrypoint (#616)

* add icons

* navbar design

* add tools page

* mobile responsiveness

* address nits

* add feature flag + mobile plan icon

* prettier

Co-authored-by: Hahnbee Lee <[email protected]>

* Deprecate old ap/ib infra (#632)

* deprecate old ap/ib infra

* fix lint

* fix tests

* add ap/ib exam id tests (#635)

* Fix swim test bugs (#637)

* change unique id from -1 to 'swim test'

* change swim test requirement

* refactor and fix deleteTransferCredit

* unbreak requirement id test

* Refactor constraint violations (#633)

* refactor constraint violations

* format

* add object structuring to removeIllegalEdges

* remove null return type

* modify allowDoubleCounting function to be more accurate

* Revert "modify allowDoubleCounting function to be more accurate"

This reverts commit 03f3840.

* change double counting perspective

* polish requirementsThatDoNotAllowDoubleCounting

* fix lint

* fix double counting constraint, polish constraint violation function

* preserve requirement order

* small fixes

* fix lint

* remove minor auto double counting

* address code comments

* rename

* fix test

* fix courseToRequirementsInConstraintViolations

* remove console log

* Fix requirements double counting (#638)

* fix bugs

* remove console log

* format

* fix arg order

* fix add modal opt out

* refactor dummy uniqueid

* refactor to getRelatedUnfulfilledRequirements

* move opt out filter to opt out function

* automatically fulfilled requirements

* add comment

* opt out of all requirements possibly in constraint violation

* add minor-grad restriction for double counting

Co-authored-by: Sam Zhou <[email protected]>
Co-authored-by: Will Spencer <[email protected]>
Co-authored-by: zachary0kent <[email protected]>
Co-authored-by: Aryan Yadav <[email protected]>
Co-authored-by: Toby (Ju Mong) Ko <[email protected]>
Co-authored-by: ein <[email protected]>
Co-authored-by: Hahnbee Lee <[email protected]>
Co-authored-by: Hahnbee Lee <[email protected]>
  • Loading branch information
9 people authored Feb 2, 2022
1 parent 1094222 commit 8c45cde
Show file tree
Hide file tree
Showing 101 changed files with 8,059 additions and 2,274 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ jobs:
run: npm install && cd functions && npm install
- name: Check that package-lock.json has no changes
run: exit $(git status --porcelain | wc -l)
check-req-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Install
run: npm install
- name: Run req-gen
run: npm run req-gen
- name: Check that the requirements json has no changes
run: exit $(git status --porcelain | wc -l)
frontend-tests:
runs-on: ubuntu-latest
concurrency: cypress-tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
echo "Your head ref is ${{ github.head_ref }}."
echo "Your base ref is ${{ github.base_ref }}."
- name: Fail if try to push release from non-master branch
if: github.base_ref != 'beta-release' && github.head_ref == 'master'
if: github.base_ref == 'beta-release' && github.head_ref != 'master'
run: |
echo "Head ref must be master for release. Everything should go through staging first!"
exit 1
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/track-users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: TrackUsers
on:
schedule:
- cron: '0 4 * * *'

jobs:
track-users:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
- name: Run TrackUsers
run: npm run track-users
env:
PROD: true
SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_PROD }}
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ Then access http://localhost:8080/

## Contributors

### FA21

- **Will Spencer** - Developer
- **Toby Ko** - Developer
- **Zak Kent** - Developer
- **Sam Zhou** - Developer
- **Ben Shen** - Developer
- **Vaishnavi Gupta** - Developer
- **Aryan Yadav** - Developer
- **Noah Schiff** - Developer
- **Yuxuan Chen** - Designer
- **Robin Ahn** - Designer
- **Kehui Guo** - Designer
- **Miranda Yu** - PMM
- **Michael Farkouh** - APM
- **Hahnbee Lee** - TPM
- **Ein Chang** - PM

### SP21

- **Hahnbee Lee** - Developer
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/hidden-features.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ it('Test that only one semester button shows', () => {
cy.get('[data-cyId=newSemester-seasonWrapper]').click();
cy.get('[data-cyId=newSemester-seasonItem]').first().click();

// click 2015
// click oldest year
cy.get('[data-cyId=newSemester-yearWrapper]').click();
cy.get('[data-cyId=newSemester-yearItem]').first().click();

Expand Down
47 changes: 39 additions & 8 deletions cypress/integration/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
* Can and should be expanded on in more files to test more specific functionality and ensure future bugs are caught earlier
*/

import { getCurrentYear, yearRange } from '../../src/utilities';

const startYear = getCurrentYear() - yearRange;

// Before running tests, starts on landing page, logs in to firebase, then visits the dashboard
// Log in occurs with TEST_UID of the courseplan testing account using a function from the cypress-firebase package
before('Visit site logged in', () => {
Expand All @@ -26,35 +30,35 @@ it('Delete all existing semesters, if any exist', () => {
});

// Confirm that a semester can be added to the plan
it('Add a semester (Fall 2015)', () => {
it('Add a semester (Fall of oldest year)', () => {
// open the new semester modal
cy.get('[data-cyId=semesterView-addSemesterButton]').click();

// click Fall
cy.get('[data-cyId=newSemester-seasonWrapper]').click();
cy.get('[data-cyId=newSemester-seasonItem]').first().click();

// click 2015
// click oldest year
cy.get('[data-cyId=newSemester-yearWrapper]').click();
cy.get('[data-cyId=newSemester-yearItem]').first().click();

// add semester
cy.get('[data-cyId=modal-button]').click();

// confirm the oldest semester is the newly added one
cy.get('[data-cyId=semesterName]').last().contains('Fall 2015');
cy.get('[data-cyId=semesterName]').last().contains(`Fall ${startYear}`);
});

// Confirm that duplicate semesters cannot be added
it('Fail to add a duplicate semester (Fall 2015)', () => {
it('Fail to add a duplicate semester', () => {
// because a semester exists, get semester-addSemesterButton instead of semesterVIew-addSemesterButton
cy.get('[data-cyId=semester-addSemesterButton]').click();

// click fall
cy.get('[data-cyId=newSemester-seasonWrapper]').first().click();
cy.get('[data-cyId=newSemester-seasonItem]').first().click();

// click 2015
// click oldest year
cy.get('[data-cyId=newSemester-yearWrapper]').first().click();
cy.get('[data-cyId=newSemester-yearItem]').first().click();

Expand All @@ -66,7 +70,7 @@ it('Fail to add a duplicate semester (Fall 2015)', () => {
});

// Confirm that the newly added semester can be edited
it('Edit a semester (Fall 2015 -> Spring 2016)', () => {
it('Edit a semester (Fall of oldest year -> Spring of second oldest year)', () => {
// open the edit semester menu
cy.get('[data-cyId=semesterMenu]').first().click();
cy.get('[data-cyId=semesterMenu-edit]').click();
Expand All @@ -75,13 +79,15 @@ it('Edit a semester (Fall 2015 -> Spring 2016)', () => {
cy.get('[data-cyId=newSemester-seasonWrapper]').last().click();
cy.get('[data-cyId=newSemester-seasonItem]').eq(1).click();

// click 2016
// click second oldest year
cy.get('[data-cyId=newSemester-yearWrapper]').last().click();
cy.get('[data-cyId=newSemester-yearItem]').eq(1).click();

// finish editing and confirm it has been updated
cy.get('[data-cyId=modal-button]').click();
cy.get('[data-cyId=semesterName]').last().contains('Spring 2016');
cy.get('[data-cyId=semesterName]')
.last()
.contains(`Spring ${startYear + 1}`);
});

// Test that you can change entrance year, grad year, colleges and majors. A later requirements test is dependent on these choices
Expand Down Expand Up @@ -193,3 +199,28 @@ it('Add a course with the new add modal (CS 1110)', () => {
cy.get('[data-cyId=requirements-displayToggle]').last().click();
cy.get('[data-cyId=reqcourse-code]').first().contains('CS 1110');
});

// Confirm that the minimize semester button can hide/show semester
it('Minimize a semester', () => {
// open add modal and try to add CS 3110
cy.get('[data-cyId=semester-addCourse]').click();
cy.get('[data-cyId=newCourse-dropdown]').type('CS 3110');
cy.get('[data-cyId=newCourse-searchResult]').first().click();
cy.get('[data-cyId=modal-button]').click();

// click minimize semester button
cy.get('[data-cyId=minimizeSemester]').click();

// confirm semester is hidden, course is invisible, add course modal is invisible
cy.get('[data-cyId=semester-courses]').should('have.class', 'semester-hidden');
cy.get('[data-cyId=semester-course]').should('not.be.visible');
cy.get('[data-cyId=semester-addCourse]').should('not.be.visible');

// click minimize semester button (expand)
cy.get('[data-cyId=minimizeSemester]').click();

// confirm semester is shown, course is visible, add course modal is visible
cy.get('[data-cyId=semester-courses]').should('not.have.class', 'semester-hidden');
cy.get('[data-cyId=semester-course]').should('be.visible');
cy.get('[data-cyId=semester-addCourse]').should('be.visible');
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"courses-gen": "npm run ts-node -- src/requirements/courses-json-generator.ts",
"req-gen": "npm run ts-node -- src/requirements/requirement-json-generator.ts",
"req-graph-dump": "npm run ts-node -- src/requirements/admin/requirement-graph-dumper.ts",
"track-users": "npm run ts-node -- src/requirements/admin/track-users.ts",
"lint": "eslint . --cache",
"tsc": "tsc",
"type-check": "vue-tsc --noEmit",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/images/navbar/hairline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/images/navbar/plan-mobile-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/navbar/planIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/navbar/planIconBlue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/images/navbar/profileIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/images/navbar/profileIconBlue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/navbar/toolbox-mobile-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/navbar/toolboxIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/navbar/toolboxIconBlue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ $very-large-breakpoint: 1347px;
$larger-breakpoint: 1407px;
$largest-breakpoint: 1455px;

$colored-grabber-width: 1.25rem;
$regular-semester-width: 24rem;
$compact-semester-width: 17.5rem;
3 changes: 0 additions & 3 deletions src/components/Course/Course.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,8 @@ export default defineComponent({
</script>

<style scoped lang="scss">
// TODO: font families
@import '@/assets/scss/_variables.scss';
$colored-grabber-width: 1.25rem;
.course {
box-sizing: border-box;
border-radius: 0.5rem;
Expand Down
Loading

0 comments on commit 8c45cde

Please sign in to comment.