Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naheed Edges Trek #26

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Naheed Edges Trek #26

wants to merge 9 commits into from

Conversation

arangn
Copy link

@arangn arangn commented Nov 27, 2018

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? Asynchronous code does not have to run in order- we can still interact with the webpage while a request is being sent
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? The get and post requests execute asynchronously. By using event.preventDefault on the post request, this avoided a page reload when the user submitted the form.
What kind of errors might the API give you? How did you choose to handle them? It will send a bad request if the required fields are not present. I handled this by reporting the error message to the user.
Suppose you needed to routinely find a specific Trip in the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not. Not necessarily, you could search for that trip using the id

@tildeee
Copy link

tildeee commented Dec 11, 2018

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x, perfect answers!
Functionality
Click a button to load and view a list of trips x
Click a trip to load and view trip details x
Fill out a form to reserve a spot
Errors are reported to the user
CSS is DRY and attractive, uses CSS Grid, flexbox, and/or Bootstrap x
Under the Hood
Trip data is retrieved using from the API x
JavaScript is well-organized and easy to read x
HTML is semantic x
Overall

Good work on this project Naheed! Your code style overall is pretty cool; I like it a lot.

You stumbled on a syntax error that made submitting the form produce an error. Because submitting the form had a syntax error, I also didn't see any reporting of status or error to the user (the functions reportStatus doesn't do anything!)

That being said, everything else looked good!!

button.on('click', () => {
clickDetails(`${trip.id}`);
})
})
Copy link

Choose a reason for hiding this comment

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

You want to add in another }) here...

reportStatus(error);
console.log(error);
});
});
Copy link

Choose a reason for hiding this comment

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

And you want to remove the }); here... and then your syntax error is fixed!

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