This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-13
Channels
- # babashka (5)
- # beginners (52)
- # biff (11)
- # brompton (5)
- # calva (2)
- # cider (7)
- # clojure (80)
- # clojure-europe (3)
- # clojure-finland (1)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-uk (3)
- # clojurescript (15)
- # conjure (4)
- # core-async (9)
- # cursive (3)
- # datahike (38)
- # datascript (1)
- # datomic (7)
- # duct (9)
- # emacs (4)
- # fulcro (11)
- # graalvm (21)
- # honeysql (5)
- # lambdaisland (1)
- # leiningen (1)
- # news-and-articles (1)
- # off-topic (8)
- # react (42)
- # reagent (6)
- # reitit (11)
- # shadow-cljs (62)
- # specter (1)
- # spire (2)
- # sql (1)
- # tools-deps (12)
- # vim (5)
Sometimes I am wondering about the black magic that is going on in JVM land... I made an uberjar from my Fulcro RAD based project, with AoT-compilation. That worked fine. Trying to run it though? No chance. Getting "NoClassDefFoundError: taoensso/encore$read_sys_val". Stacktrace points at com.fulcrologic.rad.form being the cause. Which I don't get, because running the whole thing "from source" works just fine.
Would still be nice to know a way to make it work, or at least having it be run pre-compiled. Because at some point that needs to be swapped in at release, and even currently there is a downtime for almost a minute just for it to start up and load everything
How do I save http://book.fulcrologic.com/ for offline read? I've used this method https://gist.github.com/dannguyen/03a10e850656577cfb57, but it doesn't work, although it works great with shadow-cljs and pathom (https://wilkerlucio.github.io/pathom/) guides.
I can even interact with pathom examples offline, when downloaded using method in the above Gist. (wget -E -H -k -K -nd -N -p -P "pathom" https://wilkerlucio.github.io/pathom/)
Hello! I am exploring issues with nested deferred routes (and RAD reports). The first one is here https://github.com/holyjak/fulcro-rad-demo/commit/99f2744fea3e97b9dda4af560e62d0e3e77305e2 - the main problem is that the report does not show up until I force re-render via Fulcro Inspect. Both the changes, instructions, and all 3 problems I encountered are described in the commit message: > I made this UI structure: > > MainRouter -> JhOrgDashboard (deferred, ident e.g. [:fake/org-nr "123"]) > -> JhOrgDetailsRouter -> NoOrgDetails | InventoryReport > > To try: Log in, click "-> JhOrgDashboard" then "Show the report" > > Problems: > 1. The report does not show up until a manual re-render via the Fulcro > Inspect > 2. The report is empty, which I suppose it shouldn't; its :event/loaded > transaction contains some rows > 3. On hard-reload (Cmd-S-R in Firefox) the report is displayed (empty) > and there is a warning log: " get-ident was invoked on com.example.ui.item-forms/InventoryReport with nil props (this could mean it wasn't yet mounted)" I would appreciate any tips on how to fix these issues (I suppose they stem from my incorrect use of Fulcro). Thank you! PS: I am exploring the case where a report router is inside a component that loads its data when routed to and that has a dynamic ident (here, based on an a made up organization number)
FYI @tony.kay I fixed the issues, you were right that the state tree was broken. The problem is that JhOrgDashboard has a dynamic ident and its data is "loaded" upon access - and the router state wasn't merged into that, init state had of course no role in it.
I assume the correct and necessary way is to use pre-merge to add the child router state to a dynamic component (if. with :ident :some/id-prop
). Correct? I have yet to figure out how to do that correctly, my attempt here https://github.com/holyjak/fulcro-rad-demo/commit/a2bf17fabc00d9aca8aa33c34e51b17453ff4e84#diff-ae1e76b37382def87447cfafc6f34842R60 failed 😞
Make sure you use the get-intial-state
of the sub-tree…generally something like merge-component
with a component, initial-state tree, and named parameter (i.e. :replace
, to put the ident at some path) is all you need to put a subtree in place.
@holyjak use the deps local root option to make sure you’re working from sources of Fulcro and such. Examine the algorithms in dynamic routing and watch what happens. You could be misusing something, or it could be a bug. That should help you narrow it down.
I would think pre-merge would be fine. You have a data tree there..so patching that tree I think will do it. I don’t have time to read your code.
I've been watching the normalization video on YouTube and was wondering if someone could give more context around merge/merge-component!
and merge/merge!
seems like I would use merge/merge!
for full tree merging, whilst component for component merging? Do I edit the database directly to retrospectively to add links between components?
This is a very very ugly implementation of reducers. Needs work, but I think it is usable. https://github.com/JJ-Atkinson/fulcro/blob/59f5623093bfff416e508ecd6fae9ab906f886ab/src/workspaces/com/fulcrologic/fulcro/cards/reducer4_cards.cljs
FYI @tony.kay I fixed the issues, you were right that the state tree was broken. The problem is that JhOrgDashboard has a dynamic ident and its data is "loaded" upon access - and the router state wasn't merged into that, init state had of course no role in it.
I assume the correct and necessary way is to use pre-merge to add the child router state to a dynamic component (if. with :ident :some/id-prop
). Correct? I have yet to figure out how to do that correctly, my attempt here https://github.com/holyjak/fulcro-rad-demo/commit/a2bf17fabc00d9aca8aa33c34e51b17453ff4e84#diff-ae1e76b37382def87447cfafc6f34842R60 failed 😞