@alexandrkozyrev lines 3 and 6 define ratoms but it recreates them each time vega-renderer is called
It also recreates the reagent class each time, and probably mounts it over each time
Define the reagent class at the namespace level with def (so it is static) and lift the ratoms also to def level
vegaspec can be a prop
I call vega-rederer several times in vega-dashboard so it probably should recreate a class instance each time with different ednspec and vegaspec
Can it be the same class, reused, but constructed with different parameters/props?
quite possible, to be clear - I just copy/pasted best examples I’ve found, it wasn’t mindful design
Oh ok, do you want me to show you? Its easy
it’d be awesome
https://gist.github.com/dustingetz/072f598320a217090e79dd4b698e707b
(reagent.core/argv this)
is a new fn for you, it gets the render props
add/return uuid id (otherwise vega override all specs in the same :div) - works like magic
random-uuid is going to be different each time it renders
Which one of you is slifin on hacker news by the way?
@alexandrkozyrev you might like this https://github.com/reagent-project/reagent-cookbook
<--
having trouble loading http://demo.hyperfiddle.net/:hyperfiddle.ide!please-login/:dustingetz!gender-shirtsize I can see a 503 in the network tab for http://demo.hyperfiddle.net/api/bab299d342f72f5c02afc207375fae85625ff0a7/hydrate-route/%22datomic:free:%2F%2Fdatomic:4334%2Fdomains%22,2383,%22datomic:free:%2F%2F172.18.0.2:4334%2Ftank%22,3143,%22datomic:free:%2F%2Fdatomic:4334%2Fclojurians-log%22,18827,%22datomic:free:%2F%2Fdatomic:4334%2Fdomains%22,2383,%22datomic:free:%2F%2Fdatomic:4334%2Fhyperfiddle-users%22,34452,%22datomic:free:%2F%2Fdatomic:4334%2Froot%22,17513/nil/%7B:hyperfiddle.ide!foo,'page'%7D/WzpoeXBlcmZpZGRsZS5pZGUvcGxlYXNlLWxvZ2luIFs6ZHVzdGluZ2V0ei9nZW5kZXItc2hpcnRzaXplXV0,
Hello, thanks for the kind words! looking
Are you logged in?
not on this machine
Does it look like this?
seems fine on my laptop, wierd
Stalled on https://i.imgur.com/rl5xy4o.png on my desktop
Is there a ajvascript error or anything? What OS and browser
the end point appears to think about it for about 13 seconds
We are looking into it, I assume it is still stuck?
but yeah you deserve the kind words, it's crazy the amount of fuss there is in the front end world when there's been nothing conceptually new for years but here you've got a system here that is truly revolutionary, meteorJS on steroids doesn't even begin to cover what hyperfiddle is capable of, pushing graphs around the stack whilst everyone else is wasting their time trying to get SQL into slot based objects
yeah can still replicate, on the desktop
were you logged in before and playing around?
and then you logged out?
not sure, may have checked the website and been logged in before christmas on the desktop don't think I would have ever explicitly logged out
if you dont mind running a chrome console command, could you send me what this returns: localStorage.getItem('{"~#\'":"~:STATE"}')
localStorage.getItem('{"~#\'":"~:STATE"}')
"{"~:hyperfiddle.runtime/auto-transact":{"~rdatomic:<free://172.18.0.2:4334/tank%22:false,%22~rdatomic:free://datomic:4334/clojurians-log%22:false|free://172.18.0.2:4334/tank":false,"~rdatomic:free://datomic:4334/clojurians-log":false>},"~:hyperfiddle.runtime/global-basis":{"~:domain":{"~rdatomic:<free://datomic:4334/domains%22:2383|free://datomic:4334/domains":2383>},"~:ide":{"~rdatomic:<free://datomic:4334/root%22:17513,%22~rdatomic:free://datomic:4334/domains%22:2383,%22~rdatomic:free://datomic:4334/hyperfiddle-users%22:34457|free://datomic:4334/root":17513,"~rdatomic:free://datomic:4334/domains":2383,"~rdatomic:free://datomic:4334/hyperfiddle-users":34457>},"~:user":{"~rdatomic:<free://172.18.0.2:4334/tank%22:3143,%22~rdatomic:free://datomic:4334/clojurians-log%22:18827|free://172.18.0.2:4334/tank":3143,"~rdatomic:free://datomic:4334/clojurians-log":18827>}},"~:hyperfiddle.runtime/user-id":null,"~:version":4,"~:stage":{"~rdatomic:<free://172.18.0.3:4334/tank%22:[[%22~:db/retract%22,17592186046195,%22~:fiddle/query%22,%22[:find|free://172.18.0.3:4334/tank":[["~:db/retract",17592186046195,"~:fiddle/query","[:find> \n (pull ?e [:dustingetz.reg/email\n ; :dustingetz.reg/name\n ; :dustingetz.reg/birthdate\n :dustingetz.reg/age\n ; {:dustingetz.reg/gender [:db/ident]}\n ; {:dustingetz.reg/shirt-size [:db/ident]}\n :db/id])\n :where \n [?e :dustingetz.reg/email]\n #_#_[?e :dustingetz.reg/age ?age] [(> ?age 30)]]"],["~:db/add","-1508590361","~:dustingetz.reg/gender","~:dustingetz.gender/male"],["~:db/add","-1508590361","~:dustingetz.reg/shirt-size","~:dustingetz.shirt-size/mens-medium"],["~:db/add","-1508590361","~:dustingetz.reg/birthdate","~t2018-11-01T00:00:00.000Z"],["~:db/add",17592186046195,"~:fiddle/query","[:find \n (pull ?e [:dustingetz.reg/email\n :dustingetz.reg/name\n :dustingetz.reg/birthdate\n :dustingetz.reg/age\n {:dustingetz.reg/gender [:db/ident]}\n {:dustingetz.reg/shirt-size [:db/ident]}\n :db/id])\n :where \n [?e :dustingetz.reg/email]]"]]},"~:last-modified":1546450263325}"
Video of the problem here: https://youtu.be/RHeazWNxFrA
ah discovered it has to be something to do with client state or extensions because it works in incoginto mode, and safari
that said I should have the same extensions on the laptop
empty cache and hard reload doesn't appear to help, is there any other state I can clear?
yea i think the problem is your local storage
I hate telling people to do this, but try running localStorage.clear()
in your console
yep the login screen shows now
Ok sorry about that, thats an oversight with our demo environment when people log out
Does this happen when the user token expires
yea old local storage persists (it included new entities in this case), and those fail security
@sfyire thanks for reporting this, this was a ticking time bomb 🙂
+100500
All, we are resetting localStorage to fix the bug Adrian reported. Transact your staging areas! (You should be doing this every day anyway, but tonight you will lose any unsaved work)