This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-23
Channels
- # admin-announcements (1)
- # arachne (3)
- # aws (1)
- # bangalore-clj (2)
- # beginners (209)
- # boot (81)
- # capetown (2)
- # cider (16)
- # clara (13)
- # cljsjs (16)
- # cljsrn (6)
- # clojure (217)
- # clojure-czech (1)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-korea (3)
- # clojure-russia (3)
- # clojure-sg (3)
- # clojure-spec (104)
- # clojure-uk (23)
- # clojurescript (7)
- # component (7)
- # cursive (18)
- # datomic (12)
- # devcards (34)
- # dirac (17)
- # editors (3)
- # emacs (1)
- # events (1)
- # hoplon (62)
- # immutant (12)
- # incanter (1)
- # jobs (1)
- # klipse (2)
- # ldnclj (1)
- # luminus (1)
- # mount (1)
- # off-topic (8)
- # om (50)
- # onyx (46)
- # parinfer (5)
- # pedestal (4)
- # perun (2)
- # reagent (1)
- # rum (1)
- # schema (5)
- # specter (30)
- # untangled (5)
- # vim (46)
@laforge49 im using hoplon ui where i pretty much only need elem
, but i still need some hoplon stuff regularly, so paste this to the top of my hoplon/ui .cljs
files:
; Establish project-wide NS aliases and refer most common symbols
[javelin.core :as j :refer [cell cell= defc defc= cell-let with-let]]
[hoplon.core :as h :refer [defelem when-tpl if-tpl case-tpl for-tpl]]
[hoplon.ui :as hui :refer [elem]]
[hoplon.ui.attrs :refer [+ - * / c r pt em px d]]
[material.ui :as mui :refer [container row paper]]
you can find more details about how to make cursive's lein support friends with boot here: https://github.com/cursive-ide/cursive/issues/692#issuecomment-257907140
someone has an example for fileupload from hoplon->castra?
@peterromfeld you mean just upload to the backend, not to S3 directly?
i have some hoplon+castra+s3 upload, but A. it's not isolated yet into a library B. it doesn't work with temporary credentials acquired from the instance metadata service, just with static ones BUT here is some code which can give you some ideas: 1. https://github.com/hoplon/ui/blob/master/src/hoplon/ui.cljs#L387-L401 2. https://github.com/martinklepsch/s3-beam 3. AWS v4 signature support for s3-beam: https://github.com/martinklepsch/s3-beam/pull/36
Am I correct in my understanding that hoplon/ui will be replacing hlisp as the recommended way to build views in the future?
@grant I don't think that is the case, hoplon/ui is an alternative. You can always use hlisp by itself.
So are they two layers in the same cake? They seemed to have overlapping concerns. But that could be my misunderstanding, I'm just starting to look at them.
I was not thinking that hlisp would go away or be deprecated, just that you'd generally use one or the other, not both.
@micha @alandipert I am doing a Hoplon talk for ClojureRemote this year, would either of you guys be interested in that?
i will definitely watch it if that's what you mean!
@alandipert: cool, but I'm actually wondering if either of you or anyone else would like to be involved 😜
I have an element which has various elements toggle on or off based on my reroute cell. I have another element whose size will depend on the size of that first element. Not wanting to get into a race condition, is there something I can watch which tells me when an element has changed?
at the very least i'm happy to be a prototype audience and give you notes
also down to be involved somehow, would be flattered. altho i'm weary of A/V mechanics for multiple presenters
@laforge49 usually you want to just hook up whatever causes the toggling to a cell
@flyboarder sorry I'm on the road but that sounds great, let me know if there is anything i can help with
yup and the add-watch does that. But the problem is a race condition. I want to get the size of the displayed element. Size is only valid I think when the element is visible. so I want to look at the size AFTER the element is displayed. Of course, I am not sure this is a problem. Verifying the issue is my next step I guess.
So my hope @micha is to update the height of the element after a subelement has become visible.
I have a header element displayed at the top of the page. Its height varies. And I need to know when the height changes so I can change the size of the elements under it.
What confuses me is having hoplon sitting between my code and the jquery toggle. I suspect there is no way to get hoplon to do a callback when a toggle competes.
@laforge49: that's what javelin cells are for you can have custom attributes that fire when the cell changes
So after the cell changes, do I put in a delay before I grab the element's new height? I don't want to grab the height when the cell changes, but AFTER the effect of the toggle that is triggered by a change to the cell.
Or are you saying that I can change the value of a cell as an effect of the completion of a toggle???
Easiest would be if there were some js event that was triggered when the height of an element changes. But I can't figure that one out.
You can attach a cell to an object property and watch it change look for prop-cell @laforge49
OK. So is their a property on a dom element which changes when the element is toggled?
I would just make a simple cell and toggle it then have another one what watches for the that state
You can independently toggle the cell and watch for the change with another formula
So the css display property is apparently updated when a dom element is toggeled by jquery.
And I can attach a cell to a property. Now I just need to know how to access the css display property of a dom element.
That state should be stored in a cell somewhere and then toggle the element based on that cell
Yeah, I have no problem toggling an element. I just want a cell that synch with the display property. So thanks @flyboarder for pointing out prop-cell. 🙂
So usually you would store that in a cell and just reference it within the CSS attribute
Like (def my-state nil)
(my-elem :toggle my-state :css (cell= {:some-class my-state}))
Or something like that @laforge49
You seem to be fixated on the toggling of an element, whereas my concern is getting the height of an element AFTER it has been toggled, not while it is being toggled.
Ah i see, yeah then the property cell is what you want I think @laforge49 sorry I thought you wanted the toggle state
Is ok @flyboarder. Again, thanks bunches!