This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-23
Channels
- # beginners (4)
- # boot (297)
- # cider (12)
- # cljs-dev (3)
- # clojure (49)
- # clojure-brasil (1)
- # clojure-quebec (1)
- # clojure-russia (36)
- # clojure-sg (4)
- # clojure-spec (21)
- # clojure-uk (3)
- # clojurescript (28)
- # cursive (3)
- # datascript (2)
- # datomic (3)
- # hoplon (63)
- # re-frame (1)
- # spirituality-ethics (2)
- # test-check (1)
- # testing (1)
- # yada (1)
@kenneth: i don't but i bet i could help, what's the widget in question?
@jumblerg: Howdy! I've been hacking around applying UI and having fun with it! I feel a bit shakey, like i'm probably still missing some basic CSS and Hoplon things are absent (I haven't tried to add to the api yet), but It feels like a very direct and responsive way to code up styling!
I've got a little repl function going so I can experiment and prototype in any file and the results show inline in a heads up display in the normal layout/page context. That kind of visual repl canvas is really exciting as a learning and creative platform (thx Hoplon! :)
@jumblerg: I'm currently having trouble getting breakpoints working does this look right? (elem :sh (b :h (r 1 1) 750 (r 1 2)) "text")
I get error: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
@chromalchemy: the breakpoint fn implementation has changed. you can now do:
(elem :sh (b (r 1 1) 750 (r 1 2)) “text”)
without the :h
. the horizontal orientation is the default.Cool. working now! It was the :refer-hoplon :exclude
stuff getting in the way
I ran into trouble trying to refer stuff using the ns+ config, but I haven't tried it since it was update last.
@jumblerg: Is there a basic way to do "clipping" on a box or image. Basically overflow: hidden on a fixed or max size?
ah, yeah, you were trying to pass it to the element constructor instead. always fun when that happens.
Those might not have great browser support. Background positioning would do it for images. But that might be redunant to the general UI box model, which treats images with backgrounds as first class elements.
What about overlapping elements. z-index?
It would definitely be nice to be progressive. Maybe we can fill in the blanks w js/jquery solutions. Polyfill-style..!
the biggest problem we have right now is general support for elements over other elements, overlays, etc.
Hmm. Is that why :o
opacity doesn't seem to work for me?
haha, gotcha
there are some hackish things i’ve experimented with and used on occassion in the codebase right now, but i’m reticent to advertise them.
the challenge is implementing a layering scheme that accommodates both (1) the notion of depth and (2) implicit sizing where an elem can grow based on the size of its content.
Glad your thinking about it. I think a layered layout functionality would be essential for many common approaches to visual density, flourish, etc
i was wondering what the consequences might be if we required all the sizes to be explicit
like Anti-responsive..
but take something like a pinterest style layout where you want the cards in the columns to adjust based on the size of the image, that would be problematic
common vertical text too?
an element would show a scrollbar when the flow of children pushed below the explicit height, or alternately clip the content
Yeah, I think this is a fundamental tension or tradeoff. When you want to design for print and everything is explicit, there is so much control and you can nuance and gloriously fine-tune everthing. The web was a different beast and that set of aspirations got almost tossed out. And we realized it wasn't really graphics we were dealing with, but data and ux programming patterns, which tend to look rather generic.
the underlying issue is lack of composeability due to the ad hoc nature of the various layout and positioning schemes in the browser.
True. You're really climbing the mountain to implement more sane primitives out of this stuff
could clojure functions truncate data themselves instead of using the browsers overflow mechanisms?
Seems like you've come a nice way. Dynamic layout and animation are some heady space. We believe lisp can do it.. hope to get out of this tarpit soon 🙂 Thanks for the advice.
If you dont mind I'll drop some more questions as I find them, and maybe you can answer later.. (unless you want me to post to github, etc)
ty! and i think we’re almost there, it is just a question of how many scenarios we have to special case to round out the edges.
Is there any way to get blank lines in the markdown function? (to separate paragraphs)
Is there anything for absolute positioning within an element (to attach something to side of a box)?
Do any of the hoplon dynamic do! attributes work on UI elems? https://github.com/hoplon/hoplon/wiki/HTML-attributes-and-JS-events-(on!,-do!)
Is there a way to attach a class or id string on an elem to help inspect and debug stuff in the browser console?
Are css transitions on the roadmap? (they are GPU accelerated) Or should simply look towards jquery, etc for animation?
What is the :hidden
keyword for, if there is no :overflow :hidden
?
Can I use jquery to style elems if there is not currently a hoplon/ui attribute property for something? Are there any special precautions for Hoplon On/Do stuff with ui/elems?