-
Notifications
You must be signed in to change notification settings - Fork 46
Solution: Ricard Garcia & Victor Hugo Gomez #6
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
Open
labietelabiete
wants to merge
67
commits into
assembler-institute:main
Choose a base branch
from
labietelabiete:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
045a029
.eslintrc modified
labietelabiete 2c01772
Commit Ricard
Ricard-Garcia f4d7ebe
Added missing dependencies (formik, yup, uuid)
Ricard-Garcia e60870e
Added notes
Ricard-Garcia 42c563f
Added classnames dependency
Ricard-Garcia 6b71733
Added styling folders
Ricard-Garcia 0a360d1
Updated notes
Ricard-Garcia c6263c1
First cleaning code
labietelabiete 9964a23
Structure done
labietelabiete b725580
66ae180
Added default todos
Ricard-Garcia 15580ac
Updated notes
Ricard-Garcia 6e769b1
Added initial styles
Ricard-Garcia ca24fc3
Added box shadow
Ricard-Garcia b2d74d1
Declared todos in App props
Ricard-Garcia 6c3bf79
Form by html5
labietelabiete 91e2d67
Added todo component
Ricard-Garcia 1f892a9
Merge branch 'main' into develop
Ricard-Garcia 8576962
Styled initially Todo comp
Ricard-Garcia 81d3983
Added set state for done/not-done todos
Ricard-Garcia 021a660
Removed onClick but kept onChange
Ricard-Garcia 77522a3
AddTodo functionality done
labietelabiete 2dd7ac3
Added set state for deleted todo
Ricard-Garcia 249c26a
Input style
labietelabiete b256dca
Solved Todo component checkbox
Ricard-Garcia f0ef9e9
Merge branch 'F01-Create-Todo-Comp' into develop
Ricard-Garcia 2dd4d27
Solved console.log problem
Ricard-Garcia e4f7473
Merge branch 'F02-Todo-Comp' into develop
Ricard-Garcia 564a306
Unified styling
Ricard-Garcia 97b3d9d
Changed Todo component to class
Ricard-Garcia 0e2a6be
CreateToDo styles done
labietelabiete b0ef95e
Added forms to Todo component
Ricard-Garcia e00184b
Added disable input funcionality
Ricard-Garcia 1c99b8b
Added disabled conditional class
Ricard-Garcia 99aed33
Solved placeholder problem
Ricard-Garcia 60ad6c9
Added new colors to disabled texts
Ricard-Garcia 452ec08
Added empty todos illustration
Ricard-Garcia 3e9c19d
Fixed console.log() problems
Ricard-Garcia 841854a
MainFooter functionality done
labietelabiete 6f6d667
Merge branch 'F02-Todo-Comp' into develop
Ricard-Garcia e07c49a
Added styling to main top part
Ricard-Garcia c209d25
Added lightMode property to App state
Ricard-Garcia 80d1272
Solved checkboxes' border problem
Ricard-Garcia 5c12749
Added min & max height to todo-list-section
Ricard-Garcia 40f62ac
Solved initially list-wrapper scroll
Ricard-Garcia afdd86d
Added image & icon switch between mode
Ricard-Garcia 828eb3e
Added dark mode swtich to Todo, TodoList & App
Ricard-Garcia 56067aa
Added gradient to top background
Ricard-Garcia 8b27ade
Footer styles
labietelabiete 4d45efb
Merge branch 'F05-Light-Dark-Mode' into develop
Ricard-Garcia c60d1a8
Styled active class in navlinks
Ricard-Garcia 6b17b5e
Solved width in small devices
Ricard-Garcia 271959b
Added setLocalStorage function
Ricard-Garcia b750e31
Clear Completed done
labietelabiete f152878
Solved styling problems in main section
Ricard-Garcia fe5051e
Solved empty todo problem
Ricard-Garcia 26bb2cf
Removed box shadow in dark mode
Ricard-Garcia 003ed89
Added .blur() to createTodo and Todo forms
Ricard-Garcia 8ab7a43
Added side paddings to MainFooter component
Ricard-Garcia 00d0636
Merge branch 'F06-LocalStorage' into develop
labietelabiete 4d892db
All merges done
labietelabiete 5c220bc
Cleaning code
labietelabiete 4a55c76
a608480
8f5b8ab
9c17f4a
Merge branch 'main' of https://github.com/labietelabiete/reactjs-todo…
labietelabiete 90c96c2
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,125 @@ | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/react,node | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=react,node | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env*.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
### react ### | ||
.DS_* | ||
**/*.backup.* | ||
**/*.back.* | ||
|
||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/react,node | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=react,node | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env*.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
### react ### | ||
.DS_* | ||
**/*.backup.* | ||
**/*.back.* | ||
|
||
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
### First meeting | ||
|
||
## 1. Layout | ||
|
||
Using Bootstrap as much as possible | ||
|
||
## 2. Structure (components & pages) | ||
|
||
### App | ||
|
||
Defining base elements: | ||
|
||
- Title | ||
- Light/Dark mode | ||
- Create todo (component) | ||
- Todolist (component via `BrowserRouter`. Has `filter` property) | ||
|
||
· Route 1: Home | ||
|
||
· Route 2: Completed | ||
|
||
· Route 3: Active | ||
|
||
- Todo | ||
|
||
- NavBar (component & has `NavLinks` to filter) | ||
|
||
## 3. App.state | ||
|
||
- todos | ||
- isLoading | ||
- hasError | ||
|
||
``` | ||
this.state{ | ||
todos: []; | ||
isLoading: false; | ||
hasError: false; | ||
} | ||
``` | ||
|
||
- | ||
|
||
### 4. Methods & properties needed | ||
|
||
**Create todo** (component) | ||
|
||
Using a `formik` form with `yup` validation. | ||
|
||
- handleSubmit(): **create todo object** once submitted form. **Add a new object | ||
to state (todos)**. | ||
|
||
Local storage: | ||
|
||
``` | ||
componentDidUpdate() { | ||
const { cartItems, products } = this.state; | ||
|
||
localStorage.setItem( | ||
LOCAL_STORAGE_KEY, | ||
JSON.stringify({ cartItems, products }), | ||
); | ||
} | ||
|
||
``` | ||
|
||
**Todo** (component) | ||
|
||
Wrap all todo in a `<div>` to **hover** & show crossbar. | ||
|
||
- handleClick(): **checkbox** | ||
- handleRemove(): **crossbar** | ||
- handleEdit(): when user clicks on todo. | ||
|
||
- key: use `uuid` to create id. | ||
- done: `boolean` | ||
- text: `string` | ||
|
||
**Todo list** (component) | ||
|
||
**Navbar** (component) | ||
|
||
## TODO | ||
|
||
## DONE | ||
|
||
Installed `yup`& `formik` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muy interesante la organización! 👏🏻