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

DONE #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

DONE #246

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
149 changes: 70 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,70 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Burger Stacker

You will be writing an app that simulates the stacking of a burger. You are provided an array of ingredients and you need to make an app the displays all the ingredients on the left side and has an area on the right where the ingredients can be stacked to make a burger.

Here is a rough wireframe of the general layout:

![](https://i.imgur.com/beMtwGj.png)

___
## User Stories

* As a user, I want to see all available burger ingredients listed on the left side.
* I want the ability to add any ingredient onto the burger stack using a button.
* I want to see each ingredient I select added to the top of the burger stack on the right side.
* I want the ability to clear the burger stack so I can start again.
* I want to be able to add as many ingredients of any type as I want (ingredients don't go away.)

___
## How To Get Started
0. Fork & clone this repository
1. Cd into this directory and run `npx create-react-app .` to make this directory into a react app.
2. Open in your code editor.
3. Clear out the generated code from the `App` component.
4. Draw a component diagram.
5. Write the static versions of your components.
6. Import and nest components so you have your start screen built for the app.
(See the **Starter Data** section below for a list of ingredients.)
8. Decide what the state should be.
9. Decide where the state should live.
10. Write the handler callbacks that you pass into children to update state.

### Sample Idea for Component Hierarchy:

```
App
|--IngredientList
| |--Ingredient(s)
|
|--BurgerPane
| |--BurgerStack
| | |--Ingredient(s)
| |
| |--ClearBurger
```

### Notes:

The order of items in the `stack` array will affect the order in which they appear on the page. Make sure you are adding ingredients to the `stack` in the correct way to make each ingredient stack on the previous one.

### Starter Data:

Here are some ingredients to get you started. Feel free to change them or add more. (This would be the value you set for `ingredients` when you initialize state):

```js
[
{name: 'Kaiser Bun', color: 'saddlebrown'},
{name: 'Sesame Bun', color: 'sandybrown'},
{name: 'Gluten Free Bun', color: 'peru'},
{name: 'Lettuce Wrap', color: 'olivedrab'},
{name: 'Beef Patty', color: '#3F250B'},
{name: 'Soy Patty', color: '#3F250B'},
{name: 'Black Bean Patty', color: '#3F250B'},
{name: 'Chicken Patty', color: 'burlywood'},
{name: 'Lettuce', color: 'lawngreen'},
{name: 'Tomato', color: 'tomato'},
{name: 'Bacon', color: 'maroon'},
{name: 'Onion', color: 'lightyellow'}
]
```
___
## BONUSES

* Each ingredient has an associated color. Use this to give each ingredient a nice background color reminiscent of what it looks like in real life.
* Add a form component (simply text input and button) to the ingredient side that lets a user add a new ingredient to the master list of ingredients in state.
* Add the ability to "undo" the last ingredient added (only the last one) by clicking a button that will remove that ingredient. Only that top ingredient should have the button for this showing up. When that ingredient is removed, the next one down should then get the button that allows it to be removed. **HINT**: You probably need to add this button to the top `Ingredient` when you render it in the `BurgerStack` component.
___
## Licensing
1. All content is licensed under a CC-BY-NC-SA 4.0 license.
2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
79 changes: 79 additions & 0 deletions README.old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Burger Stacker

You will be writing an app that simulates the stacking of a burger. You are provided an array of ingredients and you need to make an app the displays all the ingredients on the left side and has an area on the right where the ingredients can be stacked to make a burger.

Here is a rough wireframe of the general layout:

![](https://i.imgur.com/beMtwGj.png)

___
## User Stories

* As a user, I want to see all available burger ingredients listed on the left side.
* I want the ability to add any ingredient onto the burger stack using a button.
* I want to see each ingredient I select added to the top of the burger stack on the right side.
* I want the ability to clear the burger stack so I can start again.
* I want to be able to add as many ingredients of any type as I want (ingredients don't go away.)

___
## How To Get Started
0. Fork & clone this repository
1. Cd into this directory and run `npx create-react-app .` to make this directory into a react app.
2. Open in your code editor.
3. Clear out the generated code from the `App` component.
4. Draw a component diagram.
5. Write the static versions of your components.
6. Import and nest components so you have your start screen built for the app.
(See the **Starter Data** section below for a list of ingredients.)
8. Decide what the state should be.
9. Decide where the state should live.
10. Write the handler callbacks that you pass into children to update state.

### Sample Idea for Component Hierarchy:

```
App
|--IngredientList
| |--Ingredient(s)
|
|--BurgerPane
| |--BurgerStack
| | |--Ingredient(s)
| |
| |--ClearBurger
```

### Notes:

The order of items in the `stack` array will affect the order in which they appear on the page. Make sure you are adding ingredients to the `stack` in the correct way to make each ingredient stack on the previous one.

### Starter Data:

Here are some ingredients to get you started. Feel free to change them or add more. (This would be the value you set for `ingredients` when you initialize state):

```js
[
{name: 'Kaiser Bun', color: 'saddlebrown'},
{name: 'Sesame Bun', color: 'sandybrown'},
{name: 'Gluten Free Bun', color: 'peru'},
{name: 'Lettuce Wrap', color: 'olivedrab'},
{name: 'Beef Patty', color: '#3F250B'},
{name: 'Soy Patty', color: '#3F250B'},
{name: 'Black Bean Patty', color: '#3F250B'},
{name: 'Chicken Patty', color: 'burlywood'},
{name: 'Lettuce', color: 'lawngreen'},
{name: 'Tomato', color: 'tomato'},
{name: 'Bacon', color: 'maroon'},
{name: 'Onion', color: 'lightyellow'}
]
```
___
## BONUSES

* Each ingredient has an associated color. Use this to give each ingredient a nice background color reminiscent of what it looks like in real life.
* Add a form component (simply text input and button) to the ingredient side that lets a user add a new ingredient to the master list of ingredients in state.
* Add the ability to "undo" the last ingredient added (only the last one) by clicking a button that will remove that ingredient. Only that top ingredient should have the button for this showing up. When that ingredient is removed, the next one down should then get the button that allows it to be removed. **HINT**: You probably need to add this button to the top `Ingredient` when you render it in the `BurgerStack` component.
___
## Licensing
1. All content is licensed under a CC-BY-NC-SA 4.0 license.
2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].
Loading