This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-17
Channels
- # admin-announcements (4)
- # beginners (21)
- # boot (37)
- # cider (41)
- # cljs-dev (3)
- # cljsjs (11)
- # cljsrn (4)
- # clojure (31)
- # clojure-austin (21)
- # clojure-belgium (30)
- # clojure-canada (1)
- # clojure-dusseldorf (2)
- # clojure-poland (7)
- # clojure-russia (20)
- # clojure-taiwan (1)
- # clojure-uk (45)
- # clojurescript (90)
- # core-async (8)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # dirac (6)
- # docker (1)
- # emacs (8)
- # hoplon (102)
- # ldnproclodo (2)
- # lein-figwheel (3)
- # leiningen (13)
- # off-topic (9)
- # om (54)
- # onyx (4)
- # other-languages (101)
- # pedestal (8)
- # planck (2)
- # protorepl (1)
- # re-frame (15)
- # reagent (13)
- # spacemacs (4)
- # untangled (126)
- # yada (4)
related only to lispcandoit http://www.ebay.com/itm/222120395083
@onetom: I'm kind of late but afaik clj-webdriver with taxi api is best for more realistic scenarios with the problem of flakier tests. Use phantom if you can. If kerodon is enough for what you need you should go for it as it's simpler and less flaky imo.
@alandipert: I was wondering other day about using hoplon as a library without the hoplon boot task, thanks for https://github.com/alandipert/embedded-hoplon-example
@mynomoto: thanks!
do you have a way to deal with the super long and ugly error message of (click "#some.bad.selector")
?
@mynomoto: thanks, glad you like it
When creating a static list in hl, do you use loop-tpl
or do you prefer for
, map
, etc?
i tend to use loop-tpl only when the elements will change
avoiding the ceremony when i can
aaaargh
did we merge if-tpl
when-tpl
cond-tpl
and case-tpl
without creating any documentation around tpl
s in the wiki?
aaaah cool
somehow i missed that
could probably use more links to it
feel free to place one wherever you were expecting it 🙂
i’m moving things around a bit atm
awesome
i noticed the article titles and intros make perfect sense, but only after you have read them
like “Attribute multimethods"
how would someone know that’s how JS events work?
full marks for accuracy
but a first-timer would have to re-read that a few times to “get it"
@alandipert: what you said earlier is the tl;dr of templates i think
it’s about dynamically rebuilding the DOM as efficiently as possible
whereas defelem/on!/do! are about setting structure and tweaking attributes
that there would even need to be a difference between those things did not occur to me until micha spelled it out one day 😛
@alandipert: WIP https://github.com/hoplon/hoplon/wiki/Dynamic-DOM-manipulation-(Template-Macros)
i gotta crash now
i’ll work on it some more later
I’d like to get some feedback on this. This is something I’ve been doing with a project I’m working on, and I’d like to know if this is an antipattern or something. Regardless, I’m putting it here ‘cause it’s possible 😁 https://github.com/hoplon/hoplon/wiki/Cookbook#lenses-with-javelin-rpcs
and I have a few cells that I want to update based on the updated value from the first cell (whenever it changes)
I am looking for a way to connect those 4 cells so the change in options
cell triggers (calculate-result @options results errors loading)
I was thinking about add-watch
but I am wondering if there is a more elegant way to do it
formulas don't make sense there because while the async request is in flight the value will be "wrong"
formulas sort of unite all the cells in the graph into a single entity that is internally consistent and updates atomically
has there been any attempt in hoplon to make a super magical form generator? starting to work on something now that can take vector of maps describing the fields a form should have and then create all the cells necessary to make it into a "hoplony-form". Something like the form validation demo but a bit more general?
not a form generator really, just powerful specialized custom elements used in combination with a state machine (for managing state with respect to the backend, validation, etc) and using dynamic vars to establish local contexts
i had wanted to remove some repetition from forms for awhile but kept putting it off, but figured i couldn't be the first one to want something like this
all the things in the form/*
namespace use dynamic bindings from the form/with-form
macro
it knows which cell to bind itself to by looking at a dynamic var bound by the form/with-field
macro, and it knows how to display validation state by looking at the state machine that's bound by the form/with-form
macro
they establish a context that doesn't need to be passed explicitly down through all elements in the stack
also notice how most of the custom elements in there don't need any attributes or other configuration
https://app.adzerk.com <-- the login page
cool i think I'm getting it. so basically the form/ functions all internally use a dynamic *form-machine or field to do all the state swap!ing and such?
and (:foo (:data form-machine))
would be the cell containing the contents of the input control for the :foo
field
similarly (:foo (:error form-machine))
would be a cell containing validation error message for the :foo
field of the form
so now all the elements that are aware of form machines can configure themselves with the form machine from *form-machine*
if there is one
but you could override that with the :form-machine
attribute on the individual elements if you want to
it will turn red and have a message under it like "this field is required" or something
so the validation-field element can extract the :email
field from the form-machine's errors or whatever
that also knows which cell to bind its contents to by looking in the with-field dynamic context
and similarly the validation-message element gets its text content from the errors cell of the form machine, using the field bound by with-field
@jjttjj: here is an example of the form
namespace https://gist.github.com/micha/7a734317c1fbf8c93661e38788c44a82
one thing to notice there is that you need to make lexical bindings that capture the dynamic vars in the closure
like here: https://gist.github.com/micha/7a734317c1fbf8c93661e38788c44a82#file-form-cljs-hl-L47