Fork me on GitHub
#hyperfiddle
<
2018-12-15
>
dustingetz14:12:06

@alexandrkozyrev its because jimpress is not the same as impress

dustingetz14:12:20

there is an error about missing jquery in the js console

dustingetz14:12:08

here is a stage that works:

dustingetz14:12:12

[[:db/add 17592186047375 :fiddle/renderer "(let [{:keys [:hypercrud.browser/fiddle]} ctx]\n  [:div.container-fluid props\n   [hyperfiddle.ui/markdown (:fiddle/markdown @fiddle) ctx]\n   [:hr]\n   [contrib.loader/Loader! [\""]\n    #(reset! user/scripts-loaded true)]\n   (user/with-loaded\n    [user/foo ])])"]
 [:db/add 17592186047375 :fiddle/cljs-ns "(def scripts-loaded (reagent.core/atom false))\n(defn with-loaded [hiccup]\n  (let [loaded @scripts-loaded]\n    [:<> {:key loaded} \n     (if loaded \n       hiccup \n       [:p \"loading...\"])]))\n\n(defn foo []\n  (assert (exists? js/impress))\n  (let [s (reagent.core/atom \"select this text\")\n        api js/impress]\n   [:div  \n    [:div#impress\n      [:div#bored.step\n       {:data-x \"-1000\" :data-y \"-1000\"}\n       [:q\n        \"Aren’t you just \"\n        [:b \"bored\"]\n        \" with all those slides-based presentations?\"]]\n       [:div#really.step\n       {:data-x \"-1000\" :data-y \"-1000\"}\n       [:q\n        \"Aren’t you just \"\n        [:b \"really bored\"]\n        \" with all those slides-based presentations?\"]]]\n    (-> (js/impress) .init)]))"]]

dustingetz14:12:31

There seems to be a new bug in the codemirror

dustingetz14:12:57

impressjs takes the space bar, this breaks the codemirror

dustingetz14:12:52

I will think about how to solve the conflicts, we will need a better sandboxing strategy to make this work

dustingetz14:12:09

We will be in a better position to do something about this in a couple months

alexandrkozyrev20:12:01

@dustingetz I’d like to add keyboard interactivity to http://alexandrkozyrev.hyperfiddle.net/:trinity/~entity('$',17592186046859), smth like “alt+left arrow” for “move to the key value” (higher order intent), “alt+right arrow” for “move to one/random option”, f.i. “alt+right arrow” for “presentation mode” leads to “impress.js” - http://alexandrkozyrev.hyperfiddle.net/:trinity/~entity(‘$’,17592186047428)

alexandrkozyrev20:12:22

what is HF correct way to def “link/switch” action?

dustingetz21:12:24

Like google sheets can change the focused cell with arrows?

dustingetz21:12:03

link/tx-fn is for database transactions – it sounds like you are looking for view state

dustingetz21:12:16

i think you would need to do something like document.getElementById("myTextField").focus();

dustingetz21:12:13

Or integrating a datagrid component

alexandrkozyrev22:12:02

more like a swipe, smth close to

dustingetz22:12:48

not quite following yet