Skip to content
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
HackYourFuture:masterfrom
zmagzoub:week1
Closed

home work week1#26
zmagzoub wants to merge 5 commits into
HackYourFuture:masterfrom
zmagzoub:week1

Conversation

@zmagzoub
Copy link
Copy Markdown

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.

@zmagzoub zmagzoub closed this Jun 16, 2018
@zmagzoub zmagzoub reopened this Jun 16, 2018
Copy link
Copy Markdown

@harditsingh harditsingh left a comment

Choose a reason for hiding this comment

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

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!

Comment thread homework/src/index.js
function renderRepositories(error, data) {
if (error !== null) {
const err = document.getElementById('root');
err.innerHTML = error.message;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are handling errors in two places, should handle only at one place to avoid complexity

Comment thread homework/src/index.js
data.forEach(repository => {
const listItem = createAndAppend('option', select);
listItem.innerHTML = repository.name;
listItem.setAttribute('value', repository.name);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The options in the drop-down menu are not sorted

Comment thread homework/src/index.js
contributorsList.setAttribute('id', "contributors-list");

select.addEventListener('change', (event) => {
const newURL = 'https://api.github.com/repos/HackYourFuture/' + event.target.value;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should avoid using URLs inside functions, it can get hard to reuse the code without debugging (especially in bigger projects)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants