GithubHelp home page GithubHelp logo

marlatte / shopping-cart Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 4.06 MB

A mock e-commerce website built with React.

Home Page: https://marlatte-shopping-cart.netlify.app/

JavaScript 82.81% HTML 0.45% CSS 16.73%

shopping-cart's Introduction

Hi there ๐Ÿ‘‹

I'm a front-end developer educated through The Odin Project who also enjoys:

  • Making music ๐ŸŽธ ๐Ÿฅ ๐ŸŽค
  • Designing logos and layouts ๐Ÿ–ผ๏ธ ๐Ÿ–๏ธ
  • Tearing my hair out over soccer โšฝ๏ธ ๐Ÿ›ก๏ธ

Skilled with

My Skills

shopping-cart's People

Contributors

marlatte avatar

Watchers

 avatar

shopping-cart's Issues

Plan app

Thinking in React

Starting from a mockup...

  1. Break the UI into a component hierarchy
  2. Build a static version in React
  3. Find the minimal but complete representation of UI state
  4. Identify where your state should live
  5. Add inverse data flow

This Project's goals

  • What features do you want?
  • What components does that necessitate?
    • Each component gets own folder with structure:
components
  โ”œโ”€ form
  โ”‚  โ”œโ”€ __tests__
  โ”‚  โ”œโ”€ FormInput.jsx
  โ”‚  โ””โ”€ Checkbox.jsx
  โ””โ”€  ui
     โ”œโ”€ __tests__
     โ”œโ”€ Button.jsx
     โ””โ”€ Modal.jsx

Design

  • 3 pages: Cart, Home, Products
  • Can I use Conor's Yuedpao wireframe?

Bug: hero img

  • When focus shifts to hero img on mobile it covers the text. Move :hover rule into @media.

  • Also, when navigating back to Home from other pages, hero img doesn't load. Caught on iOS Safari. Reproduced on desktop Safari in Responsive Design Mode. img dimensions computed as 0 x 0.

Add loading screen

Anywhere there's a fetch with an empty screen:

  • Home: ProductTeaser
  • SingleProduct
  • Products grid

Bug: cart img's not loading

Mobile: images (both hard-coded and fetched) display fine on most pages, but CartItems won't load on Safari. Reproduced on desktop Safari.

img dimensions are 0 x 0, but then playing with css in devTools brings it back. Maybe they just need some min dimensions?

Bug: updating quantity very slow

Updating quantity in the Cart takes a while for new number to show up bc it updates the miniCart, then the full cart with setCart() within useEffect(), then passes that down to CartItem to actually be displayed.

Add LocalForage

In cartController.js, replace Map with localForage so the browser remembers users' carts/

Create React Project

  • npm create vite@latest <repo-name> -- --template react
  • git init then add and commit
  • gh repo create
  • Rm template files
  • Set up file structure
  • Add basic README and descriptions
  • Add prettier & airbnb configs: npm i -D eslint-config-prettier eslint-config-airbnb
  • Add them to eslint 'extends' (airbnb first, prettier last)

Style app with modules

  • Body & Root flex boxes, height, etc.
  • Footer
  • ErrorPage
  • Header & Menu
  • main flexbox
  • ProductCard
  • Home
  • Products
  • SingleProduct
  • Cart
  • CartItem

Bug: Articles on Home

Articles section in Home has weird spacing on iOS Safari. When stacked vertically, second article is pushed down out of position and overlaps with CallToAction.

Reproduced on desktop Safari in Responsive Design mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.