i believe it's meant to be the pro paid version of guardrails
similar to how intelliJ has a free lite version and a pro paid version
You code in Guardrails. Copilot uses the same guardrails info to then do code analysis while you’re editing (instead of needing you to run the code)
So, copilot is an add-on tool with IntelliJ integration that is sorta like clj-kondo, but understands the data better, so it can find more interesting errors.
sanity checking what appears to be a pretty weird bug, in the following example which is run in my :client-did-mount
cb, the load!
call won’t run until the transact!
call finishes and returns to the client, correct?
(fn [mounted-app]
(comp/transact!
mounted-app
`[(current-user/create-user-session ~{:user/id 123})])
(df/load!
mounted-app
[:user/id 123]
User
{:target [:current-user]}))
transact!! is special and only refreshes the this
component I believe. Cannot you use transact!
?
start from the RAD template and delete all the RAD stuff. Inline the code that creates app
from RAD. That is likely to work.
I believe the action
of the mutation is executed before the load! but if there is a remote part to the mutation, that is triggered but not waited for.
Hey guys, a question regarding globally handling stuff we send to, or ask for, from the backend:
Is there a way to always elide certain keywords in loads and mutations, like what we get when using :without
in a load!
? So we don't have to remove common things explicitly.
There is an existing method in fulcro of adding a :ui/
prefix to keys, which maybe could be allowed to be extended? Preferably allowing both keywords and predicate functions
Thanks, will check those out 👍
FYI I have now published https://github.com/fulcro-community/guides/blob/main/minimalist-fulcro-tutorial/index.adoc - but your comments and suggestions are still very welcome! I have also updated https://github.com/fulcro-community/guides/blob/main/learning-fulcro.adoc to include it though I am not sure where exactly it should go. Now it is essentially as the first learning step, which is OK because it is intended as such - but the problem is that it focuses only on "how" and does not explain why Fulcro is the way it is. I feel that the reader should be exposed to the rationale for Fulcro early but I am not sure where to point her/him. https://fulcro.fulcrologic.com/ is too high-level, https://book.fulcrologic.com/#_fulcro_from_10000_feet in a way gets in too much detail and includes some of the same things as in the Tutorial. Any suggestions?
Thanks, I have started reading it. Looks good so far. Small spelling mistake in last sentence of Prerequisities: 'vlue proposition' should be 'value proposition' I can file issue/pr if you prefer.
thanks, tkovis already fixed it
@holyjak Thanks very much for the minimalist tutorial! I'm studying in details.
I especially appreciate the section on Prerequisites, which is really I need.
I'm studying "Key concepts and elements" now. It seems that the following might have a typo
App
A reference to the current Fulcro application,
containing configuration, the client DB, etc.
Produced by app/fulcro-app and used when calling transact! or load! when a component's this
is not available.
Referred to as app in code samples.
Maybe,
this
should be data ?
@holyjak For Client DB The client-side cache of data. It is a map of maps: entity name (e.g. `:person/id`) → entity id value (e.g. `123`) → properties of the entity (e.g. `{:person/id 123, :person/fname "Jo", :person/address [:address/id 3]}`). (For convenience, we use the name of the id property as the "name" of the entity - thus `:person/id`, `:user/username`.) I feel the above still somehow convoluted. I haven't figured out. I wonder if if would be better to separate the description of the abstract structure, then follow with a concrete data samples of a client DB? If the client DB is a map, what are the keys of this map (the highest level)? The entity, such as person, car, etc.? As values of the highest map, themselves maps, what are the maps (keys, values)? For entity person, the map of keys of id, name, age, cars, etc.?
@yubrshen You are welcome 🙂 1) What typo? What do you mean by "`this` should be data"? It refers to the first argument of defsc, it is traditionally called this
.
2) Thanks, I will think about simplifying.
> If the client DB is a map, what are the keys of this map (the highest level)? The entity, such as person, car, etc.?
As the text says: "entity name (e.g. `:person/id`)"
> As values of the highest map, themselves maps, what are the maps (keys, values)?
they are maps from "entity id value (e.g. `123`) → properties of the entity"
> For entity person, the map of keys of id, name, age, cars, etc.?
Yes. Or, in my example, :person/id, :person/fname, :person/address
@holyjak Thanks! I forgot the special this
@holyjak With English no as my native language, I feel the following for the description of Client DB is clearer to me:
The client-side cache of data. It is
a map of maps:
entity name → entity id value → properties of the entity
For convenience, we
use the name (keyword) of the id property
as the "name" of the entity
thus :person/id for the entity Person
For example,
:person/id -> {:person/id 123, :person/fname "Jo", :person/address [:address/id 3]}
It is fed by initial data and loading data from the backend and can be changed by mutations.
It's just a refactoring, to make it less "complex".Thank you! Applied 🙂
yes, provide your own replacement for default default-global-eql-transform
https://github.com/fulcrologic/fulcro/blob/develop/src/main/com/fulcrologic/fulcro/application.cljc#L157
see how RAD does that to exclude f.ex. default-network-blacklist
https://github.com/fulcrologic/fulcro-rad/blob/develop/src/main/com/fulcrologic/rad/application.cljc#L23
Hey. thanks for this. very succinct
I myself really like how rust made touched on rationale in it's foreword https://doc.rust-lang.org/book/foreword.html and introduction https://doc.rust-lang.org/book/ch00-00-introduction.html#who-rust-is-for I really think you should start with why
The first time Fulcro clicked for me was in the interview with Jacek Schae, specifically because Tony spoke about the original impetus and then the idioms and foundational concepts. I’m afraid I don’t have much in the way of concrete suggestions, but maybe those interviews would help. https://podcasts.apple.com/us/podcast/clojurescript-podcast/id1461500416?i=1000479361034