Fork me on GitHub
#re-frame
<
2017-08-03
>
sandbags11:08:45

@pupeno question for you about FreeForm. When you toggle a checkbox the event is updated with the value, i.e. you can't distinguish between checking & unchecking. In general of course this shouldn't be a problem since there should be no way for the form and your "in db" model to get out of sync although in testing i've managed to do this a couple of times (possibly related to Chrome's reloading issues)

sandbags11:08:22

@pupeno the question is, is it intentional? Or would it be better for a checkbox to send .-checked instead of .-value?

Pablo Fernandez11:08:41

Interesting. Let me see.

sandbags11:08:31

(or gate sending .-value/`nil` based on .-checked perhaps)

Pablo Fernandez11:08:40

Ah... right... I haven't even worked on checkboxes yet.

sandbags11:08:12

at the moment i am just using the event as a trigger for update not which is fine but makes me uncomfortable

Pablo Fernandez11:08:19

I think the checkbox should generate it's current state and not the toggle.

sandbags11:08:28

as i say, i have managed in testing to get them out of sync

Pablo Fernandez11:08:37

That's in-sync with the rest of the functionality anyway.

Pablo Fernandez11:08:28

So, no, it's not intentional and I'd tend to agree with you (without looking too much into it).

sandbags11:08:31

probably a relatively simple patch to bind-input i could have a crack at it if you like, but happy to leave to you if you'd prefer

Pablo Fernandez11:08:22

I'm happy for you to work on it, give me a couple of hours to clean up free-from (it was in the middle of a refactor that should be abandoned).

Pablo Fernandez11:08:52

I will work a lot on Free form once I release my startup product, so, in the next couple of months, but not sure when.

sandbags11:08:55

okay, i'll get something working here first

sandbags11:08:00

@pupeno you might want to remove your .idea folder from the free-form repo

sandbags11:08:52

also the .iml file

Pablo Fernandez11:08:25

Is it bothering you in some way? The reason it's there is so that Cursive users will get code style, testing profiles, etc without having to do any work.

sandbags11:08:51

oh if it's deliberate that's fine (I use Cursive)

Pablo Fernandez11:08:18

It is deliberate but not battle tested. If it's annoying other people, not working, etc, then I'll remove it.

sandbags11:08:06

Hrmm... Error synchronising com.pupeno/free-form:0.6.0-SNAPSHOT: Could not find artifact tech.dashman:reagent-toolbox:jar:0.1.0-SNAPSHOT in clojars (https://clojars.org/repo/)

Pablo Fernandez11:08:22

Yes... that's the issue.

Pablo Fernandez11:08:34

I'm starving, but give me a sec to try to fix it.

sandbags11:08:44

Go, eat 🙂

sandbags11:08:46

This can wait

Pablo Fernandez11:08:02

I mean, do a git pull.

sandbags11:08:00

@pupeno looks good.. thx

sandbags11:08:35

oh you've already made the edit 🙂

Pablo Fernandez11:08:50

I think someone else did it, but it wasn't released.

Pablo Fernandez11:08:06

We should add the checkbox and radio buttons to the examples.

Pablo Fernandez11:08:26

I'll grab some food and look into this. It might be time for a release.

sandbags12:08:38

@pupeno checkbox functionality working here

sandbags12:08:50

it's a version jump so i'm not sure what else may have changed

sandbags12:08:57

but that bit seems good

Pablo Fernandez12:08:42

@sandbags I try to keep the changelog complete.

sandbags12:08:18

oh i didn't see one

Pablo Fernandez12:08:26

It's at the bottom of the readme.

Pablo Fernandez13:08:11

Ah... we do have checkbox and radio buttons in the example, I just never pushed it.

Pablo Fernandez13:08:17

I'm going to do a 0.6.0 release with that.

ag21:08:31

isn't it annoying that subscribe always expects a vector? why can't it wrap it in one automatically when there's a single key?