-
Notifications
You must be signed in to change notification settings - Fork 0
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
Delete Lesson Functionality #89
base: master
Are you sure you want to change the base?
Conversation
β¦ct-uiuc/glen-world into fixing-css pullin again.
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.
some qs and criticisms
@@ -1 +1,44 @@ | |||
@import "../../pages/Index/index.scss"; | |||
|
|||
.confirmation-background { |
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.
alright bc this is frontend i'm assuming @AngelaLuo49021 wrote it correct me if i'm wrong
but to avoid clashing classnames while refactoring i decided to nest all the classes into this one because you can do that in sass, you can look at my branch (i think this is the link: #84 ) for examples
.yes-no-buttons { | ||
color: black; | ||
background-color: $assignments-light-purple; | ||
font-family: $assignments-roboto-font; |
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.
pls fix the indentation and rename to .delete-confirmation-button
.confirmation-background { | ||
background-color: white; | ||
border: 4px solid $assignments-font-color; | ||
box-shadow: "5px 10px #888888"; |
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.
are the shadows all similar enough to standardize into a variable?
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 think this one is only used twice
|
||
position: fixed; |
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.
why the random space
top: 25%; | ||
} | ||
|
||
.delete-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.
put a space here omg we need a formatter for css
function handleDeletedLesson() { | ||
setDeletedLesson(!deletedLesson); | ||
} |
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.
was this the fix for the lessons not updating problem?
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.
Yup! So this signals to the LessonsDisplay to recall the firebase endpoint and update the lessons displayed on the screen in useEffect()
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.
could you explain this? is the value of deletedlesson ignored and it's only used to trigger useEffect()
?
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.
wdym the value of deletedLesson ignored?
Yeah your interpretation is right, I made this specifically just to trigger useEffect(), to signal to the parent component displaying the customLessons (customLessonsDisplay) to update the lessons. Since we're not redirecting back to the same page, I think this is the best way to do it but correct me if I'm wrong if you have a better implementation!
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 just meant that it doesnt matter if it's true or false because its changing updates the component
i think it should be fine, it's only a little janky
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.
almost there bc im a react monster now i found some more stuff for u to do
src/pages/Index/index.scss
Outdated
$confirmation-light-light-grey-background-color: #EEEEEE; |
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.
actually can u make this like.. extra-light instead of light light
light to extra light
Status: π Ready
Description π Allows deletion of lesson with confirmation
Fixes #81
TODOs β