bitcrowd / bitstyles_phoenix

A collection of Elixir phoenix helpers for bitstyles
ISC License
12 stars 0 forks source link

Doctest forms & introduce label_opts #30

Closed andreasknoepfle closed 3 years ago

andreasknoepfle commented 3 years ago

We haven't tested the form helpers so far, since we haven't found a nice way yet.

This add doctests for all the form helpers and makes them return proper safe-buffers instead of safe-buffer arrays (which works, but is a bit ugly to test & reason about)

Also this fixes a weirdness on the way, that we were always forwarding all opts to the labels as well (including maxlength and so on), so instead we now have an extra option label_opts.

Also this restuctures the docs for the form helpers so they are readable.

Below a screenshot from the mix docs (you can check yourself with mix docs.

Screenshot 2021-05-28 at 14 42 05