Skip to content

To be reviewed#16

Open
JanefrancessC wants to merge 34 commits intofor-reviewfrom
master
Open

To be reviewed#16
JanefrancessC wants to merge 34 commits intofor-reviewfrom
master

Conversation

@JanefrancessC
Copy link
Copy Markdown
Owner

No description provided.

JanefrancessC and others added 30 commits October 8, 2022 15:15
search show and select show added
search show and select show designs
CSS designs for the showlists
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 7, 2022

Deploy Preview for cyf-janefrancess-tv ready!

Name Link
🔨 Latest commit 0187d1d
🔍 Latest deploy log https://app.netlify.com/sites/cyf-janefrancess-tv/deploys/63693e457c488a00082945b0
😎 Deploy Preview https://deploy-preview-16--cyf-janefrancess-tv.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Copy Markdown
Collaborator

@RobCso RobCso left a comment

Choose a reason for hiding this comment

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

Great job, especially on the visual side, you have a few bugs on your website but they can be fixed easuly

Comment thread script.js
season = season < 10 ? "0" + season : season;
number = number < 10 ? "0" + number : number;
return `S${season}E${number}`;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Very good helper function.

Comment thread queries.css
align-items: center;
gap: 1rem;
margin: auto;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice to see media queries to make the site responsive. there is slight issue with break points as the site doesn't break immediately after hitting the element but goes on to cover it for a bit before it breaks, but its a simple fix

Comment thread script.js
return response.json();
} else {
throw new Error(
`Encountered something unexpected: ${response.status} ${response.statusText}`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good to see your fetch api filters the network response and throws an error when something is wrong

Comment thread script.js
const showRuntime = document.createElement("p");
showRuntime.innerHTML = `<strong style = "color: green">Runtime: </strong>${show.runtime}`;
comboEl.appendChild(showRuntime);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

really like how you indented your function and commented on each block, this makes your code easily readable

Comment thread script.js
homeEl.style.display = "block";
document.querySelector(".search-icon").style.display = "block";
displayCountEl.innerHTML = `Displaying ${selectedShow.length}/${allShows.length} show(s)`;
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good use of the filter method with the eventlistener

Comment thread script.js
episodeSummary.className = "episode-summary";
episodeContainer.appendChild(episodeSummary);
// console.log(allShows);
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good use of the forEach method and like the readability

Copy link
Copy Markdown
Collaborator

@Know-Thyself Know-Thyself left a comment

Choose a reason for hiding this comment

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

Your TV app is fully functional and looks great as well.
I'm impressed by your attention to details!
Great work!

Comment thread script.js

// all shows

const loadShowList = (showID) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well written function to fetch all episodes of a show! However, you may want to rename the function loadShowList to match what it does, (e.g. loadEpisodes).

Comment thread script.js
});
};

function displayAllShows(showList) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great function to populate your home page! It's well commented and clear to follow what happens at each step. To make it even better, think of refactoring it by moving some codes to helper functions so that it doesn't have to deal with everything.

Comment thread script.js
"https://img.freepik.com/premium-vector/error-404-landing-page-with-file-flat-design_249405-162.jpg?w=2000";
showContainer.appendChild(showImage);
// show ratings combo
const comboEl = document.createElement("section");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Creating this comboEl container shows that you think of your web page's layout in advance.
Well done!

Comment thread script.js
showSummary.className = "show-summary";
showSummary.innerHTML = `${show.summary}`;
expandMoreContent.appendChild(showSummary);
// const expandMoreHolder = document.createElement("section");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice try here on the commented out code to create read more and read less functionality! Although, you still can make it work using JavaScript, there's also a purely CSS and a lot easier solution to it.
Check this YouTube video out: https://www.youtube.com/watch?v=OhCzEjXvY9A&list=LL&index=4
Or if you would like to do it with JavaScript, think of updating only the innerHTML to truncated or full summary. You can also switch the innerHTML of the same button between read more and read less following some simple logic.

Comment thread script.js
});
// console.log(searchedShow);
containerEl.innerHTML = "";
selectShowEl.innerHTML = "";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work on updating select options based on the search filter.

Comment thread script.js

// using the API fetch

const setup = async () => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well written asynchronous setup function!
Moving it up to somewhere like line 7 would be a good idea as it is the entry point to your application.

Comment thread script.js
};

// displaying the data contents
function makePageForEpisodes(episodeList) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Like the shows side, good job on episodes main function as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants