Fork me on GitHub
#fulcro
<
2020-10-12
>
Pragyan Tripathi04:10:17

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.kay05:10:44

Props is not available there

👍 3
tony.kay05:10:30

Css resolution based on props at runtime would be horribly slow

Pragyan Tripathi05:10:26

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…

Adam Helins09:10:06

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

xceno10:10:30

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

fjolne13:10:52

draft-js makes it somewhat bearable

Adam Helins09:10:07

@U012ADU90SW 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.

fjolne09:10:03

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

👍 3
fjolne13:10:35

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

njj16:10:56

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

fjolne17:10:10

yes, I did that, latest release from Github

fjolne17:10:08

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

tony.kay19:10:46

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

ianjones18:10:49

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

JAtkins18:10:11

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 Smith09:10:00

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

JAtkins17:10:40

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.kay19:10:30

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

👍 3
ianjones20:10:45

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

tony.kay20:10:08

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.kay21:10:27

fixes chrome inspect regression on network+txn tabs

❤️ 15
tony.kay21:10:17

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