@alexandrkozyrev its because jimpress is not the same as impress
there is an error about missing jquery in the js console
use this https://cdnjs.cloudflare.com/ajax/libs/impress.js/0.5.3/impress.js
here is a stage that works:
[[: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! [\"<https://cdnjs.cloudflare.com/ajax/libs/impress.js/0.5.3/impress.js\>"]\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)]))"]]
There seems to be a new bug in the codemirror
impressjs takes the space bar, this breaks the codemirror
here it is partially working http://tank.hyperfiddle.net/:dustingetz!impressjs/
I will think about how to solve the conflicts, we will need a better sandboxing strategy to make this work
We will be in a better position to do something about this in a couple months
@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)
HumanInput (http://alexandrkozyrev.hyperfiddle.net/:hi/) works pretty well
what is HF correct way to def “link/switch” action?
smth like ::inc? http://tank.hyperfiddle.net/:dustingetz!counter/
Like google sheets can change the focused cell with arrows?
link/tx-fn is for database transactions – it sounds like you are looking for view state
i think you would need to do something like document.getElementById("myTextField").focus();
Or integrating a datagrid component
more like a swipe, smth close to
#(.open js/window “http://alexandrkozyrev.hyperfiddle.com/:trinity/~entity('$',17592186047428)” “_self”)
not quite following yet