ElixirMostWanted / elixirmostwanted.com

58 stars 8 forks source link

Implement new Wanted form with LiveView #7

Closed bcardarella closed 3 months ago

bcardarella commented 3 months ago

Depends on #3 and #4

A "New" button should be on the home page.

If you are unauthenticated it will prompt you to authenticate with GH. The /new route should be cached so that after auth is complete it will route you there automatically

On /new The follow form fields:

When before db insert the slug_id should be populated with:

name
|> String.downcase()
|> String.replace(~r/\s+/, "-")

If the name is "diff patch library" the slug will be "diff-patch-library"

If another lib with the same slug_id exists then find the last one and increment by 1 so in this case it would become diff-patch-library-1 the next time diff-patch-library-2 and so on

Route to /diff-patch-library after creation.

The wanted.user_id should be the id of the user that created the record

greven commented 3 months ago

I'm working on this, but if anyone else is, I'm fine for giving it to someone else. :)

bcardarella commented 3 months ago

@greven until we hit 100 commits we're only accepting 1 commit per user to encourage wider participation :)

greven commented 3 months ago

Ah I didn't know that. That's a good idea! I'll bow out then! :)