Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3. As a user, I want to set up a new shopping list so I can track purchased items #25

Open
stacietaylorcima opened this issue Jan 26, 2020 · 3 comments
Assignees

Comments

@stacietaylorcima
Copy link
Contributor

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:

  • Generate a new, unique token
  • Save the token to localStorage
  • Show the user the list view

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

@haleyelder
Copy link
Contributor

This week's plan will be to add a button on the application to generate a token specific to a user to display their specific shopping list.

  • The button will call the token.js file to generate a token (done!)
  • save this token to localStorage with localStorage.setItem('name', 'token');
  • use localStorage.getItem() to display token on the UI window/screen

Will have to coordinate with other pair how to structure data in the firebase database

@RachaelSkye
Copy link
Contributor

When a user pushes the add new token button a token will be generated and displayed to the user. Token is displayed in local storage and application state. We just need the other team's changes so we can pass in the token and alter our db function to get items from the list named with the generated token.

@RachaelSkye
Copy link
Contributor

RachaelSkye commented Feb 8, 2020

This last commit was a significant change over pretty much all files.

The file structure got somewhat re-organized. After the changes some components weren't being used so they were removed.

There were firebase errors because we weren't using the firebase initialization function in the firebase.js file. Every firebase call uses it now.

We're also confirming success and catching errors on adding items in the form component. As a user I get a little confused if I don't see some kind of feedback when submitting a form.

The items list component got refactored because using component didmount/update in the class based component was causing a memory leak error. It's functional now and using hooks.

Now a user can enter a pre-existing token on the home page or generate a new one.

Navigating to add items will allow a user to add items to the collection associated with the token or create a new collection with the newly generated token. A user will be able to see added items or any items already in the db for the entered token on the home page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants