-
-
Notifications
You must be signed in to change notification settings - Fork 222
Glasgow | 25-ITP-SEP | Hanna Mykytiuk| Sprint 3| Reading-list #857
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
Conversation
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
AbogeJr
left a comment
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.
Good work overall 👌. Please check out the comments.
| const title = book.title; | ||
| const author = book.author; | ||
| const alreadyRead = book.alreadyRead; | ||
| const bookCoverImage = book.bookCoverImage; |
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.
Good job with this.
Just a few minor improvements you could make:
- Seeing as the value of
bookwon't change inside ourforloop, do you think there is a better way to initialize it. - While this will work fine, can you find out if there is a cleaner way to unpack object properties into variables.
| const author = book.author; | ||
| const alreadyRead = book.alreadyRead; | ||
| const bookCoverImage = book.bookCoverImage; | ||
| const readingListDom = document.getElementById("reading-list") |
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 don't think we need to initialize the readingListDom object inside this block. Could you look into why that would be problematic?
| let authorDom = document.createElement("p"); | ||
| authorDom.innerText = author; | ||
| let imageDom = document.createElement("img"); | ||
| imageDom.src = bookCoverImage; |
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. Although img tags typically include a certain attribute that you haven't added here. The attribute is meant to improve accessibility and it is also displayed in place of the image in case it does not load. Please look into it.
| .book{ | ||
| background-color: red; | ||
| } | ||
| .alreadyRead{ |
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.
While this will work fine, css classes are typically not written in camelCase.
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| <title>Title here</title> | ||
| <title>Reading list app</title> |
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.
👌
Learners, PR Template
Self checklist
Changelist
Reading-list
Questions
No questions.