- Choose beautifier/prettier/linter
- miniature issues: miniature time 10:10:10 Learning points (end of last week)
- BEM
- ES6 code
- reduce, map, filter
- spread
- HTML and CSS classes decided together
- Presentation - give it more time and more practice
- user stories (further research)
- Great team work
- creating issues and closing them
- Initial brain storm
- Style guide
- final sprint - focussing on individual issues while consulting
Clone the repository :
git clone https://github.com/fac18/week2-ajnp-sbs-todolist.git
Install NPM :
npm install
Use NPM to install TAPE on your computer and work through the test file: npm i -D tape
and npm i -D tap-spec
Then, to run the test :
npm test
- To learn how to do test driven development
- Improve knowledge of DOM manipulation
- Enter tasks I need to do into a web page : 1.1 add a new object in the list ✅
- View the tasks I have added in the list ✅
- Mark tasks as complete ✅
- Delete an object from the list ✅
- The to-dos to be large enough ✅
Stretch goals:
- Sort button that sorts the completed from the remaining to do ✅
- Click on any part of a to-do to mark it as complete so that it's easier for me to check to-dos off ✅
- Edit the todos
- A visual indication of which to-do I'm about to interact with so that it's clear what I'm editing 1/2 ✅
Having worked together last week we decided to take some of the labour out of it by using the same css and layout.
As a change from last week, we decided to all work together to create this first mock. Before quickly moving on to understanding the tests.
We spent a good amount of time, trying to understand what exactly we had to test. Struggles:
- How do we access the functions we want to test?
- Why is the test returning as undefined
- How do we test for each part of the function?
- Why are we writing the solution instead of a test?
- I need more coffee.
We split the first two functions and coded them in pairs We decided to create hard coded variables (examples of oneTodo & and twoTodos) and then we started making progress. Our test were passing and so we moved on to creating the code
Once we'd written the tests, the writing of the code was comparitively easy. TDD made sure we deeply understood what the function was asking us to do before we'd started solving it. We learnt the hard way that the map function only works to copy shallow arrays (arrays, not an array of objects). https://medium.com/@gamshan001/javascript-deep-copy-for-array-and-object-97e3d4bc401a
Gillian is our resident DOM Queen.
Difficulties:
What we could've done better
- Reviewing it all together before starting
- Greater understanding
- We could likely have been more modular with our tests: for example testing the length of our todo array when adding or deleting a new object rather than just testing it against hard coded examples.
- We made a small mistake by moving on to the dom.js before the the test and our functions were completed - this meant that we started trying to code the functions into our dom.js...