STEP-Pod-Capstone-Project / Capstone-Project

https://book-book-app.appspot.com
Apache License 2.0
4 stars 0 forks source link

Search Servlet - Thumbnail Fix #110

Closed antoniolinhart closed 4 years ago

antoniolinhart commented 4 years ago

Description

Through more testing on our app, I realized that not all books retrieved from the Google Books API are guaranteed to have thumbnails (stored in the imageLinks object). When a search query ran into one of these books, it would crash, and nothing would appear on the frontend.

To avoid this, I added a check to see if the imageLinks object is null. If it is null, then a link to an image depicting a book with a question mark on it will be returned to the frontend. This ensures there is a consistent user experience on the frontend, where they can continue to click on the image and be directed to the book's specific bookpage via the book overlay.

Note: I also added a small fix to the frontend that shows "no rating" when there are no ratings on the book. This was not showing up appropriately before.

Screenshot of Feature

This is one of the books that lacks a thumbnail, so its image link was replaced with this alternate image. Unknown Question Mark Book

Linked Issue

Finished #72