fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
JAtkins 2020-12-04T00:04:32.057800Z

Can we go with a 9? I don't want a matching stroke, and I'm doing the same for autogenerated forms

tony.kay 2020-12-04T01:34:57.058Z

Thanks for the patches. published update book

tony.kay 2020-12-04T01:37:02.058200Z

This is a normal React pattern: callbacks, as @mroerni said. You don’t code a transaction for the parent’s data IN a child. That is a broken abstraction. You pass something like onClick or onDelete in computed props, and code the transact IN the parent.

tony.kay 2020-12-04T01:39:28.058600Z

A parent MUST know something about children (because it lays them out, and gets thier props), but a child should not be explicitly coupled to knowledge of the parent. Technically passing this does not break that abstraction, but as soon as you use it, I bet it does…because you’re going to do things like call mutations (parent-thing-delete) (which can imply the type of parent, or introduce a type dependency)

stuartrexking 2020-12-04T05:17:39.061400Z

There is a console error in the latest version of the RAD demo project.

ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:188] -  dr/target-ready! was called but there was no router waiting for the target listed:  [:com.fulcrologic.rad.report/id :com.example.ui.account-forms/AccountList] This could mean you sent one ident, and indicated ready on another.
To reproduce, clone the repo, run yarn, start shadow, start datomic, navigate to the accounts page and hard refresh. Navigating via the links is fine. It’s when you use the URL directly. http://localhost:3000/accounts?_rp_=WyJeICJd&

stuartrexking 2020-12-04T05:18:18.062Z

I know that this error doesn’t occur when using fulcro 3.4.1

stuartrexking 2020-12-04T05:19:43.062400Z

Something has changed between that version and the latest version being used in the demo project.

stuartrexking 2020-12-04T16:37:46.087Z

@tony.kay any idea on what this could be or a pointer on where I should look for a fix?

tony.kay 2020-12-04T16:39:32.087200Z

actually I noticed that as well…have not had time to debug it. It was probably a bug all along and some performance improvement or something made the timing different, and is causing the route to get tried before initialzation is done

tony.kay 2020-12-04T16:40:06.087400Z

The message clearly says it tried to say a route was ready, but the state machine had not yet started….so it’s just timing

tony.kay 2020-12-04T16:40:12.087600Z

fun with async startup 🙂

Jakub Holý 2020-12-04T07:40:08.062600Z

My pleasure

Jakub Holý 2020-12-04T08:57:31.065300Z

@tony.kay could you be so very kind and elaborate a bit on this > Setting up an alternate build for creating sections of your application in isolation can be a real productivity boost. > from 3.11.2. Workspaces? Does it mean "Setting up an alternate workspaces build so that you can develop sections of your application in isolation can be a real productivity boost."? Thank you!

tony.kay 2020-12-04T15:16:49.067800Z

I just released Fulcro 3.4.7 to clojars. I found a place where I forgot to apply the new performance optimization for Inspect that was causing extreme performance penalties when actions in mutations worked with large data sets. It did not affect release builds, but it could make dev mode intolerable (it was, in fact, the whole motivation behind the revamp of Inspect). Basically the old inspect used to calculate a db diff on every opt action, and the new inspect does not need that…but I forgot to delete the line of code that calculated it 🤦

👏 5
2020-12-07T03:54:00.150900Z

hmm, that's still happening, so I guess I have a different issue, it seems after each event in my uism's or rerender there is a clojure.data/diff call happening by fulcro.inspect that can take up to a couple seconds (I have around a 1000 entities in my state).

tony.kay 2020-12-07T05:45:32.155500Z

Hm maybe I missed another one. Caller from flame chart???

tony.kay 2020-12-07T05:47:38.155700Z

I don’t see anything in UISM…

tony.kay 2020-12-07T05:50:27.155900Z

yeah, I’m not seeing any other spots I missed. You sure you upgraded? Also, inspect will still ask for a diff, which will be calculated on the UI thread (though that is debounced in Inspect until things settle for a moment)…so it is intented to give you the perception of speed, when in fact it still has to at least build a diff at some point.

tony.kay 2020-12-04T15:17:48.068600Z

In my defense, the old inspect calculated it on every atom swap! , which was way worse, but I forgot that optimistic actions had it as well.

tony.kay 2020-12-04T15:21:25.068700Z

Workspaces is the alternate build, yes. The idea is that Fulcro apps meant to be ultra-composable. Productions apps get large, and that can make longer and longer compile times (though incremental are usually good). Navigating through a prod app to your area of interest is also a pain. If you set up workspaces, you can run “narrowed-down” version of your application (narrowed down to a raw React element for style checking if you want, or a subsystem, etc.) This can allow you to focus on a particular task without having to “log in, click 4 nav links, play, realize you have to reload the browser tab for some reason, etc, etc.”

tony.kay 2020-12-04T15:26:54.070900Z

There are new versions of RAD and RAD Semantic UI on clojars as well. I’m working on adding official options to the SUI plugin so you can customize the render to some degree…of course you can always theme the CSS itself, but I wanted ppl to be able to tweak things like the table css classes, customize how the row actions look, etc. Docs are sparse, but if you use the source of SUI you can pretty easily see what’s changed: https://github.com/fulcrologic/fulcro-rad-semantic-ui/blob/develop/src/main/com/fulcrologic/rad/semantic_ui_options.cljc Just use that file as a starting point, and look for usages of those keys. I’ll be adding more support soon.

2
😻 1
Jakub Holý 2020-12-04T15:27:38.071200Z

Thank you!

Jakub Holý 2020-12-04T15:32:37.077200Z

@tony.kay under https://book.fulcrologic.com/#Loading in the part "First, get rid of the application's initial state" init state is removed on all components but Root. Why? If a non-empty initial state is required it would be good to mention it there (and perhaps link to a section that goes into details, if it exists). Omitting initial state at the wrong place is a source of (new) developers' problems and confusion so it would helpful to fight it from start...

tony.kay 2020-12-04T15:35:33.078100Z

No no…we’re removing initial state on something that in reality would not have it, but would normally be loaded from a server…so it should neither be in state or on the screen.

tony.kay 2020-12-04T15:36:15.078800Z

It’s not “required”…it’s just a sane statement of an observation of the world…you cannot know, at compile time, what should actually be in many entities

👍 1
Jakub Holý 2020-12-04T15:44:11.080300Z

Tony: the dev guide is really awesome, I cannot imagine how much hard work went and goes into it. Thanks a lot for it!

💯 4
❤️ 6
tony.kay 2020-12-04T15:48:04.082600Z

You’re welcome. Thanks for saying so. I wish I had more time to care for it…it’s a bit out of date in places and best practices aren’t really highlighted well enough (those have evolved since I wrote it). It’s still “correct”, but I think perhaps seeing things like UISM or hooks earlier now might be nice.

👍 1
JAtkins 2020-12-04T18:01:03.092400Z

FWIW, I’m slowly working on an intro to fulcro blog post. Main goals are to get runnable, editable examples in the web version, and skip as much information as possible to get something basic on screen. Most of the detailed info would be referred to the official docs.

❤️ 3
tony.kay 2020-12-04T18:14:39.092800Z

@stuartrexking that turned out to be a regression in dyn routing

tony.kay 2020-12-04T18:15:16.093500Z

Fulcro 3.4.8 is on Clojars. Found and fixed a regression with dynamic-routing that was causing route deferred to run before the route instruction was sent to the router.

tony.kay 2020-12-04T19:57:37.094800Z

Fulcro RAD, and RAD semantic UI updated. There is also an update to the RAD demo. • Added more customization options • Updated demo account list screen to show them off • Updated demo deps to get routing bug fix

🎉 5
stuartrexking 2020-12-04T21:30:57.096300Z

@tony.kay thank you!

tony.kay 2020-12-04T21:32:59.096700Z

Thanks for pinging me on it…I had seen the error, but ignored it because I was doing something else…good to be reminded

magra 2020-12-04T21:47:47.097Z

@tony.kay Your dev guides, from the entangled to the current one, are half of my programming education. I can not thank you enough!! I worked through them multiple times. Of course, when you said that one needs to understand react I had to take a detour of some months because the react guide said I had to know js first. I would not have had any chance to wrap my non computer scientist mind around om next in a way to get it into production. For a beginner there are the clojure books, how to design programms, structure and interpratation of computer programms, FreeBSD Books and YouTube Videos. All that are very good fundamentals but how do you get from there to a furcro app in production? Not only how to get there but also how to find the way and not get lost. I could not have done that without you, your code, your manual and your guidance. Thank you again!!

magra 2020-12-04T22:13:54.097200Z

The dev guide is what the name suggests. It is not a manual on how to use some software, even though it does that as well. It is a guide for developers, how to think about the problems and solutions. It talks about all the major aspects one needs to face in getting a SPA in front of users. It ranks as a textbook. It presents a path to follow from the setup to all that needs to be considered in a production system.

👍 1
magra 2020-12-04T22:14:20.097400Z

Thank you!!

2
Jakub Holý 2020-12-04T23:03:50.099600Z

Error in the book, @tony.kay? Under https://book.fulcrologic.com/#_lambda_query there is > . In lambda mode, `this` comes from the argument list of defsc. > which conflicts with > IMPORTANT NOTE: In lambda mode ident can use this and props from the defsc argument list. The other two are primarily *used "statically" and have no sane this o*r props. > under https://book.fulcrologic.com/#_options_lambda_vs_template

tony.kay 2020-12-04T23:08:01.100Z

ah, yeah, feel free to send a PR…the docstring right in Fulcro itself?

✅ 1
tony.kay 2020-12-04T23:22:51.100600Z

Shout out to @pithyless for the very nice plug at 48:01 in https://youtu.be/UvJEBMOtayk?t=2881

👍 4
pithyless 2020-12-06T19:04:34.145900Z

Thanks for the shout out @tony.kay 🙂 I'm still happiest overall with the way my Datalog talk (https://www.youtube.com/watch?v=oo-7mN9WXTw) turned out, but any talk that helps get more people excited (cc @genekim 😄) is a win for our community.

pithyless 2020-12-06T19:06:25.146200Z

PS. I've said it once, but I'll say it again.. @tony.kay and @wilkerlucio really did a wonderful job on Jacek's podcast. I really enjoy the kind of deep-dives and philosophical programming discussions you can get into on a multi-episode audio session.

❤️ 2
genekim 2020-12-06T19:08:49.146400Z

🎉🎉🎉 @pithyless I’ve loved the three videos of yours that I watched — brilliant work!

tony.kay 2020-12-04T23:23:08.100800Z

(nice talk, BTW)

tony.kay 2020-12-04T23:25:11.101300Z

I’m sure you were meaning that about the whole graph ecosystem plus Fulcro, but it was nice to hear 🙂