Closed jssckbl closed 3 years ago
Visit the preview URL for this PR (updated for commit f715127):
https://tcl-23-shopping-list--pr19-jc-jw-show-duplicate-7fh5e9nj.web.app
(expires Sun, 02 May 2021 19:34:14 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
I love the video walk-throughs and the notes sections in this PR really helped me understand your pair's thought process as you're working through this issue. 🎉 👏🏽 🚀
Similar to what we discussed in our weekly sync today, our routing logic is getting complicated. If we step back and reevaluate the logic, there's a lot of commonality between the redirects since they all act on the presence of token
. We could try and refactor this by 'hoisting' the routing decision tree higher to simplify and keep things DRY. Here's one example of how we could do this, and it eliminates all redirects!
Thank you for the suggestions of simplifying the routing page, @skylerwshaw! I think it is easier to read the code this way. They have been implemented.
(and I somehow deleted part of your comment. The part that gives the code to enter. Which I did apply to the project. I apologize for that!)
I'm currently getting an error when adding an item to the list on this branch:
I am not getting the error you are showing when I add an item to the list, so I am not quite sure how to trouble shoot it.
For an example of how to fill this template out, see this Pull Request.
Description
This PR addresses intentionally created error messages in response to various user inputs. These error message parameters exist to simplify the user experience, and maintain a clean database and user list, all while staying within the scope of the overall project.
Related Issue
Acceptance Criteria
[x] Show an error message if the user tries to submit a new item that has the exact same name as an existing item
[x] Show an error message if the user tries to submit a new item that has the same name as an existing item, where capitalization has been normalized and punctuation has been removed
[x] The user’s original input should be what gets saved in the database
Type of Changes
Updates
Before
https://user-images.githubusercontent.com/47455758/115407245-7a6c4300-a1b5-11eb-9ee9-b8f60fb071f5.mp4
After
https://user-images.githubusercontent.com/47455758/115407275-822be780-a1b5-11eb-8fef-0e14c2b08a82.mp4
Testing Steps / QA Criteria
Add Item
linkice cream
)/list
view. Navigate back toAdd Item
Ice! CreAm.....
)Notes
submit
button until the query to Firestore has resolved. But we wanted mentor guidance/input on this.createListItem
function. It does work as intended. However, I'm sure there is a better way to write the async function overall. I just don't know exactly how to make it simpler/better. I really don't like how many versions of acatch
or error handling there is.