Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
161a228
Trello Board set up
TraiLynne Dec 31, 2018
481027c
Initial React App Creation
TraiLynne Dec 31, 2018
ff9ee21
Added dependencies
TraiLynne Dec 31, 2018
4d7be2a
Set up file structure
TraiLynne Dec 31, 2018
5ad9348
index.js Initial Set Up
TraiLynne Dec 31, 2018
dd5458a
Added custom boilerplate and comments
TraiLynne Dec 31, 2018
a3f2529
Static NotesView created
TraiLynne Dec 31, 2018
e67c4ce
Static Notes Functional Component Created
TraiLynne Dec 31, 2018
c754ac9
Defined logic for Read All notes
TraiLynne Dec 31, 2018
8d79d21
Refactored NotesView to Be dynamic
TraiLynne Dec 31, 2018
21e91ef
Refactored Notes to Be dynamic
TraiLynne Dec 31, 2018
8c1a531
Added Loading and Error message to NoteView
TraiLynne Dec 31, 2018
8ea5b92
Static NoteView created
TraiLynne Dec 31, 2018
1598411
Static Note Functional Component Created
TraiLynne Dec 31, 2018
7a33866
Defined logic for Read One note
TraiLynne Dec 31, 2018
dd11efe
Refactored NoteView to be dynamic
TraiLynne Dec 31, 2018
820ea2b
Refactored Note to Be dynamic
TraiLynne Dec 31, 2018
1407c00
Added Loading and Error message to NoteView
TraiLynne Dec 31, 2018
164e4b3
Created Link and Route for Note Form
TraiLynne Jan 2, 2019
707ce22
Static NoteFormView created
TraiLynne Jan 2, 2019
79733a2
Static NoteForm Component Created
TraiLynne Jan 2, 2019
d5d287f
Defined Form Functionality
TraiLynne Jan 2, 2019
0e64bc2
Defined Logic for Creating Note
TraiLynne Jan 2, 2019
33b9938
Refactored NoteFormView to be Dynamic
TraiLynne Jan 2, 2019
e38cbf0
Defined logic for creating note
TraiLynne Jan 2, 2019
acbc938
Defined Logic for Updating Notes
TraiLynne Jan 2, 2019
a28abd3
Defined functionality for deleting notes
TraiLynne Jan 2, 2019
1d16fc4
cleaning up the code
TraiLynne Jan 2, 2019
3b46d1d
Defined redux logic for deleting note
TraiLynne Jan 3, 2019
a4b741c
Cleaning Up code
TraiLynne Jan 3, 2019
8f1f56a
Cleaning Up code
TraiLynne Jan 3, 2019
9007a78
Cleaning Up code
TraiLynne Jan 3, 2019
6fd909e
Added dependency
TraiLynne Jan 3, 2019
9296a81
Defined Styles for Nav and App Container
TraiLynne Jan 4, 2019
d661a86
Defined Styles for Notes
TraiLynne Jan 4, 2019
70b9f65
Defined style for individual note
TraiLynne Jan 4, 2019
eeebedc
Defined style for Form
TraiLynne Jan 4, 2019
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
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ The main objective of this week is to develop the MVP feature set listed below u

## Trello Set Up:

- [ ] Create a Trello account
- [ ] Create a new board called "Lambda Notes - {Your Name}"
- [ ] Create lists titled `backlog`,`To Do`, `In Progress`, and `Done`
- [ ] Fill in the `To Do` list with the MVP features listed below
- [ ] Fill in the `backlog` list with all the extra features listed below
- [ ] Share your board with the project manager that has been assigned to you. If you have not been assigned yet, reach out to your lead PM for guidance
- [ ] Add your Trello URL to your project's README.md file. Commit the change, push it to your repository & submit a pull request
- [x] Create a Trello account
- [x] Create a new board called "Lambda Notes - {Your Name}"
- [x] Create lists titled `backlog`,`To Do`, `In Progress`, and `Done`
- [x] Fill in the `To Do` list with the MVP features listed below
- [x] Fill in the `backlog` list with all the extra features listed below
- [x] Share your board with the project manager that has been assigned to you. If you have not been assigned yet, reach out to your lead PM for guidance
- [x] Add your Trello URL to your project's README.md file. Commit the change, push it to your repository & submit a pull request
- Link: https://trello.com/b/usXwjcAn

## MVP Features:

- [ ] Display a list of notes
- [ ] Create a note with a title and content
- [ ] View an existing note
- [ ] Edit an existing note
- [ ] Delete an existing note
- [ ] Wire up your static React App to our Notes API.
- [x] Display a list of notes
- [x] Create a note with a title and content
- [x] View an existing note
- [x] Edit an existing note
- [x] Delete an existing note
- [x] Wire up your static React App to our Notes API.
- We want to work with some data that will be persistent across a server. [We have built a Notes API](/NOTES.md) for you. You'll find information about this server in the NOTES.md file.

Upon your first commit, please submit a Pull Request and add _both_ the **Trello Set Up** and **MVP Features** Task lists to your first Pull Request comment:
Expand Down Expand Up @@ -62,7 +63,7 @@ Once your MVP has been approved, you have been given a feature list that the cli

## Extra Features:

- [ ] Re-factor your code to include redux for your state-management
- [x] Re-factor your code to include redux for your state-management
- [ ] Search functionality
- [ ] Markdown support in notes
- [ ] Sorting options in the list view
Expand Down
23 changes: 23 additions & 0 deletions notes/.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*
68 changes: 68 additions & 0 deletions notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br>
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.<br>
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.<br>
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.<br>
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

### Analyzing the Bundle Size

This section has moved here: 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

### Advanced Configuration

This section has moved here: 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

### `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
37 changes: 37 additions & 0 deletions notes/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "notes",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"bootstrap": "^4.2.1",
"jquery": "^3.3.1",
"popper.js": "^1.14.6",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-redux": "^6.0.0",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "^2.1.2",
"reactstrap": "^7.0.2",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"styled-components": "^4.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
Binary file added notes/public/favicon.ico
Binary file not shown.
43 changes: 43 additions & 0 deletions notes/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous">
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
15 changes: 15 additions & 0 deletions notes/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
33 changes: 33 additions & 0 deletions notes/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.App {
text-align: center;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 40vmin;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}


@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
101 changes: 101 additions & 0 deletions notes/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// *** === Imports === *** //
// React
import React, {
Component,
Fragment
} from 'react';

// React Router
import {
Link,
Route
} from 'react-router-dom';

// Views
import NoteFormView from './views/NoteFormView';
import NotesView from './views/NotesView';
import NoteView from './views/NoteView';

// Styles
import './App.css';
import {
AppContainer,
Header,
NavBar,
Logo,
NavText,
ViewContainer
} from './styles'

// *** === Class Component === *** //
class App extends Component {

// ** == Render to DOM
render() {
return (
<>
<Header>
<NavBar>
<Logo>Notes</Logo>

<Link to='/'>
<NavText>
<i class="far fa-eye"></i>
View Notes
</NavText>
</Link>

<Link to='/create-note'>
<NavText>
<i class="fas fa-pencil-alt"></i>
Add Note
</NavText>
</Link>
</NavBar>
</Header>


<AppContainer>
<ViewContainer>

{/* C - Create */}
<Route
exact
path='/create-note'
component={
NoteFormView
}
/>

{/* Ra - Read All */}
<Route
exact
path='/'
component={
NotesView
}
/>

{/* R1 - Read One */}
<Route
exact
path = '/note/:noteId'
component = {
NoteView
}
/>

{/* U - Update */}
<Route
update
path='/note/:noteId/update'
render={props => <NoteFormView {...props} update/>}
/>
</ViewContainer>
</AppContainer>
</>
);
}
}

export default App;
9 changes: 9 additions & 0 deletions notes/src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
ReactDOM.unmountComponentAtNode(div);
});
Loading