Skip to content

Conversation

@Faiza1987
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? It means that when I click on something in the browser, the app will not freeze until that click event has been processed. The code will process the click event (like an API call) in the background and still let me interact with the rest of the app.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? When we make an API call (to get all trips, or details on 1 trip) the display status functions display an in-progress status while the call is being made and updates it self depending on the status code of the response.
What kind of errors might the API give you? How did you choose to handle them? The errors can be for an internal server error, bad request, no content, etc. I have methods that display the error messages that go with the status code from the response.
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. The trips would already be ordered by id but the trips being in order would not impact the way we get information. JQuery will give us the details of trip that was clicked on.

@CheezItMan
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene reasonable number of commits and good commit messages
Comprehension questions Check
Functionality
Click a button to load and view a list of trips Check
Clicking the "load" button twice does not cause each trip to display twice Check
Click a trip to load and view trip details Check
Clicking a different trip loads different details Check
Submitting the form only sends one POST request INCOMPLETE, I left a little feedback on the code you do have
Errors are reported to the user Errors on get requests are reported
Site is clearly laid out and easy to navigate It looks nice.
Under the Hood
Callback functions are not nested more than 2 levels deep Check
Callback functions are given descriptive names Check
Code is generally well-organized and easy to read Check
All API calls have both success and error callbacks defined Check
HTML is semantic Check
CSS is DRY, uses CSS Grid, Flexbox, and/or Bootstrap Check
Overall You hit the learning goals for waves 1-2. Wave 3 is incomplete so you missed learning goals related to making post requests and the error messages associated with them. See my inline notes on your bug in submit. Otherwise nice work!

index.js Outdated

reportStatus('Sending trip data...');

let tripId = $(this).html();

Choose a reason for hiding this comment

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

Your event handler is an arrow function so... it doesn't have a this reference. You could use event.target instead. But of course you'll need something in this method to indicate which trip to submit. Maybe you could put it in the form as a hidden field, or you could use a closure.

Copy link
Author

Choose a reason for hiding this comment

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

Post request is now complete.

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