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

&&: Monalisa's trek #33

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

&&: Monalisa's trek #33

wants to merge 7 commits into from

Conversation

MonalisaC
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? Asynchronous code takes statements outside of the main program flow, allowing the code after the asynchronous call to be executed immediately without waiting.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? axios.get(URL) executes asynchronously, returns a promise , the data in the promise is accessed using .then and errrors are catched using .catch.
What kind of errors might the API give you? How did you choose to handle them? 400 bad request error and using .catch to catch them and print the error messages.
Do you have any recommendations on how we could improve this project for the next cohort?

});
$('.trip-item').click( function(event) {
loadTripDetails(`${event.target.id}`);
});
Copy link

Choose a reason for hiding this comment

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

This ends up working, but we would prefer if you added your click event listener to each .trip-item using event delegation


axios.post(URL + '/' + tripId + '/reservations', reserveData)
.then((response) => {
reportStatus(`Successfully reserved ${tripId}`);
Copy link

Choose a reason for hiding this comment

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

This ends up not being a very helpful message if you put in the tripId since it just ends up reading "Successfully reserved 4" or whatever the trip ID is. It might be more usable if you put in the trip's name instead.

@tildeee
Copy link

tildeee commented Jun 1, 2018

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene yes, your commit messages should describe what changes the commit made. What does "Add reservation" mean? I would expect a commit message like "adds functionality so user can make a reservation"
Comprehension questions x
Functionality
Click a button to list trips x
Click a trip to see trip details x
Fill out a form to reserve a spot x
Errors are reported to the user x
Styling 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

I think these projects are an opportunity to be creative with styling, but I must warn against using blinking animations... it's not very good on text that needs to display important information to the user, because the user cannot read it well or focus on it well. I understand that it draws the attention of the user and looks flashy, but it's not very usable.

Why does your reservation form show up at the very beginning?

Otherwise, good work, the code works well and it's good overall

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