dwyl / learn-elm-architecture-in-javascript

:unicorn: Learn how to build web apps using the Elm Architecture in "vanilla" JavaScript (step-by-step TDD tutorial)!
https://todomvc-app.herokuapp.com
GNU General Public License v2.0
213 stars 19 forks source link

PR: Elm(ish) Todo List (TodoMVC) Example issue #44 #45

Closed nelsonic closed 6 years ago

nelsonic commented 6 years ago

This will be an end-to-end learning resource so might take me a few days ... ⏳ It will be worth it. 😉

codecov[bot] commented 6 years ago

Codecov Report

Merging #45 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #45    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files           1      4     +3     
  Lines          44    312   +268     
  Branches        0     89    +89     
======================================
+ Hits           44    312   +268
Impacted Files Coverage Δ
examples/todo-list/elmish.js 100% <100%> (ø)
examples/counter-reset-keyboard/counter.js 100% <100%> (ø)
examples/todo-list/todo-app.js 100% <100%> (ø)
examples/counter-reset/counter.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 814467e...ee9c95d. Read the comment docs.

nelsonic commented 6 years ago

Elmish Intro Header: elmlogo-ish

nelsonic commented 6 years ago

image

nelsonic commented 6 years ago

image

nelsonic commented 6 years ago

image

image

image

nelsonic commented 6 years ago

image

image

nelsonic commented 6 years ago

image image image

Once you achieve 100% coverage, there is no reason to "compromise" by going below this level.

nelsonic commented 6 years ago

todomvc-two-items-1-done

toggle-todo-list-item

todo-item-toggled

nelsonic commented 6 years ago

todomvc-3-items-1-done

nelsonic commented 6 years ago

@iteles this PR is not yet "ready" as I have not finished building the Todo App. (each time I sit down to work on this I get 1 or 2 "pomodoros" worth of time ... so it's taking forever!)

However this PR is already over 4.2k lines (roughly 13k words!) so it could use some "sense checking" ...

The Elmish "micro framework" writeup is "ready for review": https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/elmish-todo-list-issue%2344/elmish.md

If you have time, please take a look and leave feedback. (thanks in advance!)

nelsonic commented 6 years ago

image

render_main-tests-pass-100-coverage

nelsonic commented 6 years ago

Given that this tutorial "extension" is now more than twice the size of the original Elm Architecture tutorial, I'm considering splitting it off into it's own new repo ... https://github.com/nelsonic/todomvc-plain-javascript-elm-architecture-example It will make the code organisation a bit "cleaner" because everything will be in a "top level directory" e.g: /lib/app.js as opposed to: /examples/todo-list/todo-app.js

Thoughts ...?

nelsonic commented 6 years ago

Temporarily putting this "on hold" to focus on Startup School App: https://github.com/nelsonic/nelsonic.github.io/issues/511

nelsonic commented 6 years ago

The Startup School Application https://github.com/dwyl/home/blob/master/YCombinator-Startup-School-Application.md was accepted (mostly because they did not bother reading the applications and instead decided to "let everyone in"...) but it means I can get back to finishing this epic tutorial!

nelsonic commented 6 years ago

save-edit-test-fails

nelsonic commented 6 years ago

@iteles this tutorial is finally in a reviewable state. 🎉 It's by far the longest one we've ever written ... (longer than my masters thesis...!) 😮 I intend to "refactor it quite a bit and release it as a separate repo: https://github.com/nelsonic/todomvc-vanilla-javascript-elm-architecture-example ✅ which will then be transferred to @dwyl 📥

Please review and give feedback (and/or merge) when you can thanks! 😉

nelsonic commented 6 years ago

Deployed demo to Heroku: https://todomvc-app.herokuapp.com/examples/todo-list/ in case you aren't able to run the branch on your localhost.

nelsonic commented 6 years ago

Made a Gif as "intro image": elm-todo

nelsonic commented 6 years ago

@iteles I've been through and fixed as many typos and Mardown issues as I could see. 🔍 📝 ✅ Not going to touch this again until you've had a chance to review it. ✋ Thanks for making time. ❤️

nelsonic commented 6 years ago

@iteles agreed. merge and let everyone test it. thanks. 👍