hyperfiddle

http://hyperfiddle.net
2018-08-08T01:50:31.000060Z

@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.

miridius 2018-08-08T21:21:17.000163Z

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 2018-08-08T23:19:24.000151Z

@dustingetz

2018-08-08T01:53:09.000118Z

@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

miridius 2018-08-08T21:25:54.000345Z

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?

miridius 2018-08-08T21:27:44.000097Z

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 🙂

miridius 2018-08-08T22:20:19.000140Z

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

miridius 2018-08-08T23:19:02.000228Z

@dustingetz

2018-08-08T19:22:05.000287Z

Codemirror clojure mode trick: shift-tab will auto-format selection

miridius 2018-08-08T21:21:17.000163Z

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 2018-08-08T21:25:54.000345Z

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?

miridius 2018-08-08T21:27:44.000097Z

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 🙂

miridius 2018-08-08T21:47:32.000127Z

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?

miridius 2018-08-08T22:20:19.000140Z

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

miridius 2018-08-08T22:40:21.000175Z

@dustingetz my domain settings keep getting wiped every time hyperfiddle updates, is that normal?

2018-08-08T22:42:04.000285Z

Deploys currently wipe the staging area - which shouldnt matter if you develop with auto-transact

2018-08-08T22:42:16.000095Z

There could be a bug that your domain has auto-transact off by default

2018-08-08T22:42:27.000186Z

Is the stage button yellow ?

2018-08-08T22:42:31.000133Z

@miridius ^

miridius 2018-08-08T22:42:32.000301Z

yes

2018-08-08T22:42:45.000269Z

click "domain" – we have bad ux here

miridius 2018-08-08T22:42:47.000141Z

I turn auto-transact on but it turns itself off again when there's an update

2018-08-08T22:42:48.000208Z

$domains

2018-08-08T22:42:53.000118Z

oh!

2018-08-08T22:43:07.000058Z

That's probably a bug, i will look into that

2018-08-08T22:43:34.000237Z

On the domains tab only, this happens to auto transact?

miridius 2018-08-08T22:44:14.000045Z

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

2018-08-08T22:44:17.000294Z

Yeah

miridius 2018-08-08T22:44:45.000244Z

not a big deal right now, I can just copy-paste my CSS back in again

miridius 2018-08-08T22:45:00.000173Z

maybe it's because I've got too much CSS?

2018-08-08T22:45:02.000170Z

We will fix it, didn't know about this one

2018-08-08T22:45:04.000148Z

Nah

2018-08-08T22:45:31.000073Z

I can code you up a multi-select pretty fast, is it okay if it is checkboxes?

miridius 2018-08-08T22:46:14.000257Z

checkboxes sounds good

2018-08-08T22:46:33.000279Z

Ok, soon there will be a cookbook on how to inject your own widgets as well

miridius 2018-08-08T22:46:40.000118Z

nice

miridius 2018-08-08T22:47:05.000128Z

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

2018-08-08T22:47:11.000189Z

I am free now

miridius 2018-08-08T22:47:27.000023Z

nice

2018-08-08T22:47:30.000147Z

ill make a zoom 1 sec

miridius 2018-08-08T22:48:24.000051Z

thanks

2018-08-08T22:48:32.000051Z

sent in pm

miridius 2018-08-08T23:19:02.000228Z

@dustingetz

miridius 2018-08-08T23:19:24.000151Z

@dustingetz