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

PR: Create Todo List in Phoenix v1.5.3 #35

Merged
merged 141 commits into from
Jun 2, 2020
Merged

PR: Create Todo List in Phoenix v1.5.3 #35

merged 141 commits into from
Jun 2, 2020

Conversation

nelsonic
Copy link
Member

@nelsonic nelsonic commented Feb 24, 2020

[I think] somebody should have written a beginner friendly Phoenix Todo List Tutorial a long time ago ... a todo list is a gentle introduction to basic "CRUD" apps with a familiar UX. 💭
This PR is a Phoenix implementation of https://github.com/dwyl/javascript-todo-list-tutorial
Many people have found our Phoenix Chat Tutorial useful I expect the same here. 🚀

My reasoning for investing so much time into building a Phoenix (Server Side Rendered) version of the TodoMVC from first principals is that it's an intro to how our App works! 📱

nelsonic and others added 29 commits June 5, 2017 22:32
@nelsonic
Copy link
Member Author

I have proof read the README.md and made a bunch of fixes! 📝
Hopefully it makes it easier/faster to review. 🙌

@nelsonic
Copy link
Member Author

52 pages ... 💭
52-pages
It's almost like we're writing a book here ...! 📘 😉

@nelsonic nelsonic temporarily deployed to phxtodo May 30, 2020 09:12 Inactive
@nelsonic
Copy link
Member Author

Test coverage increased in next PR: #39 (comment)
Codecov was not reporting the Coverage correctly ... see: codecov/codecov-bash#309


# returns integer value of items where item.status == 0 (not "done")
def remaining_items(items) do
Enum.filter(items, fn i -> i.status < 1 end) |> Enum.count()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the Enum.filter here as we can use the anonymous function directly in count:

Suggested change
Enum.filter(items, fn i -> i.status < 1 end) |> Enum.count()
Enum.count(items, fn i -> i.status < 1 end)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonLab this is a good improvement/simplification provided we explain that Enum.count/2 can take a "filter" function as it's second param. Otherwise I would leave it as is and let a member of the community suggest the refactor. 👍

Copy link
Member

@SimonLab SimonLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@SimonLab SimonLab merged commit 3449bd1 into master Jun 2, 2020
@SimonLab SimonLab deleted the phoenix-v1.4.10 branch June 2, 2020 18:01
@nelsonic
Copy link
Member Author

nelsonic commented Jun 2, 2020

Thanks @SimonLab 🙌

HotategaiDev added a commit to HotategaiDev/phoenix-todo-list-tutorial- that referenced this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants