This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-30
Channels
- # aws (5)
- # aws-lambda (2)
- # beginners (29)
- # boot (5)
- # cider (3)
- # cljs-dev (3)
- # cljsjs (2)
- # clojure (112)
- # clojure-austin (1)
- # clojure-brasil (2)
- # clojure-italy (9)
- # clojure-nl (2)
- # clojure-russia (5)
- # clojure-spec (49)
- # clojure-uk (41)
- # clojurescript (157)
- # core-logic (5)
- # crypto (1)
- # cursive (12)
- # data-science (38)
- # datomic (31)
- # emacs (3)
- # events (2)
- # garden (3)
- # graphql (10)
- # immutant (4)
- # jobs (3)
- # juxt (5)
- # klipse (1)
- # luminus (3)
- # off-topic (40)
- # om (1)
- # onyx (39)
- # other-languages (7)
- # protorepl (3)
- # re-frame (40)
- # reagent (60)
- # ring (8)
- # ring-swagger (14)
- # shadow-cljs (159)
- # spacemacs (1)
- # specter (6)
- # uncomplicate (3)
- # yada (2)
[rc/v-box
:width "200px"
:style {:background-color "yellow"}
:children [[rc/h-box
:style {:-webkit-flex-flow "row wrap" :flex-flow "row wrap"}
:children [[rc/box :width "50px" :height "30" :margin "4px" :style {:background-color "red"} :child ""]
[rc/box :width "50px" :height "30" :margin "4px" :style {:background-color "red"} :child ""]
[rc/box :width "50px" :height "30" :margin "4px" :style {:background-color "red"} :child ""]
[rc/box :width "50px" :height "30" :margin "4px" :style {:background-color "red"} :child ""]
[rc/box :width "50px" :height "30" :margin "4px" :style {:background-color "red"} :child ""]]]]]
@gregg for reference the children of the h-box
are hyperlinks
. I've tried box
'ing them before making them children,
Should I have to specify a fixed width to get the row-wrap functionality? That seems odd.
this probably displays my ignorance of flexbox generally, i just assumed it would work out its own width
Re fixed-width layouts, I would say no. The fact that you don't need to specify the width of the h-box
itself demonstrates this. There just needs to be a component up the parent chain than bounds the h-box
. It could even end up being the body
component itself. You may have seen my favourite Flexbox guide (https://css-tricks.com/snippets/css/a-guide-to-flexbox). It has an example in there that shows what I am trying to describe. The one with the orange boxes number 1 to 6
@gregg you're probably discussing with an idiot here... i have had a look at that guide (in fact i was referring to it when trying to figure out how to get wrapping to work in the first place). I guess I assumed that, based on the size of the window, the body
at least knows what its size is. This kind of stuff is not my milieu (as I probably didn't need to tell you). I suppose I can set a specific width
on the body
but that seems inflexible.
Yeah, I wouldn't set a width
on body
, but I suspect you now have the key info to get a result which is hopefully acceptable
actually can you tell me what "bounds" means in your statement above? "There just needs to be a component up the parent chain than bounds the h-box
."
since any parent container is a boundary i assume you have a specific meaning for 'bounds' in this context
I guess bounds is a loose term and I probably can't give a complete and concise explanation, because there are a myriad of CSS styles that can affect the ultimate width of an element. It sometimes does my head in as well. Some elements can end up spilling past their parents width (because of the content they contain), and then you have the overflow style that introduces scroll bars (or prevents them) and margins and so on. But ultimately there is some parent that is going to affect the width of that h-box
. It could be the immediate parent as in my example where we have specified one, or if it doesn't have a width, it could be another parent which either has a specific width or has an implicit width because of its parents and where it falls in the DOM hierarchy. Fun stuff indeed.
I'm having some real trouble maintaining my re-frame-tests because of the https://github.com/Day8/re-frame-test/issues/13 has anyone got any good ideas for solving this? My clear-timer hack didn't work too well. I imagine that 'pure re-frame' would fix it but I'm guessing that's probably not on the cards
@gregg where possible i want my app to use the full-width of the screen but, of course, all screens are different
at the top-level i have a v-box with width: 100%
and it sounds like what i have to do is choose a fixed-width here
perhaps this is my naivety but i had assumed that if i specify width: 100%
the box will fill the width but will know what width it is i.e. it will know how wide a boundary it throws around it's contained items. It sounds like what you're saying is that this assumption is wrong. That there must be some fixed-width component in the layout somewhere to provide a definite bounds otherwise things like wrapping will not function within the layout.
@danieleneal happy to clarify https://github.com/Day8/re-frame-test/issues/13 here
But see my latest
Thanks!
Github issue probably the best place for it, so others with similar queries will stumble upon it. Slack answers get lost forever in the mists of time.
@mikethompson thanks for the quick response! Really appreciate it:)
will try the purge-event-queue thing now
Is there an annotated example like ToDo MVC that deals with talking to a server? HTTP requests or even better some websocket integration?
@orestis There might be something in https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
@mikethompson thanks! https://github.com/staltz/flux-challenge/tree/master/submissions/jelz seems to have both websockets and http/AJAX calls but as a newcomer to the entire ecosystem it would be nice to get a “sanctioned” example. I’ll keep exploring 🙂
Other nice re-frame samples https://github.com/polymeris/re-frame-realword-example-app https://opensourcery.co.za/2017/02/12/using-semantic-ui-react-with-re-frame/
@mikethompson re: the test stuff earlier, I was just having a look at run-test-async
, and saw it relies on make-restore-fn
under the hood- I was wondering if perhaps make-restore-fn
should snapshot the queue, and replace it? Calling purge-queue
inside make-restore-fn
seems like it might not be exactly right. Or is it? I don't know 🙃