elm-community / html-extra

Additional functions for working with Html.
http://package.elm-lang.org/packages/elm-community/html-extra/latest
MIT License
31 stars 14 forks source link

Add Html.Attributes.Extra.empty #22

Closed Janiczek closed 4 years ago

Janiczek commented 4 years ago

Would noOp be a better name? nothing? (That one would probably clash with Html.Extra.nothing if people imported using (..) ...)

Here's the side effects Ellie: https://ellie-app.com/8g8HyJvGPS4a1

prikhi commented 4 years ago

Thanks!

Not too sure about the naming. I usually namespace the Html.Extra values while directly exposing Html.Attributes.Extra functions. It feels weird/inconsistent to have one be nothing and the other be empty. Maybe change Html.Extra.nothing to empty and this to emptyAttribute? :man_shrugging: I'm going to solicit Slack for opinions.

Otherwise, everything looks good!

prikhi commented 4 years ago

And maybe we want to include attributeIf/attributeMaybe functions like the viewXYZ functions in Html.Extra?

Janiczek commented 4 years ago

@prikhi I agree wtih attributeIf and attributeMaybe! Will you ping me here when you get some feedback re empty/nothing/noOp/... from Elm Slack and make a decision? Thanks :slightly_smiling_face:

prikhi commented 4 years ago

@Janiczek I think empty is fine. Do you want to add the function versions to this PR?

Janiczek commented 4 years ago

@prikhi Here you are! :)

prikhi commented 4 years ago

Thanks! New version on the way.