Code Monkey home page Code Monkey logo

redux-shopping-cart's Introduction

Work & Co Web Code Assessment

This is a copy of the Redux Shopping Cart Example.

To install dependencies, use the package manager Yarn:

yarn

To start a development server:

yarn start

Setup

Please create a new, public Github repository where your assessment can be reviewed. We recommend the following steps:

  • Create a repository on your personal Github. Make sure the Initialize this repository with a README box is unchecked.
  • Visit your new repository. Copy the …or push an existing repository from the command line code provided and run it in your terminal in the same directory as this README file. It will look something like this:
git remote add origin [email protected]:my-username/my-assessment.git
git push -u origin master

Note: You're encouraged to show your work by including multiple commits - we'll be looking through your git history.

Tasks

  1. Implement Responsive Design
  2. Enhance Cart Functionality
  3. Hook Up Product API

You're welcome (but not required) to add any libraries you think would be helpful.

Please also update this README file: we'd love to see notes on your decision-making process, links to the most exciting pieces of code, or anything else that will give us additional context when reviewing your assessment.

Documentation

Step 1: Accomplish stacking function

First, to better understand the structure of the code, I started by put putting borders around each element to make sure I understood how all the elements were nested and worked together.

My first goal was to get the stacking to work correctly for the mobile view.

After putting boxes around all of the elements, I made sure every sub element was in a div so that I could easily manipulate them. I made a div structure so that each product had two main divs: the picture and the rest of the information. Within the info div, I could put and arrange all of the info how I wanted later. My focus at this point was to get the picture and info to stack correctly. I did this by using flex containers within the product item so that I could easily change from a column setup to a horizontal setup.

Step 2: Modal Function

Next I worked on making basic modal pop up following an example online (this is my first time using redux, so I had to look a lot up). I did this separately with an empty popup in order to make sure I got the functionality down correctly before adding content. Next I needed to add the cart to this modal. I first tried adding the cart component to the modal but had trouble integrating it. I tried the other way around and still kept getting errors. Then I tried adding the CartContainer to the ModalRoot container, but got an error this way as well. I decided to switch gears and focus on the css and return to the cart content after.

Step 3: CSS

For the CSS I began by importing the fonts from the sketch file. Then I added color and styled the buttons and I used @media to make the website responsive for different sized screens. I had a bit of trouble adding the photos and ran out of time to adjust the rest of the CSS to make it respond correctly, so some of it doesn’t align the way it should, but most of the structure is there and just needs to be adjusted a bit more to work smoothly.

redux-shopping-cart's People

Contributors

lydiajessup avatar

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.