This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-08
Channels
- # admin-announcements (3)
- # bangalore-clj (3)
- # beginners (21)
- # boot (32)
- # cider (14)
- # clara (2)
- # cljs-dev (19)
- # cljsjs (8)
- # cljsrn (1)
- # clojars (1)
- # clojure (147)
- # clojure-australia (6)
- # clojure-brasil (8)
- # clojure-canada (2)
- # clojure-gamedev (3)
- # clojure-greece (2)
- # clojure-hk (5)
- # clojure-italy (10)
- # clojure-japan (8)
- # clojure-korea (4)
- # clojure-russia (25)
- # clojure-sg (2)
- # clojure-spec (36)
- # clojure-uk (34)
- # clojurescript (88)
- # cursive (157)
- # datomic (6)
- # devcards (1)
- # dirac (1)
- # editors-rus (3)
- # events (2)
- # funcool (1)
- # hoplon (57)
- # jobs (9)
- # lein-figwheel (2)
- # luminus (1)
- # om (156)
- # onyx (93)
- # perun (11)
- # rdf (65)
- # re-frame (36)
- # reagent (17)
- # ring-swagger (3)
- # specter (19)
- # untangled (33)
@mheld total SWAG, but any chance you’re getting bitten by browser auto-filled fields? i have this issue for my re-frame/re-com login popup where the username/password fields are auto-populated by Chrome (visually) but the onChange events don’t fire & so the components still think they’re empty
@rorydouglas I haven't gotten to that yet 😛
though http://stackoverflow.com/questions/12374442/chrome-browser-ignoring-autocomplete-off
@mheld yeah i do actually want autofill on though, i think i need to use componentDidMount to check the contents of the DOM input directly & set it on the field, haven’t had time for that yet
having a problem with as-element
here. prepending it with a let block give me warnings. like that:
(defn button
[x]
(let [something 324]
(r/as-element
[rui/flat-button ...])))
any suggestions how to fix this?
@michael.heuberger: fix what?
@michael.heuberger - any chance of getting the warning text?
I have been looking around in the documentation but haven’t located best practices on using a subscription as part of input to reg-event-db
. How is this done in the most idiomatic/performant way?
@vikeri don't use subscriptions in event handlers. instead factor out functions and use those to build the structure from app-db as needed
@martinklepsch Alright, just thought that I shouldn’t do any costly function computations in handlers. And since the value already exists I thought I might just get it from the memory. But I already have a function so that is easily accomplished 😄
@vikerl that sounds like a sensible API addition: a handler saying I need the current value of this subscription, get it to me cheap if you have it, or compute it. Since the handler is in the middle of modifying app-db though, it could be a point of confusion that the subscription's value is computed using the value of app-db from before the handler started.
great idea @martinklepsch thanks for the hint- much simpler than spamming a bunch of messages through reagent. Did you ever figure out a way to attach a class to the element “when hovered” to enable transitions? I never seem to be able to understand closure docs 😕
@lwhorton to which element in particular the tooltip or the hovered element?
the tooltip, ideally — i’m doing a simple transform scale(0) -> scale(1), but you can’t get it to work without swapping classes “on-hover"
So Tooltip
inherits from PopupBase which implements the following events http://google.github.io/closure-library/api/goog.ui.PopupBase.EventType.html
aha, i see.. it’s all there in the docs it’s just hard to translate API scaffolding into meaningful examples. Ill look around and let ya know if I figure it out.
You can add listeners for show/hide and add/remove classes there.
An alternative would be to use setTransition
and some transition from goog.fx
but I haven't anything like that so not sure how much work that would be
anyone know an idiomatic way to redirect users after triggering an http-success handler ? re-frame-async-flow-fx doesn’t seem to cut it since you can’t match dispatch vector parameters
@lwhorton what kind of transition did you want to add to the tooltip?
i’m still working on it, I got the entering transition to work via adding a listener to Tooltip Events.SHOW
, struggling to get the leave animation to work because the mouse handling doesn’t seem to work at all… MOUSELEAVE and MOUSEOUT are never firing when attached via .listen
on the Tooltip.
instance. @martinklepsch
it’s just the transition described in the material ui guide - https://material.google.com/components/tooltips.html#tooltips-interaction
@lwhorton is there a demo iof the behavior somewhere?
here is a good one http://react-toolbox.com/#/components/tooltip
I just did something basic with setTransition
, works pretty nicely
so the transition is mostly the scaling of the tooltip?
@lwhorton show me 🙂
Contextual question: how do you usually make transitions work in re-frame? Is there some common/useful pattern?
@nilrecurring you have much the same problems/opportunities as general React
not aware of too many patterns, but Redux probably has some good stuff