Fork me on GitHub

Hi everyone, looking at the routing and history system of fulcro-rad I noticed that, when clicking in a link with a rr/route-to!, the browser history change happens in the com.fulcrologic.rad.routing.route-to! function, before the call to com.fulcrologic.fulcro.routing.dynamic-routing.change-route!. So, if the dr/change-route! function cannot change the route, the browser history state and the internal routing state will not match, i.e. the view displayed will be the old one but the route showed in the browser address bar will be the denied route. There is the dr/can-change-route? function but it does not take into account the :route-denied function possibly supplied in a component, so if we use it to decide whether to change or not the history before calling the rr/route-to! function we would lose the possibility to have an override of that decision. This, indeed, currently happens in the com.fulcrologic.rad.routing.history.install-route-history!, as when trying to change the route via the backward button in the browser the function will only check the com.fulcrologic.fulcro.routing.dynamic-routing.can-change-route?, so if it returns false then the function will refuse to change the route without even trying the :route-denied function. This analysis came from trying to understand why a link with rr/route-to! and the history backward button showed different behaviours in regards to trying to leave a dirty form in the fulcro-rad-demo app after adding a ::form/confirm function to it. Are these behaviours as intended?

❤️ 3

Not intended. You've found a legitimate bug


thanks, how should I proceed? Can I reopen to keep track of and start working on it?


yeah, that’s fine

👍 1

If I have a report and a column is expensive to load, and I want to load it async after report is shown (or perhaps when user clicks on a button), how would I go about doing that. Load report, then use dynamic queries to add a property to component query, load again?


I assume you mean in RAD. This question has been asked before and answered in channel…let me see if I can find it


Thank you I will look at it


You might even ask Gene…I think we worked together on a soln for him and his thing might be OSS


I'm trying to use ":post-mutation `dr/target-ready!" in a df/load inside a will-enter function, but it throws an error like this: [com.fulcrologic.fulcro.mutations:226] - Unknown app state mutation. Have you required the file with your mutations? com.fulcrologic.fulcro.routing.dynamic-routing/target-ready! See

Björn Ebbinghaus19:05:54

Remove the ! There is the mutation target-ready and a function target-ready!

👌 1
❤️ 1

working. thank you @U4VT24ZM3