Fork me on GitHub
Timofey Sitnikov12:11:18

Good morning, I must be missing something, please help. The first set of statements print on the REPL, the second set, after the (swap! ... block do not, why? I thought that each block within (do should execute till the end?


env is not an atom. Swap is throwing


you want (:state env)

Timofey Sitnikov13:11:10

Ahhh, got it, thank you ...


Do the tabular RAD reports have a mechanism for performing an action on row click (without adding controls) or is that just handled by defining your own row UI with an :onClick function? I want to to have the tabular report show a graph in a separate div when a row is clicked. A component with a router would be one way, but I'm wondering if RAD has something for it that I'm missing in ro.

Jakub Holý (HolyJak)15:11:03

I don't rhino there is anything like that but might be wrong

👍 1

no. The default state machine uses row clicks to select (highlight) the row, and there is currently no additional hook


but it seems a reasonable thing to have a hook for. I'm in the code of RAD right now. I'll add a task marker to add such a hook


well, actually, there is already something that would work


Please enlighten me 🙂


ro/link or ro/links


the former is deprecated, but the latter will turn a column into a custom link


that doesn't interfere with the entire row...I'll still add one for clicking on the row itself


Yeah, I was wondering about that one. So the function part is self explanatory, but what would the key be? If I wanted it to apply to the whole row, just use the same fn on all the column names?


right...whole row is what isn't supported (yet)


Gotcha. That's good enough for my current needs, but it does seem like hook support for the entire row would be helpful. Thank you!


Also, using ro/links wraps the column text in an a tag, which may not be desirable. It makes sense for a single-column action but as a workaround for the per-row action the wrapping is not desirable. I'm sure you're aware of this but wanted to point it out while we're talking about the options.


you can always use a column formatter to do exactly what you want for a column


I just pushed a rad-1.1 branch on RAD and SUI plugin. If you use deps, you can try latest commits on those branches to get the on-row-select

👀 1

I'm doing a bit of refactoring, so I'd be interested to know if anything breaks. Mainly I made an optimized wrapper for form fields, which if I screwed something up might break subtle things, like validation messageson fields or something. See with-field-context


and I also exposed more helpers for when you want to take control of rendering a form


I'm not making use of any forms so far, just doing some scraping and building reports from the data. Afraid I won't be of much help to test forms at the moment.


no worries. I'll get to testing it. Just wanted you to try your report link and see if that does it for you


Any breakage will be trivial to fix


Pulling 952278690222ed38d09eb15b28f13f09726d04ce.


you needs both libs


rad sui and rad


the option is defined in RAD and implemented in the UI plugin


Got it. I'll try it out and let you know if it does the thing.


Yep, looks like exactly what I was asking about. I don't understand how you get that implemented so quickly but I sure am grateful for it.


😄 You just happened to hit me while I was about to do a commit related to forms in both those libs.


How would I use render props with a react component in Fulcro. I want to use with the open prop.

Jakub Holý (HolyJak)22:11:38

You mean use their React component in a Fulcro component and have it render another Fulcro component?

Jakub Holý (HolyJak)23:11:21

See comp/with-parent-context In - could that help?


You can also use the hooks ns with things like use-component to create raw functions that act as components, then use low-level react factory. on that function. At that point it is pretty much 100% a React js component.


Has anyone else been able to get the cljs repl working with emacs for I keep getting

error in process filter: user-error: The shadow-cljs ClojureScript REPL is not available.  Please check  for details
and I'm not sure how to debug it. Please let me know if #shadow-cljs is a more appropriate place to ask this.

Jakub Holý (HolyJak)22:11:41

Do other editors work? And yes, I would ask in #shadow-cljs or/and #cider


I don't have any other editors set up to work with Clojure, so I haven't tried. I'll check the other channels.

Jakub Holý (HolyJak)11:11:30

Have you got it fixed?


Nope, no progress. In #cider, bozhidar said it looks like it's not finding the shadow-cljs library. I'm not sure why though.


I figured it out. It turns out I was connecting to a clj repl insterad of a cljs one. I thought I was supposed to connect to a clj one and it would start a cljs repl, but I was wrong.

🎉 1
Jakub Holý (HolyJak)22:11:58

Glad to hear you figured it out!