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

Alice D ️‍πŸ”₯, Aimee O ️‍πŸ”₯, Christabel S 🌊, Rachel G 🌊 #84

Open
wants to merge 513 commits into
base: master
Choose a base branch
from

Conversation

codeandmorecode
Copy link

Assignment Submission: bEtsy

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions. These should be answered by all members of your team, not by a single teammate.

Reflection

Prompt Response
Each team member: what is one thing you were primarily responsible for that you're proud of? Alice: I am really pleased with how much I have improved in my test writing, in particular how I got all the user_controllers and user_models test to work with 100% cov coverage. Aimee: I added the capability to upload images. To do this, I learned about active storage and including an image parameter (and being able to add multiple images for one project - which was not necessary for this project). I learned how to access the image using embedded ruby, and how to create a link with the photo. Christabel: Orders. I'm proud that things connect to everyone's bits! Rachael: I was primarily responsible for products and categories and their relationship to one another. I was proud that I successfully connected the two via a join table as I had avoided using that functionality in other projects.
Each team member: what is one thing you were primarily responsible for that you would like targeted feedback on? Alice: I would appreciate targeted feedback on user model and user controller including OAuth and respective tests. I would like feedback on Aimee: I would like targeted feedback on the reviews controller/model (and tests), and feedback on using active storage. Was there a different way I should have uploaded images? Could we have encountered issues if we had to deploy? Christabel: Rip apart the monstrous orders controller action, "submit" and/or the product controller action, "add_to_cart" Rachael: I'd love feedback on categories and products controller and model tests. I had help to get them functioning in the end, but I'd still love to know how it could be improved or more DRY
How did your team break up the work to be done? Originally we structured the Kanban board to include high, medium, and low priority tasks and features. We started by assigning tasks to individuals and pairs. For example Alice and Aimee began working on OAuth right away - since this was a completely new feature, as a group we wanted to make sure it was one of the first things that worked and that we would be able to ask for help early on if needed. As time allowed, we would take on individual tasks (such as html, css, writing tests).
How did your team utilize git to collaborate? We utilized git to collaborate by making individual and pair changes on separate branches, adding and committing changes often. When we were ready to merge our branches we would push them to the mainline branch, create a pull request, and review/resolve conflicts (if any) before merging. We communicated frequently about having another team member review the changes before merging, and letting folks know if something needed to be pulled.
What did your group do to try to keep your code DRY while many people collaborated on it? We tried to DRY up code as best as we could individually, and in pairs. Overall, our focus was on functionality, and getting everything working first.
What was a technical challenge that you faced as a group? One technical challenge that we faced as a group was pair programming over zoom using remote control, floobits as tools.
What was a team/personal challenge that you faced as a group? One team/personal challenge that we faced as a group was making sure everyone understood everyone else's code to connect it to their's and vice versa; as well as communicating about our code to avoid coding without first checking teammates' input.
What was your application's ERD? (upload this to Google Drive, change the share settings to viewable by everyone with a link, and include a link) https://drive.google.com/file/d/1ez1N_uYz8tWDyituXRNhqNTzLXC0e1s6/view https://app.diagrams.net/#G1ez1N_uYz8tWDyituXRNhqNTzLXC0e1s6
What is your Trello URL? https://trello.com/b/cNJzWXMQ/kanban-betsy
What is the Heroku URL of your deployed application? N/A

marks214 and others added 30 commits November 21, 2020 20:41
Product views - you can now see reviews on the product's page
commented out category feature
…strict access to cancel and complete actions
codeandmorecode and others added 27 commits November 25, 2020 11:01
Reutilizing old functional code for dashboard displaying orders from Cbel/tests
complete/delete order is workinnnnnnnnng; also redirecting after subm…
Working code - Working locally 100%
@jbieniosek
Copy link

bEtsy

Functional Requirements: Manual Testing

Workflow yes / no
Before logging in
Browse all products, by category, by merchant βœ”οΈ
Leave a review βœ”οΈ
Verify unable to create a new product βœ”οΈ
After logging in
Create a category βœ”οΈ
Create a product in that category with stock 10 βœ”οΈ
Add the product you created to your cart βœ”οΈ
Add it again (should update quantity) βœ”οΈ
Verify unable to increase quantity beyond stock βœ”οΈ
Add another merchant's product βœ”οΈ
Check out βœ”οΈ
Check that stock was reduced βœ”οΈ
Change order-item's status on dashboard βœ”οΈ
Verify unable to leave a review for your own product βœ”οΈ
Verify unable to edit another merchant's product by manually editing URL βœ”οΈ
Verify unable to see another merchant's dashboard by manually editing URL βœ”οΈ

Major Learning Goals/Code Review

Criteria yes / no
90% reported coverage for all controller and model classes using SimpleCov βœ”οΈ
Routes
No un-needed routes generated (check reviews) βœ”οΈ
Routes not overly-nested (check products and merchants) βœ”οΈ
Merchant dashboard and cart page use a non-parameterized routes (should pull merchant or cart ID from session) βœ”οΈ
Controllers
Controller-filter to require login is applied to all merchant-specific actions (update/add item, add category, view merchant dashboard, etc.) - filter method is not duplicated across multiple files βœ”οΈ
Helper methods or filters to find logged-in user, cart, product, etc βœ”οΈ
No excessive business logic ? (see note below)
Business logic that ought to live in the model
Add / remove / update product on order βœ”οΈ
Checkout -> decrease inventory βœ”οΈ
Merchant's total revenue βœ”οΈ
Find all orders for this merchant (instance method on Merchant) βœ”οΈ
Selected Model Tests
Add item to cart:
- Can add a good product
- Can't add a product w/o enough stock
- Can't add a retired product
- Can't add to an order that's not in cart mode
- Logic specific to this implementation
βœ”οΈ
Get orders for this merchant:
- Includes all orders from this merchant
- Doesn't include orders from another merchant
- Orders are not included more than once
- Does something reasonable when there are no orders for this merchant
βœ”οΈ
Selected Controller Tests
Add item to cart:
- Empty cart (should be created)
- Cart already exists (should add to same order)
- Product already in cart (should update quantity)
- Bad product ID, product is retired, quantity too high, or something like that (error)
βœ”οΈ
Leave a review:
- Works when not logged in
- Works when logged in as someone other than the product's merchant
- Doesn't work if logged in as this product's merchant
- Doesn't work if validations fail
? Missing a few

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Descriptive/Readable βœ…
Concise βœ…
Logical/Organized βœ…

Overall Feedback

Great work Miscellaneous Celestial Bodies! You've built a fully functional web store from top to bottom. This represents a huge amount of work, and you should be proud of yourselves!.

I am particularly impressed by how solid your site is! Everything works, nicely done! I tried several ways to break it, but it is well put together and does a great job of preventing me from doing unpermitted actions or viewing things that my account should not have access to. I also want to commend you for your expansive set of tests, excellent coverage!

I do see some room for improvement around the user interface, especially in the shopping cart and the merchant dashboard. Both are fully functional, but they are complicated to navigate. For future projects, I would suggest spending some time thinking about the user experience, and how to perhaps reformat so that the user has less menus to traverse in order to access various pieces of functionality.

Regarding the 'no extra business logic' section above, there are a few areas where the code could be made more DRY. For example, in the application_controller find_user is running before all actions, but some of the controllers are re-doing the work of finding the user.

Minor Bugs:

  1. When viewing the cart, the buttons at the top always say "Log in with GitHub", even if the user is logged in
  2. See inline comments on user.rb for login bug

bEtsy is a huge project on a very short timeline, and this feedback should not at all diminish the magnitude of what you've accomplished. Keep up the hard work!

Only the person who submitted the PR will get an email about this feedback. Please let the rest of your team know about it.

Comment on lines +13 to +14
user.name = auth_hash["info"]["name"]
user.username = auth_hash["info"]["name"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 14 causes the login bug that I mentioned in the feedback notes. In the auth_hash ["info"]["name"] is an optional field and can be nil. If it is nil (as mine was when I tested) this causes the validation that the username has to exist to fail. To fix this, I would suggest using auth_hash["info"]["login"] as an alternative to name, or removing the validation. It is important to check that if you are validating on something, it will always exist in a valid case.

@cescarez cescarez deleted the WorkingCode branch January 10, 2021 03:11
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

Successfully merging this pull request may close these issues.

5 participants