If a user is unable to find their intended book using the integrated API, they can upload their own custom book. They must provide all the fields that would be received from the API, such as an image, ISBN, Title, Author(s), etc.
๐ Functionality
The page where a user chooses the book to save a quote for will now include a button to redirect to a page where the user can upload their own book to save a quote for. Submitting a book through that page will redirect to the form to save a quote.
๐ผ๏ธ Wireframes
Wireframe screenshot(s) of what the app should look like when it is complete.
โ Task List
โ๏ธ Server
Update server/index.js to ...
Test with HTTPie
Handle all errors and respond to the client
โก Client
Create a component to ...
Update component to ...
๐งโโ๏ธ Clean Up
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Create GIFs of the feature being used on both mobile and desktop screen sizes for inclusion in Pull Request.
Users can see a list of all saved quotes from all books.
๐ Functionality
User will be able to navigate to the Quotes view and see a list of cards, one for each quote. Users can also search for quotes in the list using the search bar.
๐ผ๏ธ Wireframes
โ๏ธ Server
Create an endpoint to get quotes in creation order
Test with HTTPie
Handle all errors and respond to the client
โก Client
Create a Page Quotes component that will encapsulate quote list
displayList (quotes to be displayed)
method getQuotes
Gets all quotes saved by the user
Create a component for a single quote in the list
Quote data received as props from the quote list component
Create a component for the quote list
Pull quote list from Context
Update SaveQuoteForm component to redirect to the quotes list on successful submission
๐งโโ๏ธ Clean Up
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Currently, users can only login during the process of submitting a new quote. There should be a button in the nav bar to allow for login and logout any time.
๐ Functionality
A description of how the application will work from the perspective of the user.
The user will click the button to log in and will get redirected to Google for OAuth. If the user clicks logout, they will be logged out.
โ Task List
Commit checklist for tasks needed to complete the feature.
๐ Database
Update schema.sql to ...
Update data.sql to ...
โ๏ธ Server
Update server/index.js to ...
Test with HTTPie
Handle all errors and respond to the client
โก Client
Create a component to ...
Update component to ...
๐งโโ๏ธ Clean Up
...
...
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Create GIFs of the feature being used on both mobile and desktop screen sizes for inclusion in Pull Request.
Users will now be able to change their auto-generated username based on their Google email address.
๐ Functionality
When a user is logged in, rather than a "Logout" button replacing the Login button, there will now be a button with an icon for the first letter of their username, and the text will be the user's username. When a user clicks this button, they will be redirected to the Profile page, where they will be able to change their username or log out.
โ Task List
โ๏ธ Server
Create an endpoint to check if a user already exists for a username, and return a boolean to determine if the username requested is available.
Create an endpoint to change a user's username.
Will make use of the above endpoint to check if the username is available before saving.
If the username isn't available, send a 403 Forbidden response along with json with the message "Username already exists"
If the username was updated successfully, send a 204 response
Test with HTTPie
Handle all errors and respond to the client
โก Client
Update the LoginButton component to only be a login button.
Create a LogoutButton component that has the ability to log the user out.
Create a UserProfileButton that shows a button with an icon for the first name of the user's username, and the user's username within it.
Actual content is a React Router Link to navigate to the UserProfile page
Create a LoginOrProfile component that returns either a LoginButton or UserProfileButton component depending on if there is a
Create an InfoMessage component that will display a message to the user
Two props:
color - defaults to black
message - a string
Display provided message in provided color within a p tag.
Create a ChangeUsernameForm component that contains a form to update a user's username.
Event Handlers:
isUsernameAvailable - used as the event handler for input event
if the response is true
update message and color
"That username is available." - green
if the response is false
update message and color
"That username is already taken." - red
changeUsername - used as the event handler for submit event
if the response has a 403 status code
update message and color
"The username that was submitted is already taken, please try a different username." - red
If the response has a 204 status code
update message and color
"Your username has been updated!" - green
State:
username - a string containing the current username typed by the user
message - message to be displayed to the user
color - the color of the current message to be displayed to the user
input to supply a new username
input event listener to send a request to the endpoint to determine if the username is available.
Update username value
debounce by 300ms
Create a piece of state to keep track of the current value
Use setTimeout and useEffect.
Clear the timeout on cleanup
use the current value as a dependency for the effect.
button for submitting the form
submit event listener to send a request to the endpoint to attempt username replacement.
Create a UserProfile page component
gets the user's current username from cookies.
if there is no username in cookies, return Redirect component from React Router to redirect to /
Returns the following:
A ChangeUsernameForm component
A LogoutButton component.
๐งโโ๏ธ Clean Up
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Create GIFs of the feature being used on both mobile and desktop screen sizes for inclusion in Pull Request.
Users can click on an icon on each quote in their quote list to be redirected to the SaveQuoteForm again with the existing values for the quote already filled in.
โ Task List
shift all ids to UUID
Create a new PATCH endpoint to edit an existing quote.
front end will need to send quote id with data.
may require adjusting data sent in quotes endpoint to include id.
Test with HTTPie
Handle all errors and respond to the client
โก Client
Adjust QuoteListItem to include an edit icon
add a click event listener to redirect to the edit page
create EditPage, which uses SaveQuoteForm but with values provided as props.
will need to send quote id with data to the back-end
sends a request to the edit endpoint
redirect to quote list
scroll to quote on redirect
create an id on each quote, which is their UUID
๐งโโ๏ธ Clean Up
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented-out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Create GIFs of the feature being used on both mobile and desktop screen sizes for inclusion in Pull Request.
Users will be able to view a dashboard of the books they have saved quotes for and click on the book cover for a book to see all the saved quotes for that book.
๐ผ๏ธ Wireframes
Mobile
Desktop
๐ Database
Update book table to include a row for larger image
โ๏ธ Server
Update endpoint to save quote to include large image URL
write endpoint to get a list of all books for a single user
sends the larger image, book id, and book name (for alt text)
revise endpoint to get quotes to include the ability to get quotes for a single book
โก Client
Update quote storage to also include a larger image of the book cover
Review Google Books data to determine name of property to access the larger image URL
Create a component for a single book cover
uses the larger book image
should navigate to quotes for just that book when clicked
Create a component for the book cover list
Update QuoteDashboard to include the ability to show results for only a single book
Add bookId to state, with default null to account for all books
Not sure how to pass id to quotes view...maybe URL parameter?
๐งโโ๏ธ Clean Up
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
User will be able to view a detail view for a single book to verify if it is the book they want to save a quote for.
๐ Functionality
While searching for books, a user will be able to click an "โ" icon to see details for that book. They can also return to the search they had in progress from that page.
๐ผ๏ธ Wireframes
Mobile
Desktop
โ Task List
Commit checklist for tasks needed to complete the feature.
โ๏ธ Server
Create an endpoint to get details for a single book
Check if the book already exists in the database
If so, get book details and send them as a response
If not, get book details from ISBNdb and send them as a response
Test with HTTPie
Handle all errors and respond to the client
โก Client
Create a BookDetails component to show the details of a single book
Add a back button to show the previous view using React Router
Create a function named sanitizeSynopsis to sanitize synopsis using DOMPurify and return object with __html property holding that sanitized value
User will be able to upload an image and transcribe the text from it in order to save the quote.
๐ Functionality
User can upload an image by either clicking on the image upload area or drag and drop the image onto the page, then the image will be interpreted and any text in it will be auto-inserted into the quote field in the form to save a quote.
๐ผ๏ธ Wireframes
Mobile
Desktop
โ Task List
Commit checklist for tasks needed to complete the feature.
โก Client
Create a component to act as a file dropzone using react-dropzone
Update component to save a quote to include dropzone component
Have files dropped in dropzone send files to tessaract.js to get text
Save text returned from tesseract.js as new state for textarea component
๐งโโ๏ธ Clean Up
...
...
Make sure that no React state objects are being mutated.
Make sure that no event listeners are manipulating the DOM directly.
Make sure that click targets are either <a> or <button> elements.
Make sure that all click targets show a cursor: pointer when hovered with the mouse.
Remove all buttons and placeholders that do not serve the functionality of the feature.
Remove all console logs.
Remove all commented out code.
Remove all CSS properties that have no effect.
Check all code for proper formatting and indentation.
Confirm that there are no errors in the console while using the application.
Confirm that all previous functionality still works without errors.
Confirm that the user interface looks natural on both mobile and desktop screens.
Create GIFs of the feature being used on both mobile and desktop screen sizes for inclusion in Pull Request.
Update endpoint to save a book to do the following:
Check the dimensions of the image to see if the innate width is above 300px (use image-size package, relatively small import cost).
If so, save using the default image path from ISBNdb
If not, start a background search for all possible images of the cover from Google Books, New York Times, etc. Once all images have been received, determine the largest image and update the book listing in the database to use the largest image as its book cover
Maybe update to store in S3 to avoid images being deleted in the future.