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

Fall 2022 Pre-Enroll Release #749

Merged
merged 47 commits into from
Nov 4, 2022
Merged

Fall 2022 Pre-Enroll Release #749

merged 47 commits into from
Nov 4, 2022

Conversation

noschiff
Copy link
Member

@noschiff noschiff commented Oct 27, 2022

Summary

This pull request introduces the Tools page, featuring personalized advisor information, a progress tracker, a PDF schedule export option, and a collection of useful links! It also updates the course data in preparation for Spring 2023 pre-enroll and improves the development workflow.

Changes

Tools Page

Workflow and Utility

Requirements

Gatekept Features

Test Plan

Confirm everything works as expected on all pages of CoursePlan site, especially on the Tools page and navigating between pages, with no console errors.

For example:

  • Navigate between the plans page, tools page, and profile pop-up and ensure you get where you expect to be!
  • Collapse and expand the Tool Cards and resize the screen for the Tools Page. You can refresh to ensure the collapsed state persists!
  • Add some majors and minors and look at the advisors!
  • Put some courses into your schedule and download the PDF!
  • Ensure progress tracker displays information for all colleges/majors/minors/grad programs and the bar represents the correct progress.
  • Visit the useful links!
  • Check that a new course such as AEP 3100 can be added and that the bottom bar shows up with expected information for it.

preview

Notes

Do not squash and merge.

willespencer and others added 30 commits April 27, 2022 17:12
* Show conflict progress in bar, count number of dangerously fulfilled

Co-Authored-By: Sam Zhou <[email protected]>

* Add ProgressBarCaution with number of conflicts

* Round up conflicts (fixes compound reqs)

* Place warning to less of progress, set up infra to change course warning color

* Add GK on yellow progress bar and warnings

Co-authored-by: Sam Zhou <[email protected]>
* Open modal if there are conflicts, pass data to modal

* Show real reqs data, refactor to use map

* Add back self checks if course can apply

* Fix type, thoroughly test

* Move confirmation to after conflict modal closed

* Bring over toggle req choice from #599

Co-Authored-By: Sam Zhou <[email protected]>

* Change self check req to full name, default unchecked

* Toggle which req a course fulfills

* Fix type check

* Only show warning if self checks exist

* Filter out self check reqs that are not in conflict

* Fix self check warning check

* Remove course (i.e. don't add) if modal closed

* Add dynamic pills for req groups, clean req name

* Address nits

* Refactor getReqsInConflict

* Clean up by using diff prop

Co-authored-by: Sam Zhou <[email protected]>
* added ineq requirements courses, need to fix jsons next

* finsihed changes to inequality major,
changed requirement description to allow req-gen to run

* updated requirement tests snapshot

* added the first profile edit page to a new profile container

* removed code that is not used so far

* deleted another piece of yet unused code

* fixed type error

* cleaned up unnnecessary parts of Profile.vue
changed cyId to pass cypress tests
removed accidental changes from inequality PR

* removed a few more unused things which failed lint

* removed editprofile to fully use openprofile instead
* separate and implement alternate options for AEP 3630 and PHYS 4410

* add new requirements to tests

* change sources to EP Notes page

* run prettier

* run req-gen
* added ineq requirements courses, need to fix jsons next

* finsihed changes to inequality major,
changed requirement description to allow req-gen to run

* updated requirement tests snapshot

* added the first profile edit page to a new profile container

* removed code that is not used so far

* deleted another piece of yet unused code

* fixed type error

* created basic logic for toggling
 between basic info and transfer credits

* fixed checks for whether the save button should be active

* fixed save issue, scroll still unresolved

* removed debugging alerts

* fixed lint error

* fixed EOF error?

* Fix scroll bar disappearing bug (and others)

* fixed type error?

* got rid of inequality change

* actually fixed stuff

* fixed decorated requirements

* made PR up to date with master

* changed background to pure white to match textbox background

* fixed narrow pages covering title

* fixed save button logic issue

* fixed font

* implemented michaels feedback

* fixed lint error

* fixed prettier issue

Co-authored-by: Will Spencer <[email protected]>
Bumps [async](https://github.com/caolan/async) from 3.2.0 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](caolan/async@v3.2.0...v3.2.3)

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

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add course that fulfills a req

* Fix timeout issue
* setup case infra, ensure backwards compatibility

* format, fix test

* fix lint and req-gen

* show proper case exam subjects

* add custom scores to case exams

* fix lint

* fix mapping

* fix emit type

* remove case from snapshot test

* reset score on case subject change

* improve score dropdown reset

* format

* fix merge issue

Co-authored-by: Will Spencer <[email protected]>
Bumps [jose](https://github.com/panva/jose) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/v2.0.6/CHANGELOG.md)
- [Commits](panva/jose@v2.0.5...v2.0.6)

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

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* write ts script to copy user data

* rewrite to use command line arguments

* update credential input to modular SDK

* move core logic into a function

* clean up code

* add option to preview changes

* validate arguments outside of function

* narrow types with union

* rename function arguments

* rename variable

* put arguments into options object

* refactor command line arguments to use minimist

* add minimist types

* make minimist dev dependency

* update package-lock.json

* move to scripts directory

* rename variables

* improve output logging for user

* pretty-print output

* update example in comments
* change filename for service account

* add appName to firebase app initialization
* let cards fully collapse

* fix CSS in AdvisorCard

* remove default limit for advisors

* fix collapse behavior for card

* add multiple cards to tools page and use grid

* add some desired heights

* card layout for smaller screen

* simplify slice with undefined

* remove unused CSS

* use template literals

Co-authored-by: zachary0kent <[email protected]>

* use flatMap

* use CSS classes for cards instead of nthChild

* change default size for tool card

Co-authored-by: zachary0kent <[email protected]>
* add psych major

* psych ****

* disallow transfer credit for psych credit requirements

* lint

* add requirement ids to snapshot

* remove other from general requirements

* remove ind study and field work

Co-authored-by: Kehui Guo <[email protected]>
* turn nulls into empty string when approproiate and remove non-breaking spaces

* fixed lint issue

* centralize into cleanString

* ensure undefined fields stay undefined

* change name to cleanField
* clean up tsconfig

* clean up firebase configs

* move scripts, firebase-config

* resolve service account issue

* remove app name global variable

* fix track-users command

* move dev/prod specific databases to copy-user-data script

* remove db export

* add types, add active-users metric

* remove redundant check
* allow text to wrap

* remove width grow on tool cards

* put cards sise in Tools CSS instead of Card prop

* create useful links

* add some links

* change breakpoint

* add scheduler and course roster

* rename course roster to class roster

* remove Card CSS variables

* improve advisor card overflow behavior
* allow text to wrap

* remove width grow on tool cards

* put cards sise in Tools CSS instead of Card prop

* create useful links

* add some links

* change breakpoint

* add scheduler and course roster

* rename course roster to class roster

* remove Card CSS variables

* improve advisor card overflow behavior
* add update-courses workflow action

* fix yml syntax

* clean up workflows

* trailing newline

* Add check diff to update-courses workflow

* Simplify update-courses workflow for testing
* write script outputs to gitignored directory

* add serviceAccount** to gitignore
@noschiff noschiff requested a review from zachary-kent October 27, 2022 21:13
@noschiff noschiff added the release Release to production label Oct 27, 2022
noschiff and others added 4 commits October 27, 2022 17:41
* implement export tool card design

* add export card to tools page

* standardize height for links and export tool cards

* fix export card component import

* add method on button press
* remove semester type from database

* run on all docs in semesters collection

* fix type error

* remove unnecessary optional field in type
* move requirement progress calculation to requirement-frontend-computation.ts

* modify feature flag import
* fixed linting for enums

* prettier
noschiff and others added 2 commits November 1, 2022 18:56
* checkout code from jerry's branch

* factored out styling

* cleaned up progress tracker

* Changed requirements to grid

* connect progress tracker to requirement progress functions

* fix typo in import

* fix bar rotation and improve style

* change positioning of bar

* Clean up

* Add progress strings

* Change name back from abbreviations

* Center progress bar

* Refactor CSS

* Bold num fulfilled, match blue for bar

* change funky html formatting

* removed magic numbers

* make image name more descriptive

* Fixed mismatched fulfilled number

- Changed dangerousProgress to dangerouslyFulfilled to match Plans and Toolcards
- Changed thresholds to <0.25, <0.5, <0.75, <1.0, and ==1.0

* add flex wrapping

* added sumBy utility

* Make status text bold

* Move status text slightly lower

* improve progress bar positioning

* clean up formatting

* changed z-index of emoji

* Update src/requirement-types.d.ts

* prettier

* add readonly annotation to sumBy

* improve CSS positioning

* make 900 into bolder

* attempt to improve css

Co-authored-by: Zak Kent <[email protected]>
Co-authored-by: Andrew J Xu <[email protected]>
Co-authored-by: zachary0kent <[email protected]>
@noschiff noschiff requested a review from andxu282 November 2, 2022 00:14
vaishnavi17 and others added 4 commits November 1, 2022 21:56
Added functionality to generate a PDF with the user's courses, grouped by semester. Hooked this up to the corresponding toolcard on the frontend!

Co-authored-by: Zak Kent <[email protected]>
Co-authored-by: zachary0kent <[email protected]>
Co-authored-by: Benjamin Shen <[email protected]>
Co-authored-by: Noah Schiff <[email protected]
* Remove tools feature flag

* remove unused import
* [Automated] Update Courses (FA22-Nov1)

* update workflows

* remove pr trigger on ci check

* rerun scripts manually

Co-authored-by: benjamin-shen <[email protected]>
Co-authored-by: Benjamin Shen <[email protected]>
Co-authored-by: Noah Schiff <[email protected]>
@noschiff noschiff marked this pull request as ready for review November 2, 2022 04:51
@noschiff noschiff requested a review from a team as a code owner November 2, 2022 04:51
@noschiff
Copy link
Member Author

noschiff commented Nov 2, 2022

GET HYPED! IT'S FINALLY TIME TO REVIEW! @zachary0kent @benjamin-shen @andxu282 @vaishnavi17

@benjamin-shen
Copy link
Collaborator

Yay!!! A long-awaited release :)) Major props to everyone who worked on this! 🥳

I sometimes am blocked from scrolling on the Tools page when it's horizontally shrunk, but idk whether or not the issue is specific to my machine/browser. If anyone else runs into this, lmk!

PDF generation looks and works great! I did find some issues:

  • If there are any long major names, it's possible for the text to overflow. Here is an example of an info sci & chem/biomolecular engineering double major. image
  • Downloading the PDF fails if there are any requirements that cannot be looked up (say, if the user switched/removed their college/major/minor/grad affiliation). The error message is Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name'). To reproduce: add CS major, add selectable req (eg. CS 4700 as Technical Elective), remove CS major, and try to download the pdf. A fix would be to omit the requirement from the pdf tables if it's not found in the userRequirementsMap.
  • The gap does look a little funny for AP credit, could we add an emoji? Also, could we capitalize "Credit"? image
  • If someone is crazy enough to take 100 courses in a single semester (and the table does overflow), this rounded table edge artifact shows up on the second page. Not a huge issue but just something interesting to notice. image

All the useful links work! Advisors are properly changing when I switch my college/major! The progress tracker seems to be working as intended!

How I feel rn:
image

@andxu282
Copy link
Collaborator

andxu282 commented Nov 3, 2022

Everything looks really good! I added multiple majors and minors, and it seems like the advisors and useful links toolcards work as intended. I saw the same text overflow issue in the pdf as Ben did:
Capture d’écran 2022-11-03 à 12 46 14 PM

One thing that I think is unrelated to these changes (hopefully) is that when I have zero classes, it still says I fulfilled 1/7 requirements here (to replicate: add Biological Sciences, Astronomy, Earth and Atmospheric Sciences as majors and no classes)
Capture d’écran 2022-11-03 à 12 39 06 PM

The progress bar matches along with the fractions next to it for the most part, but I will look into fixing this issue mentioned here:
image

@noschiff
Copy link
Member Author

noschiff commented Nov 3, 2022

One thing that I think is unrelated to these changes (hopefully) is that when I have zero classes, it still says I fulfilled 1/7 requirements here (to replicate: add Biological Sciences, Astronomy, Earth and Atmospheric Sciences as majors and no classes) Capture d’écran 2022-11-03 à 12 39 06 PM

@andxu282 I think that this might have something to do with APs. I'm pretty sure we exclude purely self check requirements from the progress bar (like for the Applied Math Minor, we say 1/1 when you've finished Math 2930 & 2940 and completely ignore the core required courses because they're self check). I remember being confused by this as well back when I reviewed Jerry's PR. Maybe take a look at the requirement debugger and see if you can figure out where the 1 is coming from? Either way, it probably wouldn't come from this release, but we should definitely try to clean it up. It would be really great if you could figure this out because I've definitely had the same weird behavior before. If you don't have any transfer credit… then maybe the 1/1 is from the swim test? I doubt it because it should show up in the completed section. It's super weird when we get a completed requirement that doesn't show up as completed anywhere… Also, do you get this issue when you go from a fresh account? Or does it only happen after you've had an account for a while.
image

@noschiff
Copy link
Member Author

noschiff commented Nov 3, 2022

Everything looks really good! I added multiple majors and minors, and it seems like the advisors and useful links toolcards work as intended. I saw the same text overflow issue in the pdf as Ben did:

@andxu282 This should hopefully be fixed in #758 :)

vaishnavi17 and others added 2 commits November 3, 2022 16:22
* added fix for requirement not existing in user requirements map

* fixed overflow issue for majors, minors, grads

* added comments

* made table header left aligned

* factored out into utils

* final small changes.
* open links in new tab

* add first name to Tools page

* add typescript to Card component

* increase spacing around progress bar
@zachary-kent
Copy link
Collaborator

Screen Shot 2022-11-03 at 8 30 01 PM

I don't think this is something to block on, but some advisors who correspond to multiple majors are duplicated. We should probably either show each advisor once or (probably better) display which major each advisor corresponds to.

@zachary-kent
Copy link
Collaborator

Screen Shot 2022-11-03 at 8 36 53 PM

PDF generation handles every major in engineering!

Copy link
Contributor

@vaishnavi17 vaishnavi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks everyone for working on this (and helping out so much with PDF gen!). I checked out PDF gen and the other toolcards like progress on the preview link, and it all looks good to me!

For future work, it would be cool to display the particular major and college for each of the advisors, and have the "plan" or "tools" button highlighted when we are viewing that page. I can definitely help out with those features.

Copy link
Collaborator

@zachary-kent zachary-kent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you everyone for all of the hard work! Tested the following features:

  • PDF generation (with a copious number of majors)
  • Squeezing and stretching the progress tracker (everything wraps great!)
  • The progress tracker does indeed track progress (with motivational emojis to boot!)
  • Invaluable links

@noschiff noschiff merged commit 7a40731 into release Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release to production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants