generated from the-collab-lab/smart-shopping-list-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
(W4) Nikema and Mike (Check Input Values if there are Duplicates in Database)
Nikema Prophet edited this page Jan 9, 2020
·
9 revisions
7. As a user, I want to be alerted when I’m entering an item that is the same as something already on my list so I can avoid duplicate items #29
PR: https://github.com/the-collab-lab/tcl-3-smart-shopping-list/pull/53
AC:
- 7.1 Show an error message if the user tries to submit a new item that has the exact same name as an existing item
- 7.2 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
- 7.3 The user’s original input should be what gets saved in the database
- To solve a problem, ask these questions
- What are the unknown aspects?
- What do you know? What data do you have?
- What constraints and what rules apply?
Overview
- Greet
- Review & Understand Story
- Set Week Plan
- Parking Lot (Things we brought up but not important)
Notes
- 7.1 We will use a ruby error from Mike's old code
- 7.2 Regular Expression? Would this be the best route or should we use Mike's Normalized?
input = input.replace(/[^a-zA-Z\s]/g, "").toLowerCase()
// will strip out all non-letters except whitespace, then lowercase the string
Questions
- 7.3 The user’s original input should be what gets saved in the database. Whatever the originally put in the box gets saved but you check if doesn't match what is already on the list. Andrew?
Next Steps
- 7.1 Mike
- 7.2 Nikema
- Nikema will create a branch and PR Draft ✅
- We will meet again Wed @ 8pm
- Maybe a little Cypress at the end of the week??
- Maybe make this app a little prettier???
https://reactjs.org/docs/context.html