This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-27
Channels
- # beginners (35)
- # boot (111)
- # cider (12)
- # clojure (295)
- # clojure-android (2)
- # clojure-dev (12)
- # clojure-dusseldorf (9)
- # clojure-finland (1)
- # clojure-greece (7)
- # clojure-italy (24)
- # clojure-norway (1)
- # clojure-poland (7)
- # clojure-russia (14)
- # clojure-sg (1)
- # clojure-spec (29)
- # clojure-uk (25)
- # clojurebridge (1)
- # clojurescript (157)
- # clr (3)
- # cursive (3)
- # datomic (55)
- # docker (6)
- # hoplon (4)
- # juxt (11)
- # leiningen (13)
- # luminus (1)
- # lumo (3)
- # mount (1)
- # off-topic (47)
- # om (43)
- # onyx (35)
- # re-frame (33)
- # reactive (2)
- # reagent (4)
- # rum (3)
- # schema (5)
- # specter (5)
- # test-check (63)
- # vim (15)
- # yada (14)
@danielcompton so in view you would have something like this: (let [view-data (or (re-frame/subscribe sub-stepN) … (re-frame/subscribe sub-step1))] [render-data @data]) ?
main question is which sub results view should render
hard to say without seeing your exact case, but I guess what you describe there could work?
I need to try that approach, I’ll share results
I need to understand the optimal flow of events through the system, next. I guess that means I need to go back to the docs.
my current problem: user interacts with Big Stateful JS Object (openseadragon). This triggers a callback (image loaded successfully) into my app. I love how easy all of that is. Should that callback event then trigger the dispatch of a re-frame event, and then subscribed UI elements update themselves?
@mikepence That sounds reasonable to me!
[rcc/v-box :children
[[rcc/v-box :children []]
[:pre "Repl Box Info and sone more more more more more text"]
[rcc/input-text
:model "Original"
:width "100%"
:on-change (fn [e])]
]]
in the above code, the input text box is shorter than the :pre fieldhave you tried styling the element (input) with CSS?
Assuming that width is expressed as % of parent. So, what width does v-box have?
forget what i said
i see
not sure
should at least be as wide as :pre el
(defn repl-view []
[rcc/v-box :children
[[rcc/v-box :children []]
[:pre "Repl Box Info and sone more more more more more text"]
[rcc/input-textarea
:model "Original"
:width "1000px"
:on-change (fn [e])]
]]
)
best is to inspect this in Chrome I would think.
Ahhhh of course! css styling is emdedded within a :style {…} map. I hadn’t spotted that in your code. Perfectly normal for reagent.
In fact, standard reagent (don’t know about re-com) needs all DOM element attributes and properties to be inside a map. Example:
[:h1 {:model :original :on-change f :style {:background :red}} "Click me!"]
.You need to embed your element props and attrs inside a map.
When non-nil values are returned from re-frame/reg-event-fx
they end up overwriting injected cofx. Is that intended behavior?
does something like this work or do i need to destructure after the fact?
(let [{:keys [id name image]} (subscribe [:person person-id])] (println @name))
http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/splits is thedre a way to say "the right panel will always be atleast 10% of the width" ?