fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Pragyan Tripathi 2020-10-12T04:57:17.260900Z

I am trying to use fulcro. For generating CSS classes I use fulcro-garden-css. I wish to create a component which generates CSS based on the props I get following when I try to do that:

Warning :undeclared-var in com/vadelabs/foundation/components/layout.cljc at 48:40
Use of undeclared Var com.vadelabs.foundation.components.layout/props
  45 | 
  46 | (defsc Grid
  47 |   [this props]
  48 |   {:css [[:.red (utils/use-style-props props grid-style-props)]]}
  49 |   (let [children      (comp/children this)
  50 |         other-props   props
  51 |         style-props   (utils/use-style-props other-props grid-style-props)
  52 |         {:keys [red]} (css/get-classnames Grid)]
Any way to resolve this?

tony.kay 2020-10-12T05:07:44.261300Z

Props is not available there

đź‘Ť 1
tony.kay 2020-10-12T05:08:30.262500Z

Css resolution based on props at runtime would be horribly slow

Pragyan Tripathi 2020-10-12T05:18:26.262600Z

I was trying to use stylefy but I get following warning:

Getting Invalid DOM property `class`. Did you mean `className`?
as per the author of stylefy only works with reagent. I am not sure how performant it could be. stylefy uses some sort of caching. I will try to figure something out…

Helins 2020-10-12T09:46:06.263600Z

Does anyone also have a hard time working with contentEditable = true?

Helins 2020-10-13T09:00:07.273100Z

@rob703 In short, for instance, handling changes is somewhat messy and setting the value of the editable element resets the cursor. I was asking because I don't know how much of this misbehavior is due to Fulcro, React, or just is inherent to editing elements.

fjolne 2020-10-13T09:06:03.276300Z

@adam678 you might try synchronous transactions (comp/transact!!), they were introduced for related cursor-misbehaving issues

đź‘Ť 1
Helins 2020-10-13T09:34:47.276500Z

@fjolne.yngling Great, thanks!

xceno 2020-10-12T10:21:30.263900Z

Didn't try it yet, but i wanted to today. What's the problem?

fjolne 2020-10-12T13:42:52.264800Z

draft-js makes it somewhat bearable

fjolne 2020-10-12T13:45:35.266700Z

hey, I'm having a weird UNSUPPORTED VALUE for all values in Transactions & Network tabs; DB values are good; using Fulcro Inspect's latest Chrome plugin (3.0.1, released 8 days ago), Fulcro 3.4.3, no custom transit encoders set up

exit2 2020-10-12T16:42:56.267100Z

There was an issue with the inspect in Chrome. I had to download it manually and install it

fjolne 2020-10-12T17:46:10.267300Z

yes, I did that, latest release from Github

fjolne 2020-10-12T17:53:08.267500Z

okay, so I checked that previous version (3.0.0) works fine

2020-10-12T18:27:49.268100Z

If I dont know fulcro, is it crazy to start with RAD?

JAtkins 2020-10-12T18:31:11.269Z

Nope, and as far as I know Tony is actually recommending it for all new projects since it's more or less finalized in the major points (correct me if I'm wrong).

Adrian Smith 2020-10-13T09:04:00.274200Z

There's a few bits explicitly not handled: http://book.fulcrologic.com/RAD.html#_authorization_middleware I guess there people are falling back to normal Fulcro solutions, seems like quite a hard problem generally

JAtkins 2020-10-13T17:02:40.283700Z

I've actually started more or less using RAD form-save events for everything and I stuck some auth middle ware in there. It's working alright

tony.kay 2020-10-12T19:58:46.269200Z

hm…seems to be a regression. I just noticed that as well.

tony.kay 2020-10-12T19:59:30.269800Z

right, but it does not eliminate the need to know Fulcro…it’s just good to have some bits of it as a nice starting point

đź‘Ť 1
2020-10-12T20:05:45.270500Z

digging into the fulcro rad book first and then will probably read relevant sections of the full book as they come up

tony.kay 2020-10-12T20:09:08.271700Z

so, let me clarify: I recommend including RAD as dependency. You will have to know Fulcro first in order to really be able to do much in terms of building a real app, since you still have to make a container app for any RAD element….but the RAD demo gives you a decent starting point layout for the project.

tony.kay 2020-10-12T21:03:27.272200Z

fixes chrome inspect regression on network+txn tabs

❤️ 5
tony.kay 2020-10-12T21:04:17.272600Z

see release notes on prior versions of chrome zipfile for how to install