@miridius Yes! Next segment of the tutorial that i didnt write yet. In this demo http://www.hyperfiddle.net/:demo!hyper-control/ , the shirt-size query takes the gender as an input, it uses :link/formula which is not yet explained. I will make some cookbook demos of this either tomorrow time permitting otherwise thursday. BTW links are an area that is about to have major simplifications in august, today the behavior is well defined but we know how to do it simpler.
Thanks, that example helps me a lot 👍 One thing that confuses me about the links section is how to change the fiddle for the default edit & new buttons, as that field is greyed out for me but in your fiddle it is not. I tried to create some new links but I couldn't remove the old ones -- oh hey as I was typing this I just figured it out 🙂 You have to create new links and give them the magic names of :hyperfiddle/new or :hyperfiddle/edit and then they replace the old ones
@miridius You can make as many fiddles as you want, but if what you need is clojurescript functions, that is better. Fiddles and links to fiddles is more of an API concern. There is a place on the domain for a cljs namespace, for example here: http://www.hyperfiddle.net/:hyperfiddle.ide!domain/~entity('$domains',(:domain!ident,'www')) This quick hacky cljs "namespace" has scaled fine for us so far so we haven't had to make anything more sophisticated yet. When you outgrow this, show me and we will design something better
ok yeah this will work for me if I need to write any common cljs code. I was more thinking of UI components rather than application logic though, and I tried making separate fiddles for each piece and it's actually quite nice because you can view each of them individually and get them to render correctly - kind of like using devcards. Does each fiddle generate 1 React component? And will nested fiddles re-render individually on some trigger?
Btw speaking of the domain page, I wanted to use Tachyons but I wasn't quite sure how to add a stylesheet link to the page so what I ended up doing was just copy-pasting the full minified Tachyons CSS into the CSS section of the domain, and that seems to work well 🙂
hmm I tried to add some cljs function to http://davidrolle.hyperfiddle.net/:hyperfiddle.ide!domain/~entity('$domains',(:domain!ident,'davidrolle')) but when I then try to use them I get an error "Cannot read property <function name> of undefined" e.g. at http://davidrolle.hyperfiddle.net/:header.search-area!search-icon
https://github.com/hyperfiddle/hyperfiddle/blob/master/resources/ide/schema_renderer.cljs
Codemirror clojure mode trick: shift-tab will auto-format selection
Is there a way to get a multi-select version of an :options link? For attributes with :cardinality/many. And can I choose the order of options in a dropdown?
@dustingetz my domain settings keep getting wiped every time hyperfiddle updates, is that normal?
Deploys currently wipe the staging area - which shouldnt matter if you develop with auto-transact
There could be a bug that your domain has auto-transact off by default
Is the stage button yellow ?
yes
click "domain" – we have bad ux here
I turn auto-transact on but it turns itself off again when there's an update
$domains
oh!
That's probably a bug, i will look into that
On the domains tab only, this happens to auto transact?
hmm I'm not sure, I think it turns off everywhere. Btw when I say "an update" I mean a hyperfiddle update that requires page refresh
Yeah
not a big deal right now, I can just copy-paste my CSS back in again
maybe it's because I've got too much CSS?
We will fix it, didn't know about this one
Nah
I can code you up a multi-select pretty fast, is it okay if it is checkboxes?
checkboxes sounds good
Ok, soon there will be a cookbook on how to inject your own widgets as well
nice
I'm currently struggling a bit with passing state around, let me know if you have time for a video call at some point as I think that would be easier
I am free now
nice
ill make a zoom 1 sec
thanks
sent in pm