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

Backend logic, shake animation, and frontend draft for course notes #966

Merged
merged 12 commits into from
Dec 3, 2024

Conversation

Destaq
Copy link
Member

@Destaq Destaq commented Nov 21, 2024

Summary

Implemented backend logic and animations for persistent note storage on course cards, tied to uniqueIDs, in addition to fixing some type issues and slimming down the code.

Remaining TODOs:

  • UI fixes (see here and any corresponding feedback from Joana)
  • styling fixes (e.g. pushing down cards, z-index, etc. — itemized in the Slack as well)

Test Plan

  1. Click on the three dots next to a course card
  2. Press Note
  3. Type in a note and press enter
  4. Recognize that a note has now been saved (visually with the mini-dropdown), and note that this is persistent — stays on refresh

Can also try clicking on notes to expand them, clicking outside to hide, clicking outside when the form input is dirty to view the shaking animation, clicking on the note menu item again when already open to also see that there is a shaking animation, etc.

@Destaq Destaq requested a review from a team as a code owner November 21, 2024 02:22
@dti-github-bot
Copy link
Member

dti-github-bot commented Nov 21, 2024

[diff-counting] Significant lines: 434.

Copy link
Contributor

github-actions bot commented Nov 21, 2024

Visit the preview URL for this PR (updated for commit 31c151c):

https://cornelldti-courseplan-dev--pr966-shake-animation-and-l7lgqd5v.web.app

(expires Thu, 02 Jan 2025 10:21:17 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d4e0437c4559ed895272bbd63991394f1e0e933

@Destaq Destaq changed the title Shake animation and storage functionality Backend logic, shake animation, and frontend draft for saved notes Dec 3, 2024
@Destaq Destaq changed the title Backend logic, shake animation, and frontend draft for saved notes Backend logic, shake animation, and frontend draft for course notes Dec 3, 2024
Copy link
Contributor

@nidhi-mylavarapu nidhi-mylavarapu left a comment

Choose a reason for hiding this comment

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

Everything looks great! Thanks for such clean code Simon :) ready to merge!

this.isShaking = true;
setTimeout(() => {
this.isShaking = false;
}, 900); // 3 shakes * 0.3s = 0.9s
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we confirmed the shake animation speed with Joanna yet? May need to change this

return;
}

if (noteComponent.isDirty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding such clear comments for this! Makes it much easier to understand the animations with different states

@@ -172,8 +190,11 @@ export default defineComponent({
trashIcon: trashGrayIcon, // Default icon
courseCode: '',
isExpanded: false,
isNoteVisible: false,
expandNote: false,
// isNotVisible represents a small open 'portrusion' indicating that there is a note
Copy link
Contributor

Choose a reason for hiding this comment

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

Small typo - isNotVisible in comment instead of isNoteVisible. it's for a comment though so no big deal lol

@@ -296,6 +390,30 @@ export default defineComponent({
padding-bottom: 20px;
}

// Emulates a slight side-to-side sway à la Figma micro-interaction.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you so much for looking into this Simon! The shake effect looks awesome

@nidhi-mylavarapu nidhi-mylavarapu merged commit e60241f into notes-feature Dec 3, 2024
10 of 11 checks passed
@nidhi-mylavarapu nidhi-mylavarapu deleted the shake-animation-and-storage-ideation branch December 3, 2024 17:37
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.

3 participants