This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-18
Channels
- # architecture (14)
- # beginners (89)
- # cider (336)
- # cljsrn (2)
- # clojure (181)
- # clojure-berlin (1)
- # clojure-dusseldorf (3)
- # clojure-finland (4)
- # clojure-germany (5)
- # clojure-italy (18)
- # clojure-norway (10)
- # clojure-spec (9)
- # clojure-uk (94)
- # clojurescript (84)
- # cursive (3)
- # data-science (4)
- # datomic (82)
- # emacs (2)
- # events (4)
- # figwheel (1)
- # fulcro (6)
- # graphql (2)
- # hoplon (46)
- # instaparse (24)
- # jobs (9)
- # lein-figwheel (2)
- # luminus (18)
- # lumo (3)
- # mount (1)
- # off-topic (14)
- # onyx (17)
- # parinfer (22)
- # planck (1)
- # protorepl (1)
- # re-frame (50)
- # reagent (7)
- # ring-swagger (6)
- # rum (4)
- # shadow-cljs (94)
- # spacemacs (9)
- # specter (7)
- # tools-deps (2)
- # uncomplicate (4)
- # vim (33)
Hello everyone! I have one common key for all my app-db. It looks so:
{:db {:swipe-component {:key1 value
:key2 value
:key3 value}}}
Thus my reg-sub looks like:
(re-frame/reg-sub
::transition-end?
:<- [::swipe-component]
(fn [swipe-component]
(:duration swipe-component)))
And It rerun every time when any item in my app-db have changed!Is it correct at all? How can I watch only for the :duration key in the :swipe-component map?
@mikethompson Listened to your excellent defn interview, great stuff! 🙂 You mentioned using reagent bindings for Vega, would you care to share which one you're using?
We've rolled our own approach but try https://github.com/metasoarous/oz
Vega is big and powerful ... and more complicated Vega-Lite is much more approachable for simpler stuff
Cool, I like the possibility of using Vega-Lite for your day-to-day visualisations and using Vega for more complex ones
Can't remember offhand. But overall approach is always the same: https://github.com/Day8/re-frame/blob/master/docs/Using-Stateful-JS-Components.md
does anyone have an example of remote streaming with re-frame? i'm new to the reactive stuff and i'm not sure how to fit it into clojurescript/re-frame
@mikethompson Ok, thanks! We've used that doc for adding highcharts components to our app. Vega got me very intrigued though.
Vega-Lite: https://www.youtube.com/watch?v=rydth27fB3Q (5 mins)
@curlyfry ^^ will quickly give a sense of Vega-Lite (remember that Vega is more flexible and powerful)
Cool, I sort of feel like this is what I've been looking for when it comes to visualisations. I often feel a bit limited by higher level libs, and D3 always felt (while very cool) like too much work and a bit too imperative.
Yeah, there's a learning curve. But I feel like we'll be kicking goals with this for years to come.
What's the recommended way of doing animation with re-frame? My current approach is to have a (reg-event-fx ::animation-frame ...)
that updates the animation state and dispatches to itself until the animation is finished. This works, and performs surprisingly well (even on mobile devices), but feels rather low-level.
hey again guys - i’m wondering if it’s possible to pause re_frame’s event execution via js/alert? i thought that alert just freezes literally everything until a user clicks “ok”, but reframe seems to be processing events in the background?
nevermind. i think my debugger was screwing up the order of execution. if i just let events flow js/alert does indeed freeze the world
I’m curious; what’s your use case for freezing event execution?
just logging out a user after X minutes of inactivity. it’s nice to show an alert as to why it happened
Cheers 🙂
Is there a way to access the raw response from http-fx? I’ve googled and read some source code as well as supplied rest params to my success and failure handlers…not seeing a way to do this yet
Looks like I should have looked at the underlying library. Should be able to do this with https://github.com/JulianBirch/cljs-ajax/blob/master/docs/formats.md#non-standard-formats
i'm trying to learn how to use re-frame with events https://github.com/Day8/re-frame-async-flow-fx/blob/master/README.md
Actually still struggling with accessing response headers from http-fx via cljs-ajax…
I’m able to get the raw Google XHRIO object as documented in the link above, but it doesn’t appear to contain any header information
@alex-dixon do you know if re-frame-http-fx can stream events to/from a server
I’m not sure but beginning to think maybe Clojurists together could help out cljs-ajax a bit. 🙂
Or just a new one that uses fetch api. Only concern would be performance
Also compatability with node
Is it feasible at all to use re-frame in a text editing web-app? Are there any cljs implementations of contentEditable-style text editors? Thanks in advance
@raymcdermott sir, I'd be very grateful if you have shared your findings 🙂 Thanks in advance
@raymcdermott I'm going to try to integrate draft.js
, which is a React project. I can ping you, when I reach success or fail. If you want
@ognivo i am using re-frame with codemirror, draftjs... also have used it with prosemirror, substance... it is very easy to setup
interop with reagent is straightforward
[:> Editor-wysiwyg {:editorState @state
:wrapperClassName "demo-wrapper"
:editorClassName "demo-editor"
:onEditorStateChange (fn [content-state] (on-editor-change content-state state entity-id))
:toolbarOnFocus true
:toolbarCustomButtons [(r/as-element [custom-option state])
(r/as-element [insert-image-comp state])]
:toolbar {
;:colorPicker {:component (r/reactify-component custom-option)}
}
:hashtag {}
:mention {:separator " "
:trigger "@"...... .....
with draft js ended up using this wrapper instead of teh plugin system that is also quite popular https://github.com/nrfm/react-draft-wysiwyg
looks cool! I would love to share experiences... i am making a tool to build "interactive systems" from "conceptual models of the system"... i know i need to work on that pitch 🙂 https://drive.google.com/open?id=18U_lVGzGJAf9dZFtuoCTnEzalrkFNEWa https://drive.google.com/open?id=13lcWt9nG_o4OTGr3o-CTY7KvAwE2xREU some old WIP. multiple instances of draftjs, codemirror.... all backed by a rules based system with clara rules...
@ognivo i extracted a minimal gist of Draftjs how to use... no re-frame, r/atoms instead but same approach... jsut add events and subs 2 use cases... 1. init with no content 2. init with content https://gist.github.com/nrfm/0c33d297e8ae5cf36c98ef640003a118
@U9VP9VCE6 whoa, thank you so much mate ❤️🍺
@raymcdermott i just watched your talk at DCD... that was great. Made me go into brainstorm mode about the posiblilities of a shared repl.... thanks!
thanks @U9VP9VCE6… I’m open to ideas 🙂