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 (continued from week 2) #49

Merged
merged 10 commits into from Jan 3, 2020

Conversation

@ajiles91
Copy link
Contributor

ajiles91 commented Jan 2, 2020

just creating initial pull request

src/pages/List.js Show resolved Hide resolved
An index needed to be built so that we could run a compound query. I created the query without using the FirestoreCollection component so that I could get the link from the error message in the console to build the index. I'm not sure if that was necessary or not but that's how I got there.
@prophen prophen changed the title creating first PR 3. As a user, I want to set up a new shopping list so I can track purchased items (continued from week 2) Jan 2, 2020
src/pages/List.js Outdated Show resolved Hide resolved
src/pages/List.js Show resolved Hide resolved
Nikema Prophet added 3 commits Jan 2, 2020
I pulled the tab navigation out of the HomePage component and gave it it's own NavTabs component. I added the NavTabs to each page that we have so far and removed the links to List and NewList because they are now redundant.
…ab/tcl-3-smart-shopping-list into aj-np-create-new-list-token
We tested that the items associated with the saved token populate the list so it's no longer needed to show them on the list view.
@prophen

This comment has been minimized.

Copy link
Contributor

prophen commented Jan 3, 2020

Finishing up the story from last week - https://github.com/the-collab-lab/tcl-3-smart-shopping-list/wiki/(Week-2)-Monica-&-Nikema-(As-a-user,-I-want-to-set-up-a-new-shopping-list)

PR: #49

Issue: Closes #25


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


The requested changes from Andrew:

This is a great start, but is a little incomplete. Importantly, from the story description:

A shopping list consists of a set of items associated with a user’s token.

What I'd like to see added to what you have is the following:

  • Once the user has a token, redirect them back to / (our list view)
  • On the list view, show only items associated with the user's token (should be able to add this as a parameter to the Firestore query)

You may need to add some records to the database directly to get them to display. In the next set of stories, we'll address adding items to the list in a way that stores the user's token as well (I'm a bit confused how that's already implemented because that story hasn't come up yet)

@prophen prophen requested review from mikeramz86 and MonicaDJohnson Jan 3, 2020
@MonicaDJohnson MonicaDJohnson removed their request for review Jan 3, 2020
@prophen prophen requested a review from MonicaDJohnson Jan 3, 2020
@prophen prophen requested review from stevelikesmusic and larsbrekken Jan 3, 2020
Copy link
Contributor

mikeramz86 left a comment

Everything should be work as it should be. Completed ACs for Story 3. Ready for mentor review

@segdeha
segdeha approved these changes Jan 3, 2020
Copy link
Contributor

segdeha left a comment

Looks good, approved! Before merging, please remove any remaining console.log statements as well as any commented out code. Thanks!

src/pages/AddItem.js Outdated Show resolved Hide resolved
src/pages/HomePage.js Show resolved Hide resolved
src/pages/List.js Outdated Show resolved Hide resolved
src/pages/List.js Show resolved Hide resolved
src/pages/List.js Outdated Show resolved Hide resolved
Remove commented out code and console.log statements
Copy link
Contributor

prophen left a comment

I went through and removed the commented code and console.log statements at @segdeha's request.

@prophen

This comment has been minimized.

Copy link
Contributor

prophen commented Jan 3, 2020

@ajiles91 Do you want to give the PR a final look and then merge?

@ajiles91 ajiles91 merged commit 83ce948 into master Jan 3, 2020
5 checks passed
5 checks passed
Header rules - tcl-3-smart-shopping-list No header rules processed
Details
Pages changed - tcl-3-smart-shopping-list 6 new files uploaded
Details
Redirect rules - tcl-3-smart-shopping-list No redirect rules processed
Details
Mixed content - tcl-3-smart-shopping-list No mixed content detected
Details
netlify/tcl-3-smart-shopping-list/deploy-preview Deploy preview ready!
Details
@prophen prophen deleted the aj-np-create-new-list-token branch Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.