Skip to content

Roland's Project Cinema (week 3)#28

Open
rolandjlevy wants to merge 27 commits intoconstructorlabs:masterfrom
rolandjlevy:master
Open

Roland's Project Cinema (week 3)#28
rolandjlevy wants to merge 27 commits intoconstructorlabs:masterfrom
rolandjlevy:master

Conversation

@rolandjlevy
Copy link
Copy Markdown

Hi Dmitri

Here is my Project Cinema again but on the master branch this time.

Thanks,
Rol

Comment thread .~lock.dvdlist.xls#
@@ -0,0 +1 @@
Roland Levy,rolandjlevy,Rolands-MacBook-Pro.local,21.09.2018 10:07,file:///Users/rolandjlevy/Library/Application%20Support/OpenOffice/4; No newline at end of file
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.

This looks like it should be going into .gitignore or be deleted

Comment thread src/index.js
let loaded = 0;
let currentID = "";

function getMoviesFromSearch (url){
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.

Looks like these functions do the same thing. Can we not re-use one of them?

Comment thread src/index.js
clearNodes();
return;
}
return filmList.map(film => {
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

Comment thread src/index.js
resultsPagesNode.innerHTML = html;

const pageButtonList = document.querySelectorAll(".page-number-link");
pageButtonList.forEach(pageButton => {
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.

would be better to use delegation here

Comment thread src/index.js
const input = event.target.value;
if (input === "") {
loaded = 0;
return;
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.

If we return here we don't need an else. That helps to keep code more linear

Comment thread src/index.js
}
}
})
resultsHeaderNode.innerHTML = `<div class="results-showing">Please start by typing in your search...</div>`;
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.

It might be better to move this to the top. It feels a little lost here

Comment thread src/index.js
return fetch(url)
.then(response => response.json())
.then(filmObject => {
if (window.innerWidth < 768) {
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.

Would this not be better handled using CSS? It seems like we have different code more desktop and iPad.

Comment thread src/index.js
}).catch(error => console.log(error));
}

Array.prototype.filterOut = function(ignore) {
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.

It's bad practice extending the prototype of native JavaScript objects. https://developers.google.com/web/updates/2018/03/smooshgate

@dmitrigrabov
Copy link
Copy Markdown
Collaborator

I was looking forward to your README

@dmitrigrabov
Copy link
Copy Markdown
Collaborator

Good work otherwise :)

@rolandjlevy
Copy link
Copy Markdown
Author

Hi Dmitri

I just completed the README file.

Thanks for all your comments. I have some questions about them. Would be good to clarify.

Thanks,
Rol

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.

2 participants