Fork me on GitHub
#om
<
2016-08-18
>
Joe R. Smith01:08:18

why is it that after mutations the parser gets om.next/full-query?

ag02:08:20

how can I temporarily disable log messages like [om.next] transacted

ag02:08:02

nvmd… picked into the source. apparently setting goog.log.ENABLED = false does that

anmonteiro09:08:18

@ag: easier to pass :logger nil to the reconciler

anmonteiro09:08:39

For production builds set closure-defines goog.DEBUG false

anmonteiro10:08:47

@solussd: I still don’t understand the problem you’re having, it seems that everything should work

anmonteiro10:08:18

happy to look at a minimal case

anmonteiro10:08:16

mutations get passed the full query because of incremental rendering

anmonteiro10:08:26

if a component down the tree performs a transaction, Om Next doesn’t re-render from root. Instead, it only re-renders the subtree rooted at the component that called transact!

anmonteiro10:08:31

this is why full-query is needed

anmonteiro10:08:58

so that the component that transact!s gets the query focused at its subtree

Joe R. Smith14:08:06

@anmonteiro: Ok, that makes sense and explains some behavior I’m seeing.

Joe R. Smith14:08:51

At least some of my issues were caused by transacting against the reconciler directly instead of the root component for route updates.

anmonteiro14:08:01

@solussd: transacting against the reconciler is just fine but it also provides a finer-grained level of control

anmonteiro14:08:11

which means you need to deal with the consequences of that

Joe R. Smith14:08:14

what is an example of a consequence?

anmonteiro14:08:35

one of those being that you need to queue your root desired query for re-read because Om won’t queue any components by default when transacting against the reconciler

anmonteiro14:08:42

(since no components have performed the transaction)

Joe R. Smith14:08:38

I’m familiar with providing keys to reread in a transact! call, is queuing a query different?

anmonteiro14:08:00

@solussd same thing, just provide a query instead of a key

anmonteiro14:08:13

which leads us to another limitation of transacting against the reconciler

anmonteiro14:08:29

Om won’t transform-reads by default when you transact! against the reconciler

anmonteiro14:08:46

meaning that the keys you provide to re-read don’t get expanded into the query they reference

anmonteiro14:08:59

so you must provide the exact query you want to be re-read

Joe R. Smith14:08:15

interesting, thanks

Joe R. Smith14:08:20

it appears I’m trying to implement the functionality of compassus– … maybe I should be using it.

anmonteiro15:08:27

@solussd: happy to have more people using it

anmonteiro15:08:54

if you end up using it, make sure to report any stuff that makes you uncomfortable along the way

ag17:08:29

Hey guys, aside the official document https://github.com/omcljs/om/wiki/Applying-Property-Based-Testing-to-User-Interfaces what else would you recommend for e2e testing of om.next app?

ethangracer22:08:36

is there a way to convert an external library’s react component into an om component?

ethangracer22:08:19

dynamically, that is. i.e. (om/react-to-om reactComponent query ident etc...)

anmonteiro22:08:54

@ethangracer not currently, that I know of

anmonteiro22:08:07

however, it shouldn’t be hard to put something together

anmonteiro22:08:16

sounds like a cool mini-project

anmonteiro22:08:47

wanna point me towards an example React class that you’d like to see adapted?

ethangracer22:08:47

I’m thinking about integrating Recharts: http://recharts.org/

anmonteiro22:08:38

@ethangracer I don’t understand why you’d want to have a query in an otherwise 3rd party lib

anmonteiro22:08:06

not saying it shouldn’t be possible

ethangracer22:08:15

If I want to store props to pass to that component in app state

ethangracer22:08:20

then having a query would be handy

ethangracer22:08:30

otherwise I’d have to wrap it in another component just for the query

ethangracer22:08:38

which is important especially for charts

anmonteiro22:08:55

the tricky part is probably passing props

anmonteiro22:08:10

I can have a go at that tomorrow

anmonteiro22:08:24

not promising anything, but should be a fun couple of hours

ethangracer22:08:43

yeah no problem, I’d be curious to hear how it goes either way