Roland's Project Cinema (week 3)#28
Roland's Project Cinema (week 3)#28rolandjlevy wants to merge 27 commits intoconstructorlabs:masterfrom
Conversation
… for common words like MAN I need to find a better solution
…Pages don't load consistently
…o do the READ.me file
| @@ -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 | |||
There was a problem hiding this comment.
This looks like it should be going into .gitignore or be deleted
| let loaded = 0; | ||
| let currentID = ""; | ||
|
|
||
| function getMoviesFromSearch (url){ |
There was a problem hiding this comment.
Looks like these functions do the same thing. Can we not re-use one of them?
| clearNodes(); | ||
| return; | ||
| } | ||
| return filmList.map(film => { |
| resultsPagesNode.innerHTML = html; | ||
|
|
||
| const pageButtonList = document.querySelectorAll(".page-number-link"); | ||
| pageButtonList.forEach(pageButton => { |
There was a problem hiding this comment.
would be better to use delegation here
| const input = event.target.value; | ||
| if (input === "") { | ||
| loaded = 0; | ||
| return; |
There was a problem hiding this comment.
If we return here we don't need an else. That helps to keep code more linear
| } | ||
| } | ||
| }) | ||
| resultsHeaderNode.innerHTML = `<div class="results-showing">Please start by typing in your search...</div>`; |
There was a problem hiding this comment.
It might be better to move this to the top. It feels a little lost here
| return fetch(url) | ||
| .then(response => response.json()) | ||
| .then(filmObject => { | ||
| if (window.innerWidth < 768) { |
There was a problem hiding this comment.
Would this not be better handled using CSS? It seems like we have different code more desktop and iPad.
| }).catch(error => console.log(error)); | ||
| } | ||
|
|
||
| Array.prototype.filterOut = function(ignore) { |
There was a problem hiding this comment.
It's bad practice extending the prototype of native JavaScript objects. https://developers.google.com/web/updates/2018/03/smooshgate
|
I was looking forward to your README |
|
Good work otherwise :) |
|
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, |
Hi Dmitri
Here is my Project Cinema again but on the master branch this time.
Thanks,
Rol