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

Wrapped Frontend - Add TA slides & Update slide logic #879

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

anchen9
Copy link
Collaborator

@anchen9 anchen9 commented Oct 28, 2024

Summary

Added three total slides to the Wrapped Frontend by building on this PR and Figma dev handoff. I added slides is to display a student's favorite TA, the total time a TA helped students, and a slide for how many students a TA has helped. Also updated slide logic so that if an user is only a student, they do not see TA slides, and if an user is both a student & TA they see all slides, and if an user is only a TA they only see TA specific slides.

  • Added background gradient for all wrapped slides
  • Flipped image on the visits to office hours slides
  • Edited image size of personality slides
  • Edited text appearance on conclusion slide
  • Added favTaId to wrappedData
Screenshot 2024-11-17 at 12 18 15 PM Screenshot 2024-11-17 at 12 18 23 PM Screenshot 2024-11-17 at 12 18 30 PM Screenshot 2024-11-17 at 12 18 37 PM Screenshot 2024-11-17 at 12 18 43 PM Screenshot 2024-11-17 at 12 18 49 PM Screenshot 2024-11-17 at 12 19 24 PM [ Screenshot 2024-11-17 at 12 42 04 PM ](url)

Test Plan

To test the slide logic, I edited my test data in QMI Test to test:

  • favTaId = "" or undefined ==> should only see TA specific slides
  • timeHelpingStudents == 0 or undefined ==> should only see student specific slides
  • if both are defined and non-empty/non-zero then all slides should be displayed.

Notes

  • need to complete ribbons/banners as well as animations
  • need to add firebase call to number of students a TA has helped.

Breaking Changes

None

  • I have updated the documentation accordingly.
  • My PR adds a @ts-ignore

@anchen9 anchen9 requested a review from a team as a code owner October 28, 2024 02:51
@CLAassistant
Copy link

CLAassistant commented Oct 28, 2024

CLA assistant check
All committers have signed the CLA.

@dti-github-bot
Copy link
Member

dti-github-bot commented Oct 28, 2024

[diff-counting] Significant lines: 792.

Copy link
Contributor

@rgu0114 rgu0114 left a comment

Choose a reason for hiding this comment

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

Great start on this so far Annie! And nice work navigating the existing (long) component file and adding in React/CSS changes to more closely mimic the designs. I added a few code style comments, but a couple other things to note:

  1. usually for frontend PRs, it's good to attach screenshots of the changes you made (even if the reviewer will run it locally) so it's clearer what changes you made. Attaching the reference Figma designs is also a plus.
  2. if you reload and go to to the favorite TA slide for the first time, there's some flickering – probably some incorrect logic related to the total number of stages for users who are also TAs, but I can take another look and suggest fixes

src/components/includes/Wrapped.tsx Outdated Show resolved Hide resolved
src/components/includes/Wrapped.tsx Outdated Show resolved Hide resolved
src/components/includes/Wrapped.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@rgu0114 rgu0114 left a comment

Choose a reason for hiding this comment

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

A couple misc. design todos for this PR (or the next):

  • banner styling on intro slide, adding banners to total minutes, fav ta, and conclusion slide
  • decrease transparency of the people on total visits slide
  • mini ppl in places
  • numbers

@@ -53,7 +129,24 @@ const Wrapped = (props: Props) => {
personalityType: string;
timeHelpingStudents: number;
totalMinutes: number;
favTaId: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is type checking using the as keyword on the document data retrieved from firebase, would it be cleaner to just write a typescript interface like
interface WrappedData { officeHourVisit: never[]; personalityType: string; timeHelpingStudents: number; ... }. Then we can just use that in the state variable wrappedData above. But this is just a minor optimization imo :)

Copy link
Contributor

@rgu0114 rgu0114 left a comment

Choose a reason for hiding this comment

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

Good to merge once all comments are addressed!

@rgu0114 rgu0114 merged commit 04d4fff into master Nov 20, 2024
4 checks passed
@rgu0114 rgu0114 deleted the annie-wrapped-frontend branch November 20, 2024 21:59
@rgu0114 rgu0114 mentioned this pull request Nov 22, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants