Fork me on GitHub
Daniel Hines00:04:16

Looks like the issue is that Survey is only rendering once, and the new values never get passed to it. I need to somehow refresh it on each transaction,

Daniel Hines00:04:56

From the Dev Guide: >Refresh the subtree starting at the component that ran transact!. If it was the reconciler, run from root. If Suvey is calling transact, why isn't it's subquery built from Questions getting handed to it again?


@d4hines If you make the rendering mode :keyframe there should be no rendering issues.

Daniel Hines00:04:59

There aren't any (visible) rendering issues. I'm trying to send the data to the server, but I can't seem to do so.


Does your defmutation have a remote?

Daniel Hines00:04:15

Yes, just the default.

Daniel Hines00:04:54

Oh, wait, I'm mixing things up. The submit mutation is called by Survey, but the value changes are called by the children Questions. My guess is that i need pass the value changes as a computed call back, and run the transact them from the parent Survey.


I believe you could also pass the function that does the transact! into the child.


Using computed props yes.

Daniel Hines00:04:32

Yeah, that's what I'm trying right now. It's definitely re-rendering now! Sweet! Unfortunately, I've crossed a wire somewhere because all the values are, "p1__81540__81541__auto_"

Daniel Hines00:04:27

Turns out the above issue was I missing the the unquote.

Daniel Hines00:04:09

It's working now! Thanks @cjmurphy

simple_smile 4

I'm playing with new fulcro css (2.5.0-beta1). Css localization does not seem when selector references multiple classes (eg. :.menuitem.selected - only menuitem gets localized). Maybe the problem is that fulcro-css.css/localize-name looks only at prefix?


Hm…sounds like a bug. Might submit an issue. I though I had a test for that case.


Hello @tony.kay. I was playing with to make it work with shadow-cljs according to your suggestions. I have come up with the following:


If you take a look at the gist you will noticed that I reused some of the code used in fulcro.client.alpha.dom (which is now just fulcro.client.dom) so one can use kw for ids and css classes etc.


When I was doing that I was wondering if it would be possible to include a public API in fulcro providing factory apply doing what it’s doing in my gist so it doesn’t have to be repeated by anyone wrapping other react components with cljs wrappers?


I also noticed that prim/factory also generates factory fn which doesn’t work as dom factory functions from fulcro.client.dom. I think it would be useful to have at least prim/factory to return a function that would also support optional id/css kw and optional props arguments. We could even provide a way to have macros so some of the processing would be done during compile time (like with fulcro.client.dom). Was it considered/discussed? If yes, what was the decision and why?


The factory is already pretty complicated inside, most components need props from the query, and components rarely need CSS from the parent…and you can always make your own wrapper if it comes up for you a lot.


semantic UI react wrappers are an outlier, not the norm


and even then, you don’t really put CSS on them..they are the css wrappers


OK, I got it - thanks @tony.kay


Hi, I’m just diving into the CSS support. as I understand it, I need to have parent components css-include their immediate children in order for the upsert to work? How does this work with routers? My current structure is Root -> MyRouter -> Page[x], and I don’t see where I can declare css-includes on the router. I’ve tried having Root’s :css-includes refer to the pages directly and that doesn’t seem ot work either


@eoliphant The composition of CSS is for your convenience…you can upsert CSS from any component, and it will bring whatever is included.


so you only compose in things that have css…and for a router you’d just list all of the children that have css


in other words, you don’t have to have include on every component…you can skip as many as you want…(which is true for components without queries as well, for composing queries)…you skip composing the ones “in the middle” as if they aren’t there…because to the CSS (or query) system, they aren’t


ok gotcha that makes sense