Fork me on GitHub
#fulcro
<
2020-12-04
>
stuartrexking05:12:39

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&amp;

stuartrexking05:12:18

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

stuartrexking05:12:43

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

stuartrexking16:12:46

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

tony.kay16:12:32

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.kay16:12:06

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.kay16:12:12

fun with async startup 🙂

Jakub Holý (HolyJak)08:12:31

@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.kay15:12:25

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.kay15:12:49

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 facepalm

👏 15
bbss07:12:00

Ahh, this is what I was starting to notice so much that I would do a shadow-cljs release every once in a while see how it -actually- performed! I noticed in the profiler the inspect diff was doing a lot. Good to hear that's improved.

bbss03:12:00

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.kay05:12:32

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

tony.kay05:12:38

I don’t see anything in UISM…

tony.kay05:12:27

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.kay15:12:48

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.kay15:12:54

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.

😻 3
fulcro 6
Jakub Holý (HolyJak)15:12:37

@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.kay15:12:33

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.kay15:12:15

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

👍 3
Jakub Holý (HolyJak)15:12:11

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

❤️ 18
💯 12
tony.kay15:12:04

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.

👍 3
JAtkins18:12:03

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.

❤️ 9
magra21:12:47

@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!!

magra22:12:54

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.

👍 3
magra22:12:20

Thank you!!

lambdalove 6
tony.kay18:12:39

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

tony.kay18:12:16

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.kay21:12:59

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

tony.kay19:12:37

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

🎉 15
Jakub Holý (HolyJak)23:12:50

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.kay23:12:01

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

3
Jakub Holý (HolyJak)07:12:50

The docstring I found mentions no args and is thus correct:

;; query template is literal. Use the lambda if you have ident-joins or unions.

tony.kay23:12:51

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

👍 12
Buidler01:12:22

Thanks for linking this. Going to check it out sometime this weekend.

pithyless19:12:34

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 @U6VPZS1EK 😄) is a win for our community.

pithyless19:12:25

PS. I've said it once, but I'll say it again.. @tony.kay and @U066U8JQJ 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.

❤️ 6
genekim19:12:49

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

tony.kay23:12:08

(nice talk, BTW)

tony.kay23:12:11

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