Skip to content

Week 2: Claudia and Ethan ("As a user, I want to set up a new shopping list so I can track purchased items")

gunderodd edited this page Nov 25, 2019 · 13 revisions

Acceptance Criteria and Instructions:

A shopping list consists of a set of items associated with a user’s token. Tokens can be shared with other users to allow them to co-manage a given list. Creating a new list consists of the following:

  1. Generate a new, unique token
  2. Save the token to localStorage
  3. Show the user the list view

The following script can be used to generate a suitable token: https://gist.github.com/segdeha/21a42618ce5a54916c5b58d36ec2992e

Initial Notes:

  • We started this part of the project after our conference call with the whole team on 11-17-19
  • We agreed to research and practice for a couple of days, and code together on Wednesday!

Notes after AC completion:

  • File was created containing Andrew's script to generate token
  • GetToken component was created which contains a button with onButtonClickHandler which runs the getToken() function and stores the generated token to local storage & reloads browser
  • AddItem component: Firestore document storage structure updated so that each new input will be added to a doc with token as its name.
  • FetchItems component: FireStoreCollection path updated based on the new database structure *App component: conditional rendering implement that checks whether there is an existing token in local storage *Other tweaks made so that the app structure resembles the live app.

A few notes from the weekly Zoom call with the mentors on 11-24-19:

  • We spent most of our time on a retrospective for weeks 1 and 2. This gave us a chance to voice what we were appreciative for, what we thought had went well, and what things could go better the next time around.
  • Among other things, we agreed that we could...
  • ...Improve on making tests which focus on aspects that aren’t likely to change, more general tests, and try to consider if we are writing tests that will just get thrown in the future as the app grows...
  • ...Improve on keeping our communication clear by organizing Slack threads, using a lot of links and headers, only talking about each issue in one place, and remembering that it is easy to miss someone's opinion or solution among all the Slack threads going on at any given time...
  • ...And to make time in our process, after meeting our AC, doing tests, checking accessibility, and considering how the branches will merge, to work with our teammates deciding how we will present in our demo and how to make it smooth and succinct.

Combined teams week-wrap up meeting on 11-25-19:

  • Both teams agreed to meet on Zoom again to work together on solving a few final challenges and working through merge conflicts.
  • We wanted to pick the best way to use the Home view, and the best way to go about using our Router component, and to make sure all our tests were updated to pass in our new app structure.
  • We worked on merge conflicts, consolidated tests, changed our logic regarding checking state vs checking local storage, and figured out the Home view. It took a little less than 2 hours. We also discussed where to start on Week 3!

Useful Resources:

Learning React:



Random leftovers:

(rough sketch of game-plan: 1. add andrew's script to our project, import it into our home page component. 2. have a button the user can click that will run getToken() 3. save the resulting token, ie localStorage.set('token', {token}) 4. that token is more specifically associated with a list than with a particular user 5. only show a certain list if the user already has that token saved in their local storage? 6. revise this plan lol )

Clone this wiki locally