Fork me on GitHub
#re-frame
<
2015-11-10
>
richiardiandrea01:11:58

hey guys, in re-com is there the equivalent of flex-wrap ?

gregg03:11:22

@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

gregg03:11:14

I have not tested this but you should be able to override it using the :style arg

richiardiandrea03:11:20

oh, no way to solve this then...maybe I will intercept the hiccup and try to modify it manually

richiardiandrea03:11:34

I tried, it does not really work, but will try again

richiardiandrea03:11:53

@gregg If you point me in the right direction I prefer to spend my time in contrivuting than in patchworking :)

gregg03:11:13

Thanks for your offer to contribute simple_smile 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?

richiardiandrea03:11:03

Ah is on master then, great, fltonorrow first thing I will work on it, forking if necrssary

richiardiandrea03:11:41

I will be your alpha tester

gregg03:11:00

I just had a quick play, and it appears my theory does work. Paste this code in somewhere...

gregg03:11:03

[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"]]]

gregg03:11:38

Change the "wrap" to "nowrap" to go back to the default h-box behaviour (or just remove it)

richiardiandrea04:11:29

weird I did it and nothing happened.. maybe it was on another container, will try it out tnx!

nowprovision06:11:37

@roberto i think im following, can you expand on the flag bit

mike06:11:52

doe re-frame only work with reagent, and not om?

nowprovision06:11:14

@mike, re-frame does not use om

nowprovision06:11:53

I think om next now has enough of a story carved out to give you a competing set of features

nowprovision06:11:08

i.e. there no reason to overlay re-frame on om

mike06:11:33

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?

nowprovision06:11:21

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..

gregg22:11:17

@richiardiandrea: good news...you're welcome. Intriguing looking app simple_smile

richiardiandrea22:11:29

@gregg, a lot of questions 😄 does re-com support fluid colums?

richiardiandrea22:11:28

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

gregg23:11:57

@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.

richiardiandrea23:11:06

because order gives you the sequencing, I would like to simulate flexible columns

richiardiandrea23:11:18

2 for website, 1 for mobile

richiardiandrea23:11:01

ah ok, I think I misunderstood something, prbably using size 1 1 50% would solve, then media queries and that's it ! 😄