This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-02
Channels
- # 100-days-of-code (1)
- # announcements (2)
- # beginners (122)
- # boot (5)
- # calva (5)
- # cider (54)
- # cljdoc (1)
- # clojure (132)
- # clojure-brasil (1)
- # clojure-italy (4)
- # clojure-nl (6)
- # clojure-uk (105)
- # clojurescript (43)
- # core-async (17)
- # cursive (14)
- # datomic (60)
- # emacs (35)
- # figwheel-main (44)
- # fulcro (70)
- # graphql (1)
- # jobs (19)
- # jobs-discuss (5)
- # leiningen (5)
- # luminus (2)
- # off-topic (40)
- # onyx (2)
- # overtone (5)
- # re-frame (36)
- # reagent (29)
- # ring-swagger (20)
- # rum (13)
- # shadow-cljs (19)
- # testing (5)
- # tools-deps (25)
- # vim (5)
@currentoor So I’ve verified that 2.6.5 on clojars has the changes.
Not yet, I’ll verify tomorrow
@tony.kay @thheller I just tried upgrading to 2.6.5 here, and I found that something with refresh got broken with it in some scenarios, I need to pinpoint more, but on some cases the data is not refreshed and I'm getting blank renderings on some sections, reverting to 2.6.4 fixed it
@veddha.riady won’t the route param just be the ID of the target? Or, if you have multiple params, you can simply use bidi to parse the URI. Complex routing behaviors are meant to be implemented in mutations of your own, by composing mutation helpers from the routing ns
@wilkerlucio Good to know…I tested it somewhat against my app, and it also didn’t look like the patch should change anything…does it happen on components that override lifecycle methods, and if so, which lifecycle method(s)?
@veddha.riady what I said before: any behaviors beyond showing a screen are up to you. The route params themselves can be parsed out with bidi from the URI, and if you’ve already got things routing, then your database will have a reflection of that interpretation (e.g. as an ident pointing to a screen). If you want to make that data visible on the UI, you just need to either interpret it in your own mutation, or read it out of the database and interpret it in the UI.
A more feature-rich UI routing system is beyond the scope of the base library, but would be easy to implement on top of it. For example, I could imagine setting up feature rich macros that let you define all sorts of things ranging from data loading to UI layout…but again, too much of a feature creep for the base library.
The existing routing primitives are just that: primitive. They keep you from having to write a union query component, help a bit with dynamic code loading, and reduce boilerplate for the common case.
@wilkerlucio Can you confirm that you cleaned your project and browser caches?
Im away from computer now, but I confirmed it multiple times, switched version and back about 3 times, the issue was consistent
the case is after a load to get data and display in a modal
the code works fine on workspaces, but on the real app it was calling the modal with blank props after load
but forcing a root refresh renders correctlu after that
so it might something inderect, needs some depth on the query to reproduce, thats my current guess
basically all the optimization does is replace duplicate versions of the default lifecycle methods with a single shared one
maybe its having different closures or something
I wonder if there’s a problem with the hook-up and one isn’t getting installed properly…could corrupt the indexes if so.
Hm…closures…guess that’s possible, but I think they only use this
and in this case the main component doest override any lifecycles
(the componente being loaded)
I did notice that @thheller patch no longer clones the React prototype…but that didn’t seem problematic to me…but then I didn’t write that original bit of code. It came from Om Next.
hey. hmm this is odd. goog.object/extend
is basically the same as goog.object/clone
. It just copies properties from one object to another
next time might be better not to move things around in source…sure would be nice to see a clean diff.
@wilkerlucio is this in dev or release only or both?
we have some hints: It misbehaves on a targeted refresh. This means it is looking up props by ident to run a targeted query and property patch. This also uses the metadata about UI path embedded in the props.
the issue happens in both dev and release builds
@tony.kay it does use targetted refresh on my example
@wilkerlucio yep..only way a root refresh would work, but not one after a load I could think of. 🙂
ah, sorry I mean the targetted in terms of load, its load with custom :target
I can try making a min repro later
just detected it this morning
that’s probably not relevant. I mean that it is an optimized render, which requires that get-ident
works on the component
Is the modal coming up while the data is loading? E.g. is this a new UI element that is coming in with a load?
the modal shows immediatly after user click, it opens showing a loading spinner
the spinner shows fine, the problem is after the load is merged
the component gets blank props
if I force a root render right after that (using inspect) it rendes correctly
right…so what happens on refresh is: 1. The optimal render looks up the ident of the compontn to refresh 2. It runs an ident-join query on that component 3. It patches the result of that query onto the tree of old props 4. It re-renders from root, and S.C.U. short-circiuts everything but that path.
(3) requires that it find the correct path…but I can guess that (3) is OK, because otherwise you’d get the old props.
any ID weirdness there? E.g. is the ID of the component changing as a result of the load?
no, the id is fixed, the entity is already loaded, its just pulling more data
yeah, I do have that
but I dont think its it
If you get a chance, you might add some debug statements into the Fulcro source in the default lifecycle methods and see if anything is going wrong.
because I debugged the props of the component that calls the modal, and props are wrong there too
and in the optimal-render
, to see where it is screwing up…my guess is the ident is wrong
“the props are wrong there too”…meaning other problems, or just that the ones are missing ?
it gets a blank map instead of the props its supposed to have (blank or nil, have to check, still afk)
ok, I’ll try to find some time to look more into it later