Skip to content

London | May-26 | Liridona Shehu | Sprint 3 | Module-Data-Flows | Tv-Show -Project | Level_500 - #88

Open
shehu-dona wants to merge 39 commits into
CodeYourFuture:mainfrom
shehu-dona:main
Open

London | May-26 | Liridona Shehu | Sprint 3 | Module-Data-Flows | Tv-Show -Project | Level_500#88
shehu-dona wants to merge 39 commits into
CodeYourFuture:mainfrom
shehu-dona:main

Conversation

@shehu-dona

Copy link
Copy Markdown

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | SPRINT NUM | PROJECT NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

A PR for Tv_Project_Level_500.

dona-shehu and others added 30 commits July 29, 2026 15:36
Level0/100. 
Merging the changes to main for level0/100
London | 26-ITP-May | Martin Mwaka | Sprint 1| Project-TV-Show Level 200
London | 26-ITP-May | Martin Mwaka | Sprint 1 | Level 200 - add search input
London | 26-ITP-May | Martin Mwaka | Sprint 2| Input and Select
London | May-26 | Liridona Shehu | Sprint 2 | Module-Data-Flow | Tv-Project| Level 300
… 400 (#6)

* udpate index, script and css files

* update index.html
@cjyuan cjyuan added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 18, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Sep 2, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Appropriate use of semantic HTML
  • The deployed sit has all the necessary functionality
  • Generally the js code is good, but I have some comments

Good work on this. ITP is complete now, but if you want an extra challenge, feel free to respond to my comments.

Comment thread script.js
async function fetchShows() {
if (showsCache) return showsCache;

if (!showsPromise) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do you use this if block checking if a promise is present?

Comment thread script.js
const card = document.createElement("section");
card.className = "show-card";
card.innerHTML = `
<h3>${show.name}</h3>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason you are using HTML in the js here, given you also use a template?

Comment thread script.js
card.className = "show-card";
card.innerHTML = `
<h3>${show.name}</h3>
<img src="${show.image?.medium || ""}" alt=" ${show.name}">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this an appropriate use of an alt tag? See what https://axesslab.com/alt-texts/ has to say

Comment thread script.js
card.innerHTML = `
<h3>${show.name}</h3>
<img src="${show.image?.medium || ""}" alt=" ${show.name}">
<p>${show.summary || ""}</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This isn't wrong, but can you think of any potential side effects of inserting the summary from the API directly into your HTML like this?

Comment thread script.js
return episodesCache.get(showId);
}

if (!episodesPromises.has(showId)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What benefit is there in having 2 different caches here?

Comment thread script.js
const episodeImage = episodeCard.querySelector("img");
const episodeSummary = episodeCard.querySelector("p");

title.innerText = `${episode.name} - ${formatEpisodeCode(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code here is formatted a bit oddly. If you want to split it over multiple lines, is there a way to do so that retains the readability better?

Comment thread script.js
showEpisodesView(Number(selectedValue));
});

document.querySelector(".back-to-shows").addEventListener("click", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you think of any alternative approaches that would simplify changing the state of classes, so you don't need to individually change each one?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants