Fork me on GitHub

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


@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
  (let [something 324]
      [rui/flat-button ...])))


any suggestions how to fix this?


@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


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 -


@lwhorton is there a demo iof the behavior somewhere?


I just did something basic with setTransition, works pretty nicely


i can’t figure out that transition docs either - just no examples anywhere


so the transition is mostly the scaling of the tooltip?


yea, it just scales from the target out to its full size


i may have just gotten it working, a painful hour later. 😕


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