London | ITP-May-26 | Dipa Sarker | Sprint 3 | Project TV Show - Level 500 - #82
London | ITP-May-26 | Dipa Sarker | Sprint 3 | Project TV Show - Level 500 #82Dipa-Sarker wants to merge 34 commits into
Conversation
LONDON | ITP-May-26 | Dipa Sarker | Sprint 1 | Project TV Show-Level-100
template literals used for episodename textcontent
Revert "template literals used for episodename textcontent"
template literals used and console log hello removed
level 200 search implemented
Level200 episode selector
added functionality for API
Show selector and episode selector implemented
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work on this. The functionality is all present and works properly. The code is okay, but see my remark about comments below.
Some of the formatting looks a little inconsistent, did you try running a formatter before opening the PR?
I have spotted a few things, and have some extra questions. if you want an extra challenge now the ITP is over, you can try to address them.
There was a problem hiding this comment.
This file contains a lot of comments. There are some cases where your comments are really good, such as explaining how the keys and values are used in your caches, or when you give an overview what each function is meant to do.
However, there are also places where every single line of code is commented, and this gets a bit superfluous. For example, the comment explaining what .style.display = "none" means should be obvious enough. For comments in line with code I would typically expect you only to have a comment when the code is doing something difficult to understand.
If you're using this as a learning tool, that's fine, but just be aware we wouldn't typically see code commented quite to this level in the "real world" of coding.
|
|
||
| const image = document.createElement("img"); // Create episode image element | ||
| image.src = episode.image?.medium || ""; // Use episode image if available | ||
| image.alt = `Episode image for ${episode.name}`; // Alternative text shown if image cannot load |
There was a problem hiding this comment.
This is not the only thing the alt tag is used for. Have a look at https://axesslab.com/alt-texts/ and let me know what you think about your current approach
| card.append(image); //Add image to episode card | ||
|
|
||
| const summary = document.createElement("div"); // Create container for episode summary | ||
| summary.innerHTML = episode.summary; // Display episode summary returned by API |
There was a problem hiding this comment.
Do you think there are any potential side effects of setting the HTML this way?
Learners, PR Template
Self checklist
Changelist
Description
Completed the TV Show Project from Levels 100–500.
Level 100
Level 200
Level 300
Level 400
Level 500
Refactoring
formatEpisodeCode()getEpisodeUrl()clearMessages()searchShows()searchEpisodes()Testing
*** Netlify Link:
https://project-tv-show-dipa.netlify.app/
***Project Partner:
https://github.com/risikatpopoola