Fork me on GitHub
#om
<
2017-04-20
>
sophiago01:04:40

To be clear, it's rendering fine despite the warnings. The css transform just isn't being applied. I'm mainly just trying to do a sanity check that I'm getting the Om part right before I ask CSS people if it could be an issue with styling form elements in particular.

anmonteiro01:04:59

@sophiago looking at it briefly you’re passing a CLJS map instead of a JS object to slider

anmonteiro01:04:04

missing a #js

sophiago01:04:35

around line 34?

sophiago01:04:32

i'm getting several warnings around there, so suspect that's the problem.

anmonteiro01:04:35

also the apply call looks fishy to me

anmonteiro01:04:59

actually you shouldn’t need #js there

anmonteiro01:04:07

since you’re passing it to an Om component

anmonteiro01:04:30

you’re just not using the style prop you’re passing in slider ever though

anmonteiro01:04:38

so it’s normal the CSS transform is not being applied

sophiago01:04:26

should i be calling slider as a function literal inside apply? and also setting :transform as a prop?

anmonteiro01:04:25

sorry I wasn’t clear on the apply stuff

sophiago01:04:41

is it not necessary?

anmonteiro01:04:43

I meant just:

(dom/div nil (slider ...))

sophiago01:04:30

also, to be clear...i'm unsure whether a matrix transform will even work on this element...that's why i hate CSS 😛

sophiago01:04:55

i'm getting a runtime error just using ui as if it's a function call on line 25. but i believe you told me a while ago that's essentially how to use the defui macro works under the hood?

anmonteiro02:04:18

@sophiago you still need to create a factory for it

anmonteiro02:04:31

and the factory is what you’re supposed to call

sophiago02:04:43

ok, thanks. i was originally using a factory but didn't realize i needed to use one in order to modify props like this

sophiago02:04:45

@anmonteiro does the edited snippet above look correct to you?

sophiago02:04:09

trying to get some feedback from the css people on freenode about transforming form elements, but

sophiago02:04:12

apparently css isn't the issue here: https://jsfiddle.net/entuland/pLet0yb1/

sophiago02:04:48

so now back to what i'm doing wrong with Om 😞

danielstockton08:04:51

@sophiago In om.next, isn't it just :key and not :react-key?

pedroteixeira18:04:37

hello! I was trying to find examples of combining om.next and datascript.. I see the use of a DataScriptStore implementing some protocols here https://github.com/swannodette/om-datascript/blob/master/src/om_datascript/core.cljs (2 years old) which seems "more complete" but the current wiki shows a different strategy: https://github.com/omcljs/om/wiki/DataScript-Integration-Tutorial (and I heard somwhere that set-query! would not work with datascript as state). Anyone care to comment if there is a current ref. best practice? Anyone used either implementation in production? trying to gather knowledge about past experiences

pedroteixeira18:04:44

I'm aware about some of the trade-offs.. to perhaps favour keeping Om.Next state simply as an atom of projected data.. Considering those trade-offs right now 🙂

matthavener19:04:35

@peeja: its possible to have multiple children of a component where some share idents.. not typically but certainly possible 🙂

peeja19:04:38

Yeah, I guess that's true.

gardnervickers19:04:34

@matthavener Yes we use that approach all over our app

matthavener19:04:11

and your keyfn is some combination of ident + other stuff?

gardnervickers19:04:57

I believe Om.next set’s a default one, we haven’t had any problems just not setting it.