This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-10
Channels
- # alda (28)
- # announcements (7)
- # beginners (79)
- # boot (62)
- # cider (11)
- # cljsjs (12)
- # cljsrn (8)
- # clojure (111)
- # clojure-art (2)
- # clojure-austin (5)
- # clojure-conj (3)
- # clojure-dev (54)
- # clojure-japan (12)
- # clojure-russia (30)
- # clojurescript (354)
- # clojurex (5)
- # cursive (9)
- # data-science (58)
- # datomic (19)
- # editors-rus (3)
- # emacs (7)
- # events (2)
- # hoplon (5)
- # ldnclj (6)
- # lein-figwheel (14)
- # luminus (1)
- # off-topic (10)
- # om (191)
- # onyx (59)
- # re-frame (30)
- # reagent (74)
- # robots (1)
- # yada (19)
hey guys, in re-com
is there the equivalent of flex-wrap
?
@richiardiandrea: Currently h-box
(and v-box
) are hard coded to nowrap
, but we have had this request before and we will be adding this feature in an up and coming version
oh, no way to solve this then...maybe I will intercept the hiccup and try to modify it manually
I tried, it does not really work, but will try again
@gregg If you point me in the right direction I prefer to spend my time in contrivuting than in patchworking :)
Thanks for your offer to contribute We do currently have a version in alpha and are hoping to release it shortly, within a week, let's say. If you need something now, you could fork it and create your own version until the next version arrives. Our intention is to add a new boolean arg, called :wrap?
This is the line that would need to be modified: https://github.com/Day8/re-com/blob/master/src/re_com/box.cljs#L302
Ah is on master then, great, fltonorrow first thing I will work on it, forking if necrssary
I will be your alpha tester
I just had a quick play, and it appears my theory does work. Paste this code in somewhere...
[h-box
:gap "10px"
:width "300px"
:style {:border "dashed 1px red"
:flex-flow "wrap"}
:children [[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]
[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]
[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]
[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]
[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]
[box :style {:background-color "lightgrey" :padding "20px" :margin "4px"} :child "Box"]]]
Change the "wrap" to "nowrap" to go back to the default h-box
behaviour (or just remove it)
weird I did it and nothing happened.. maybe it was on another container, will try it out tnx!
@roberto i think im following, can you expand on the flag bit
@mike, re-frame does not use om
I think om next now has enough of a story carved out to give you a competing set of features
i.e. there no reason to overlay re-frame on om
is it only suitable for single page apps? if I have a component which loads some data from the server, would it be overkill to use re-frame?
nope, it would be a good candidate, most SPAs outside of games, and the obligatory todo list using local storage, load and sync data from a remote source..
@richiardiandrea: good news...you're welcome. Intriguing looking app
@gregg, a lot of questions 😄 does re-com
support fluid colums?
in the h-box I cannot specify the col number...but I can implement a lil' algo to modify the :children
at runtime I guess
@richiardiandrea: I presume you're referring to the Flexbox :order
property. It's the same as :flex-flow
. It's just one of those properties we don't expose. But unlike :flex-flow
we have no plans to expose it, which means you can still access it via the :style
argument.
because order gives you the sequencing, I would like to simulate flexible columns
2 for website, 1 for mobile
probably this? -> http://flexboxgrid.com/
ah ok, I think I misunderstood something, prbably using size 1 1 50%
would solve, then media queries and that's it ! 😄