-
Notifications
You must be signed in to change notification settings - Fork 11
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
Notes Basic Frontend #960
Notes Basic Frontend #960
Conversation
[diff-counting] Significant lines: 215. |
Visit the preview URL for this PR (updated for commit ba9c44d): https://cornelldti-courseplan-dev--pr960-nidhi-notes-basic-fr-54t1r1qe.web.app (expires Sat, 14 Dec 2024 16:59:23 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 6d4e0437c4559ed895272bbd63991394f1e0e933 |
on and option to course card menu
<div class="courseMenu-left"> | ||
<img | ||
class="courseMenu-icon" | ||
src="@/assets/images/noteIconSmall.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we might change the image, but I believe the icon is a bit bigger than the other icons so it looks unaligned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is the case, we'd have to rearrange all the icons sidebar style to be centered not right-aligned and have a grid or dynamic offset calculation otherwise — I'd just find a new icon honestly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! A couple smaller issues, but should be good to branch off of for additional fixes and animations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to make a transparent version of this SVG that then gets filled with the color appropriate for that course note color, as otherwise would need a set of half-a-dozen-plus various arrow SVG icons for all the possible course colors.
@close-edit-color="closeEditColorModal" | ||
v-if="isEditColorOpen" | ||
/> | ||
<div class="course-container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it was my suggestion to rearrange, but I would just be careful with the class names here post-reshuffling. It looks like the CSS logic for some of the z-indices gets in a kerfuffle on account of this change, causing the modal to be hidden under the next course card.
An easy fix would be to reduce the z-index
from 1 to 0 for the course card. Can be a part of the scope of frontend fixes branched off this PR.
<course-caution | ||
v-if="!isReqCourse && compact" | ||
v-if="!isReqCourse && !isSchedGenCourse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for reference could you explain what this change was motivated by? Doesn't look immediately relevant to the notes feature.
@open-save-course-modal="openSaveCourseModal" | ||
:getCreditRange="getCreditRange || []" | ||
v-click-outside="closeMenuIfOpen" | ||
<Note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow great work figuring out all of this tricky CSS stuff!
.course { | ||
box-shadow: 0px 0px 10px 4px rgba(0, 0, 0, 0.055); | ||
position: relative; | ||
z-index: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the z-index
I was referencing previously — seems to mess with the course menu dropdown precedence.
<div class="courseMenu-left"> | ||
<img | ||
class="courseMenu-icon" | ||
src="@/assets/images/noteIconSmall.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is the case, we'd have to rearrange all the icons sidebar style to be centered not right-aligned and have a grid or dynamic offset calculation otherwise — I'd just find a new icon honestly.
@@ -250,6 +260,9 @@ export default defineComponent({ | |||
} | |||
return creditArray; | |||
}, | |||
openNoteModal(courseCode: string) { | |||
this.$emit('open-note-modal'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: checks not relevant as this will be used in later PRs.
<img | ||
src="@/assets/images/notes/arrow.svg" | ||
alt="Arrow icon" | ||
class="note-icon" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to change the naming for this to be more semantic, since we do already have a note icon in the menu dropdown.
Summary
This pull request is the first step towards implementing the Notes Feature!
Remaining TODOs:
Test Plan
Add a course card and select the note that peeks out from under the card. Type something, click the arrow to slide the note back under the card.