This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-26
Channels
- # aws-lambda (1)
- # beginners (71)
- # boot (70)
- # bristol-clojurians (1)
- # cider (2)
- # clara (13)
- # cljs-dev (96)
- # cljsjs (6)
- # cljsrn (5)
- # clojure (74)
- # clojure-android (3)
- # clojure-austin (4)
- # clojure-dev (10)
- # clojure-russia (6)
- # clojure-spec (28)
- # clojure-uk (128)
- # clojurescript (64)
- # cursive (2)
- # datascript (18)
- # datomic (116)
- # dirac (1)
- # emacs (12)
- # events (10)
- # hoplon (109)
- # jobs (1)
- # jobs-discuss (21)
- # leiningen (2)
- # luminus (6)
- # off-topic (19)
- # om (21)
- # om-next (5)
- # onyx (4)
- # parinfer (29)
- # perun (20)
- # re-frame (53)
- # reagent (21)
- # remote-jobs (5)
- # ring-swagger (2)
- # spacemacs (6)
- # untangled (42)
- # vim (5)
@qqq i haven't used the central dbs from other frameworks, but FYI you can stick a datascript db in a javelin cell, dunno if that helps...
Adding a datascript db on a javelin cell works fine, https://github.com/mynomoto/github-client uses it. App is deployed at: https://mynomoto.github.io/github-client
so the other difference between Hoplon and re-frame is we have to fight for every new user here 🙂
FAQ:
* Javelin has cells, but Reagent has ratoms - isn't it the same thing?
* Re-frame single-source-of-truth atom is awesome - why doesn't Hoplon have something like it?
* Why would I use Javelin if everyone knows React is the fastest/best known anyway?
* In my app I have a list with 1e12 elements, will Hoplon handle that?
* I hate macros, is cell=
a complicated beast that will break all the time?
* I can integrate 3rd party Javascript easily into React apps using onComponent*
callbacks - how does Hoplon do it?
* Boot is weird - can I build Hoplon apps with other tooling?
* Does Hoplon have a component toolkit library (like re-com)?
* I want to use Hoplon, but it forces me to make too many decisions - can you make some of them for me, please?
haha, honestly i learned a lot on the final point @dm3 but i get that's not how most people feel
@dm3: I used to use haskell/reflex and almost implemented my own FRP, so complexity / decision making isn't the problem -- what re-frame wins out for me -- is existing libraries, like re-com and re-frisk
re-com, I think, can be totally stolen -- I believe it's backed by hiccup, not react -- so it should in theory get hoplon to use re-com
or, write better docs for Hoplon/UI. I look at http://re-demo.s3-website-ap-southeast-2.amazonaws.com/ -- I know what I'm getting. I look at hoplon/UI, no idea what the components look like.
@qqq: a valid complaint! documentation is definitely lacking; getting the api nailed down with a layout scheme that's rock-solid and covers 100% of the cases has been the priority.
i'm happy to share snippets from some projects i've worked on, though, if you're interested and would find it helpful.
i think we have most of the major problems worked out; i just need to find the time to pull them together into a single branch and put together a production release with some solid docs.
also hoplon ui seems pretty opinionated
i'm not sure i'm totally ready to abandon css
I'm okay with opinionated -- I'm looking into building my etire UI in either SVG or WebGL (rendering text using multi channel signed distance fields)
but it's not being able to see the elements w/o installing it that seems like suboptimal marketing
@qqq: marketing hasn't been an interest of mine up to this point; candidly, i've been creating the interface for use in my own projects - i just happen to be os-ing it along the way.
the comparisons are a bit unfair then; though someone earlier in the day brought up hoplon/ui as hoplon's answer to reframe/re-com, so I've been comparing them since 🙂
not trying to criticize your work; mainly still in the earlier mentality of debating with someone on "why sin't hoplon as popular as re-frame"
at some point this may change, but it isn't a priority for me right now. i'm happy to answer questions as i'm able though. i think working code is the best example there is though.
@qqq in the past, when i've asked about popularity in this chat, it wasn't really seen as a primary goal
because if it is, marketing + docs across the board should be a big deal IMO
the same question could be more generally asked of clojure. i think it's the best thing out there for building web apps, but most people don't seem to notice. i'm fine with this. 🙂
well, like everything, it's only a problem if you have a specific outcome you're trying to achieve
that said, an faq would be nice :3
we do see the same questions over and over in this chat
hoplon/ui is also early stage. i do think it has the potential to be the future once we get to a 1.0 release; i'm convinced this general approach (if not my specific solution) is the right way to go about building user interfaces in the browser.
and i'm keen to start playing around with it too 🙂 just, not yet convinced that i should put all my eggs in your basket
however, we're probably a couple solid weeks of work away from being able to remove them.
i'm definitely looking forward to putting a production release out there so i can encourage people to use it instead.
well, i've heard nothing but good things
i've been maintaining a growing library of my own hoplon-based components for my own stuff
it will be interesting to see how they might work together, or if i should port my work, etc.
yeah, i suspect they will. i think once we get the ui project out the door, then we can start building stylistically opinionated toolkits on top. the components you're accumulating might be really helpful for this.
the components i've been making really rely on the concept of cells
like i made one that uses a ResizeObserver polyfill, and you pass it width/height cells that it keeps in sync with its dimensions
so you can hook that up to children, etc.
like, a lot of them don't have much to do with styles, but managing cells and data
incidentally, the goal with ui is actually be unopinionated. it is simply exposing the existing object model that's stuck behind a rather crummy api that was created for documents with an alternative api that offers a few general primitives appropriate for applications.
well that's good then
sounds ambitious
but cool
it has no visual designs whatsoever; the components are invisible by default until you stylize them.
ah cool, so that sounds more like what i've been doing
like layouts and things?
it also lacks things like drop down menus because these incorporate stylistic and ux concerns; rather, it has a pick list that could be stylized as a list of radio buttons, a drop down, or something else.
it takes all the different positioning and layout schemes defined in css that come together in ways that are often hard to predict and replaces them with a single elem
that does it all in a more consistent way.
ok, yeah, so it's a more like a replacement/augmentation of the box model?
it defines it's own box model, using combinations of html elements internally to implement it.
yes, well in that case you really will need good docs 😛
basically, you tell the ui box model that you want a vertically centered elem, and underneath, it does the stuff a designer might do to vertically center an element.
well, i gotta grab some dinner
all layout can be done with just a few attributes, the :s
ize (which is set on the element directly), and the position attributes :p
adding, :g
utter`, and :a
lign (which are set on the parent to position the children).
that's pretty much all you need for the vast majority of cases. should be simple to document.
hey, is there a way to deal with this situation?
(defelem foo
[attributes children]
(div
(if-tpl pred?
(div attributes children)
(span attributes children))))
the problem being, children is "consumed" by div
is there a way to clone or somehow share that so the elements can appear in span as well?
i just tried this
(let [logged-in? (or logged-in? auth.state/logged-in?)
clone-children (fn [] (map identity children))]
(h/div
(h/if-tpl (j/cell= logged-in?)
(logged-in attributes (clone-children))
(logged-out attributes (clone-children))))))
didn't seem to help?
that's what i was thinking
not ideal
that sounds right
AFAIK calling the same element will only reset the attributes/children to whatever you provide
@thedavidmeister I started using UI a while back, the ran into an obstacle and had to move back to CSS for a while.
Hoplon does give you nice tools that make abstracting over CSS a fun challange. I was using Basscss for basic classes, Garden to generate my own classes, and :css (cell= {...}
For direct and dynamic styling. But it was a bit confusing to jump back and forth between all this.
Now with newer versions of UI, you can pass classic Hoplon elements (like (Div ...)
into a UI Elem, And those can be styled like always with the above methods. So I am locked into usin UI at least as a global window container, but after that I have an escape hatch into traditional CSS, frameworks. Or maybe only a specific custom element has CSS encapuslated in it for things UI doesn't support yet, like transparency and z-axis, local to that element container.