This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-08
Channels
- # aws (3)
- # bangalore-clj (1)
- # beginners (47)
- # boot (137)
- # cider (1)
- # cljs-dev (67)
- # cljsrn (7)
- # clojure (122)
- # clojure-argentina (5)
- # clojure-berlin (4)
- # clojure-czech (12)
- # clojure-france (27)
- # clojure-italy (9)
- # clojure-russia (88)
- # clojure-spec (44)
- # clojure-uk (157)
- # clojurebridge (2)
- # clojurescript (236)
- # datomic (5)
- # devcards (3)
- # dirac (23)
- # emacs (13)
- # hoplon (29)
- # incanter (1)
- # leiningen (41)
- # microservices (1)
- # off-topic (78)
- # om (145)
- # onyx (13)
- # parinfer (8)
- # pedestal (4)
- # planck (15)
- # protorepl (1)
- # re-frame (72)
- # reagent (25)
- # ring (2)
- # specter (23)
- # test-check (9)
- # untangled (106)
- # vim (8)
- # yada (1)
@dvorme: welcome!
@jumblerg: did you have any thoughts on SVG in UI? @vigilancetech was asking about it, thought I'd get your opinion.
there are several ways to go about data visualization; i have some longer term ideas that would basically generalize all the svg functionality into the elem as well, eg you could pass an elem a path and it would just do the right thing.
but svg elements are a bit more sane than html elements; the thing to do, while working with ui, is to use the existing svg fns exposed by hoplon, probably.
the issue right now is that elem expect their kids to be elems, so i need to introduce a new kind of elem, like an html
, svg
, or hoplon
, that will allow the hoplon's core low lovel functions to be used.
another way to do this is to use innerHTML to evaluate a string of svg or html markup to dom elements.
@jumblerg so any known issue with using the existing hoplon svg elements?
yes, if you mix those in any hoplon constructors, whether they return svg or html elements, ui
will break. the reason for this is that layout, in ui, is done by a parent to its children; these children consequently need to implement, in effect, an interface the parent can use to manage them.
in practice, however, we could permit these to be used at the terminal elem nodes of the dom; i need to reintroduce a construct for this purpose.
@jumblerg : hmm this seems like more work than just implementing the svg element then huh
actually, i think it may only require creating a new ui component without the align
, pad
and gutter
middlewares that are user for layout: https://github.com/hoplon/ui/blob/master/src/hoplon/ui.cljs#L179-L227
@flyboarder: then compose them together just like the elem
i think that may be enough to allow hoplon element functions, like the svg constructors, inside.
Interesting!!
this did require some changes to the ordering of the middlewares, so there's a decent chance it may have broken some things which are difficult to detect without robust automated tests in place - but that's why this libary is experimental, no matter how many times @alandipert tries to tell people otherwise.
sample usage
(hoplon.ui/elem :s 400
(hoplon.ui/html :s (r 1 1)
(hoplon.core/div "i'm a plain html div element. i could also be an svg element.")))
@flyboarder Thanks!
@vigilancetech: ^^ jumblerg made some changes today :)