This repository was archived by the owner on May 14, 2024. It is now read-only.
home work week1#26
Closed
zmagzoub wants to merge 5 commits into
Closed
Conversation
harditsingh
reviewed
Jun 24, 2018
harditsingh
left a comment
There was a problem hiding this comment.
Nice work, I like how your code looks! I hope that you have applied styling too in the next assignment. I have some comments though, please see below. Cheers!
| function renderRepositories(error, data) { | ||
| if (error !== null) { | ||
| const err = document.getElementById('root'); | ||
| err.innerHTML = error.message; |
There was a problem hiding this comment.
You are handling errors in two places, should handle only at one place to avoid complexity
| data.forEach(repository => { | ||
| const listItem = createAndAppend('option', select); | ||
| listItem.innerHTML = repository.name; | ||
| listItem.setAttribute('value', repository.name); |
There was a problem hiding this comment.
The options in the drop-down menu are not sorted
| contributorsList.setAttribute('id', "contributors-list"); | ||
|
|
||
| select.addEventListener('change', (event) => { | ||
| const newURL = 'https://api.github.com/repos/HackYourFuture/' + event.target.value; |
There was a problem hiding this comment.
You should avoid using URLs inside functions, it can get hard to reuse the code without debugging (especially in bigger projects)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am really sorry because I handed in my homework too late. Today's evening I will hand in week 2 homework.
My page is not styled, but the code works well. I will style my page today and hand in week 2 homework styled. Sorry again.