Skip to content

Conversation

@MarcusZagorski
Copy link
Owner

Here is my complete TV Show-Library. I hope you enjoy 😊

@netlify
Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for cyf-marcuszagorski-tv ready!

Name Link
🔨 Latest commit 7449d7f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-marcuszagorski-tv/deploys/65c4c6bcd137c60008afa3aa
😎 Deploy Preview https://deploy-preview-4--cyf-marcuszagorski-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 configuration.

Copy link

@adniyaYousaf adniyaYousaf left a comment

Choose a reason for hiding this comment

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

Well done Marcus! I like your TV show layout and design.

Copy link

@adniyaYousaf adniyaYousaf left a comment

Choose a reason for hiding this comment

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

I think it would be more user-friendly if there was a Home button available to easily navigate back to the main page after selecting a show from the list. Otherwise, it looks great!!

Copy link

@nirmeet-baweja nirmeet-baweja left a comment

Choose a reason for hiding this comment

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

Well done! Its great to see your progress in the course and to see it reflected in your code as well. 🎉

<link rel="icon" href="/favicon.ico" type="image/x-icon" />
</head>

<body>

Choose a reason for hiding this comment

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

I would suggest giving your app a name or a main heading. So that when a user navigates to your website, they know the goal / purpose of the website. But nice page design and layout! Well done there.

function setup() {
const allEpisodes = getAllEpisodes();
makePageForEpisodes(allEpisodes);
const currentState = {

Choose a reason for hiding this comment

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

It is a nice idea to use a single object to keep track of all the states that you need.

let layoutSelector = document.querySelector(".layout");

// Fetch API function to fetch data upon call
async function fetchAPI(url) {

Choose a reason for hiding this comment

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

Good job on breaking down the code into small functions.

}

// Fetches shows data via API
async function getAllShows() {

Choose a reason for hiding this comment

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

What happens if the code fails to fetch the shows? Is the user informed about the failed action in any way?

}

async function getAllEpisodes() {
try {

Choose a reason for hiding this comment

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

Same comment as above. Is the user kept updated with the state of the website?

function createEpisodeCard(episode) {
const layoutSelector = document.querySelector(".layout");

const linkCardsToTVMaze = createElement("a", "");

Choose a reason for hiding this comment

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

Is it good use of semantic html to have a section tag within ana tag?

}
}

function dropDownAfterSearch(currentShows) {

Choose a reason for hiding this comment

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

Is this function being used?

searchLayout.appendChild(displayingFilterResults);
}

async function searchFilterEpisodes() {

Choose a reason for hiding this comment

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

I was unable to use the filter episodes feature. When I navigate to the episodes page for a certain show and type something in the search field, the page takes me back to the search results for shows instead.

addCardLayout();
clearCards();
makePageForEpisodes(currentState.allEpisodes);
currentState.episodesFetched = false;

Choose a reason for hiding this comment

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

Why is currentState.episodesFetched set to false after the episodes are being fetched?

rootElem.textContent = `Got ${episodeList.length} episode(s)`;
async function render() {
try {
await getAllShows().then((allEpisodes) => {

Choose a reason for hiding this comment

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

Are we working with a list of shows or with a list of episodes in this part of the code?

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.

4 participants