racehub / om-bootstrap Goto Github PK
View Code? Open in Web Editor NEWBootstrap 3 Components built with Om.
Home Page: om-bootstrap.herokuapp.com
License: MIT License
Bootstrap 3 Components built with Om.
Home Page: om-bootstrap.herokuapp.com
License: MIT License
This is SORT of there, but is broken without the mixin.
Ideally this would use lein-voom to tag crazy version numbers.
Not sure when this happened.
The mixin doesn't seem to be getting set properly.
Executing the code at the branch https://github.com/ebellani/om-bootstrap/tree/dismissable-alert-timeout
will produce the exception
random.js:474 Uncaught TypeError: G__14921.set_timeout is not a function
which is the result IMO of this code
(defcomponentk alert*
"Renders the alert component with timeout mixed in. TODO: This
should probably use the component macro and be defined inline under
the alert function. No need for a separate name."
[[:data bs props children] owner]
(:mixins m/set-timeout-mixin)
(did-mount [_] (when (and (:on-dismiss bs) (:dismiss-after bs))
(doto owner
;; BREAK
(.set-timeout (:on-dismiss bs)
(:dismiss-after bs)))))
(render
[_]
(let [classes (t/bs-class-set bs)
dismiss-button (when-let [od (:on-dismiss bs)]
(d/button {:type "button"
:class "close"
:on-click od
:aria-hidden true}
"×"))]
(d/div (u/merge-props props {:class (d/class-set classes)})
dismiss-button
children))))
Hey, I'm using collapsible panels, and they're working great. However, I'd like to be able to see the current collapsible state in my component's render, as well as be able to define the collapsed state from the app state. I.e. I'm currently doing:
(defcomponent example [state owner opts]
(render [_]
(panel/panel {:collapsible? true
:header "Example"}
(dom/span {} "Content"))))
And I'd love to be able to do something like this:
(defcomponent example [state owner opts]
(render-state [_ s]
(panel/panel {:collapsible? true
:collapsed? (:collapsed state)
:header (if (:collapsed? s) "Example Closed" "Example Open")}
(dom/span {} "Content"))))
I.e. change the rendering based on the mixin's current collapsing state and change this state based on what may be defined somewhere in my app state. I've just spend an hour trying to achieve this by introspecting the react component's javascript properties, but I couldn't find a way to pull this off.
The possible solution I see is basically re-implementing panel
within my code base and exposing the functionality somehow. However, before I venture down that road, I thought I'd ask if there's something obvious that I've missed.
Thanks & Cheers,
Benedikt
I am using the input select inside of a render-state. It has a default-value of nil for the initial rendering. During the subsequent renderings the value I pass as default-value changes. However, the value is never selected in the dropdown. I would expect that during each rendering the default-value would be picked up and used.
Many of the schemas are really just present for documentation. Once we start getting beefier tests in here we're going to need do a pass that makes sure all schemas are correct and wrapped in om-tools.schema/cursor
where necessary.
God, this looks so good:
https://github.com/bhauman/devcards
Ideally we could style the devcard the same way as we have now; the win would be that all examples become interactive.
There's plenty of references in the documentation to om-bootstrap.server and that it should be very easy to start the development through that. Unfortunantly I cannot find this namespace in the source code. Is it possibly removed or not yet created?
I switched from using :default-value to :value to initialize my i/input and now they are initialized and read-only. How do I make them editable?
Everything worked until I upgraded to the latest Om and latest react. My Nav tabs are now a bunch of random numbers and about 30,000 nodes. Error messages in my console:
Warning: React.isValidComponent will be deprecated in a future version. Use React.isValidElement instead.
10574688_1565081647062540_1607884640_n.js:18108 Warning: transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information.
10574688_1565081647062540_1607884640_n.js:18108 Warning: createElement(...): Encountered component with a key
of null. In a future version, this will be treated as equivalent to the string 'null'; instead, provide an explicit key or use undefined.
10574688_1565081647062540_1607884640_n.js:18108 Warning: createElement(...): Encountered component with a key
of null. In a future version, this will be treated as equivalent to the string 'null'; instead, provide an explicit key or use undefined.
10574688_1565081647062540_1607884640_n.js:18108
When an item in a drop down is clicked the menu doens't close again. It might or might not be realted to #68 I sadly don't understand the drop down workflow enough to judge this.
It might be noted that :on-click is set with disabling event propagation to stop the page from navigating away without reason.
I get an empty screen.
Bootstrap allows right / left aligned nav bars. Currently it seems not possible since the nav
component handling the bars won't allow multiple ul
elements inside the collapsable div
. The following code introduces a :right
keyword in the nav children that splits the children in half when colapsable?
is set to true and creates two seperate ul
elements for those one set to right one set to left:
(defcomponentk nav* [owner]
(render
[_]
(let [{:keys [opts children]} (om/get-props owner)
[bs props] (t/separate Nav opts {:expanded? true
:bs-class "nav"})
classes {:navbar-collapse (:collapsible? bs)
:collapse (not (:expanded? bs))
:in (:expanded? bs)}
ul-props {:ref "ul"
:class (d/class-set
(merge (t/bs-class-set bs)
{:nav-stacked (:stacked? bs)
:nav-justified (:justified? bs)
:navbar-nav (:navbar? bs)
:pull-right (:pull-right? bs)}))}
ul-props-left {:ref "ul"
:class (d/class-set
(merge (t/bs-class-set bs)
{:nav-stacked (:stacked? bs)
:nav-justified (:justified? bs)
:navbar-nav (:navbar? bs)
:pull-right false}))}
ul-props-right
{:ref "ul"
:class (d/class-set
(merge (t/bs-class-set bs)
{:nav-stacked (:stacked? bs)
:nav-justified (:justified? bs)
:navbar-nav (:navbar? bs)
:pull-right true}))}
[children-left _ children-right] (partition-by #(= :right %) children)
children-left (map (clone-nav-item opts) children-left)
children-right (map (clone-nav-item opts) children-right)]
(if (and (:navbar? bs)
(not (:collapsible? bs)))
(d/ul (u/merge-props props ul-props) children)
(d/nav (u/merge-props props {:class (d/class-set classes)})
(if (not (empty? children-left)) (d/ul ul-props-left children-left))
(if (not (empty? children-right))(d/ul ul-props-right children-right)))))))
Initially I belived the issue to be that downgrading the schema version in project.clj was forgotten, but after I tried it locally I am still seeing the following issue:
Caused by: java.lang.ExceptionInInitializerError, compiling:(schema/core.clj:1:1)
...
Caused by: java.lang.ClassNotFoundException: riddley.Util
Taking inspiration from https://github.com/react-bootstrap/react-bootstrap.... We can host this as a github pages site.
The "show code" links on the following site behave more like paragraphs than links on my iPhone. If I tap on them, Safari thinks that I want to highlight their text or zoom in on them.
The herokuapp site fails to load on Firefox with the above error. Please look into it. The site loads well on Chrome.
from @julienba:
"The sample is not working for me with the 0.3.5 (nothing appear and no error in the chrome console).
Nothing appear on http://om-bootstrap.herokuapp.com/components#modals too
Did I missing something?"
Navbar works great but after clicking a nav item it doesnt auto collapse back .
Is it possible to enable auto collapse?
Modals are display: none, thanks to the bootstrap css, and I couldn't manage to make them display by copying the documentation example. The om-bootstrap documentation uses a special asset that overrides this in http://om-bootstrap.herokuapp.com/static/assets/style.css
.bs-example .modal {
position: relative;
top: auto;
right: auto;
left: auto;
bottom: auto;
z-index: 1;
display: block;
}
Should this be mentioned in the documentation? It might be worth providing a css file with om bootstrap that provides the correct behaviour?
Thanks
I had this unfinished code in the project and wanted to pull it out before I release. These make it easier to generate inline forms. Currently the user has to write their own :wrapper-classname
and :label-classname
s with bootstrap knowledge. Not a problem, but we can make it easier.
;; ## Helpers
(defn make-horizontal
"Adds suitable container boundaries for a horizontal form
field. TODO: Give this thing custom arguments."
[item]
(assoc item
:label-classname "col-xs-2"
:wrapper-classname "col-xs-10"))
;; ## In Progress and Examples
(sm/defn inline-fields
"TODO: Add an inline-fields helper that can build a group of
these. Some help on how to do this with bootstrap 3:
http://www.bootply.com/127826"
[inputs :- [Input]]
)
(def example-fields
[{:type "text" :addon-before "$"
:help "Label before the input field."}
{:type "text" :label "Your Address:"
:label-classname "col-sm-3"
:wrapper-classname "col-sm-5"}
{:type "text" :addon-after ".00"
:label "label!"
:help "Label AFTER the input field."}
{:type "text" :addon-before "$" :addon-after ".00"
:help "Label both before and after the input field."}
{:type "text" :bs-style "success" :label "Success" :feedback? true}
{:type "text" :bs-style "warning" :label "Warning" :feedback? true}
{:type "text" :bs-style "error" :label "Error" :feedback? true}
(make-horizontal
{:type "select"
:label "Pick Events"
:children (map (fn [i]
(d/option {:value i} i))
(range 10))
:selected 3})])
It seems like the navbar breaks pretty badly. It works without navs (is displayed), however
Thows in util.clj:155. Stacktrace contains render-navbar-child.
Assert failed: (component? x)
Not sure how to strip these dependencies.
Hi,
As soon as I add a require for something like om-bootstrap.button, which in turn loads mixins.cljs, my compilation breaks with the following exception:
Caused by: clojure.lang.ExceptionInfo: clojure.lang.Var cannot be cast to clojure.lang.IObj at line 9 file:/Users/anvar/.m2/repository/racehub/om-bootstrap/0.3.0/om-bootstrap-0.3.0.jar!/om_bootstrap/mixins.cljs {:tag :cljs/analysis-error, :file "file:/Users/anvar/.m2/repository/racehub/om-bootstrap/0.3.0/om-bootstrap-0.3.0.jar!/om_bootstrap/mixins.cljs", :line 9, :column 1}
I'm still pretty new to leiningen so not sure if this is a bug, or just my lack of experience, but I am unable to get clojurescript to compile if I have the latest om-bootstrap and latest prismatic/om-tools ( [prismatic/om-tools "0.3.6"]
) in my project.clj
. I've tried a variety of exclusions, but haven't had any luck.
I get following warnings from this library when I compile clojurescript with advanced optimizations
Sep 01, 2016 2:40:37 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/matus/www/platform/target/cljsbuild-compiler-0/om_bootstrap/mixins.js:97: WARNING - dangerous use of this in static method om_bootstrap.mixins.set_listener_mixin.componentWillMount
var this26966 = this;
^
Sep 01, 2016 2:40:37 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/matus/www/platform/target/cljsbuild-compiler-0/om_bootstrap/mixins.js:104: WARNING - dangerous use of this in static method om_bootstrap.mixins.set_listener_mixin.componentWillUnmount
var this26967 = this;
^
Sep 01, 2016 2:40:37 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/matus/www/platform/target/cljsbuild-compiler-0/om_bootstrap/mixins.js:163: WARNING - dangerous use of this in static method om_bootstrap.mixins.set_listener_mixin.set_listener
var this26968 = this;
^
Hi,
we're having some issues with compile time warnings. It very well might be a problem with our dependencies.
WARNING: Use of undeclared Var schema.core/fn at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/constructor15922 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map15924 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map15924 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map15924 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map15924 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map15924 at line 48 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/panel.cljs
WARNING: Use of undeclared Var schema.core/fn at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor15984 at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map15986 at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map15986 at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map15986 at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map15986 at line 130 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var schema.core/fn at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor16012 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16014 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16014 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16014 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16014 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16014 at line 180 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var schema.core/fn at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor16030 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16032 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16032 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16032 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16032 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map16032 at line 246 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/button.cljs
WARNING: No such namespace: FB at line 16 /C:/Users/ok/Code/platform/chuck/src/cljs/de/cognesys/chuck/ui/components/fb_login.cljs
WARNING: Use of undeclared Var FB/login at line 16 /C:/Users/ok/Code/platform/chuck/src/cljs/de/cognesys/chuck/ui/components/fb_login.cljs
WARNING: No such namespace: FB at line 9 /C:/Users/ok/Code/platform/chuck/src/cljs/de/cognesys/chuck/ui/components/fb_login.cljs
WARNING: Use of undeclared Var FB/init at line 9 /C:/Users/ok/Code/platform/chuck/src/cljs/de/cognesys/chuck/ui/components/fb_login.cljs
WARNING: Use of undeclared Var schema.core/fn at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/constructor16274 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map16276 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map16276 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map16276 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map16276 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map16276 at line 91 file:/C:/Users/ok/.m2/repository/racehub/om-bootstrap/0.4.2/om-bootstrap-0.4.2.jar!/om_bootstrap/random.cljs
WARNING: Use of undeclared Var de.cognesys.chuck.ui.components.details/bar-chart at line 16 /C:/Users/ok/Code/platform/chuck/src/cljs/de/cognesys/chuck/ui/components/details.cljs
WARNING: Use of undeclared Var de.cognesys.chuck.ui.components.details/bar-chart at line 16 src\cljs\de\cognesys\chuck\ui\components\details.cljs
WARNING: No such namespace: FB at line 16 src\cljs\de\cognesys\chuck\ui\components\fb_login.cljs
WARNING: Use of undeclared Var FB/login at line 16 src\cljs\de\cognesys\chuck\ui\components\fb_login.cljs
WARNING: No such namespace: FB at line 9 src\cljs\de\cognesys\chuck\ui\components\fb_login.cljs
WARNING: Use of undeclared Var FB/init at line 9 src\cljs\de\cognesys\chuck\ui\components\fb_login.cljs
WARNING: Use of undeclared Var schema.core/fn at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/constructor28351 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map28353 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map28353 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map28353 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map28353 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var om-bootstrap.panel/map28353 at line 48 resources\public\js\out\om_bootstrap\panel.cljs
WARNING: Use of undeclared Var schema.core/fn at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor29307 at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29309 at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29309 at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29309 at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29309 at line 130 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var schema.core/fn at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor29362 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29364 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29364 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29364 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29364 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29364 at line 180 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var schema.core/fn at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/constructor29395 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29397 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29397 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29397 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29397 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var om-bootstrap.button/map29397 at line 246 resources\public\js\out\om_bootstrap\button.cljs
WARNING: Use of undeclared Var schema.core/fn at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/constructor32835 at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map32837 at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map32837 at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map32837 at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map32837 at line 91 resources\public\js\out\om_bootstrap\random.cljs
WARNING: Use of undeclared Var om-bootstrap.random/map32837 at line 91 resources\public\js\out\om_bootstrap\random.cljs
Successfully compiled "resources/public/js/app.js" in 26.608 seconds.
Our dependencies are as follow:
[[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2760"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.clojure/tools.logging "0.2.6"]
[http-kit "2.1.18"]
[com.datomic/datomic-pro "0.9.5130" :exclusions [org.slf4j/log4j-over-slf4j joda-time]]
[com.taoensso/sente "1.2.0"]
[cljs-ajax "0.3.9"]
[com.stuartsierra/component "0.2.2"]
[compojure "1.3.1"]
[org.omcljs/om "0.8.8"]
[prismatic/om-tools "0.3.10" :exclusions [om]]
[prismatic/schema "0.3.7" :exclusions [potemkin]]
[racehub/om-bootstrap "0.4.2"]
[figwheel "0.2.2-SNAPSHOT"]]
Besides the compile time warnings we also get runtime exceptions:
Uncaught TypeError: Cannot read property 'call' of undefined(anonymous function) @ panel.cljs:48
Uncaught TypeError: Cannot read property 'call' of undefined(anonymous function) @ button.cljs:130
Uncaught TypeError: Cannot read property 'call' of undefined(anonymous function) @ random.cljs:91
I realize that this is a bit broad but maybe you could help me out here. I guess it is a weird combination of om-tools, schema, plumbing and om-bootstrap and maybe others are running into this as well.
The function unbind-root-close-handlers!
calls map
to unbind the global event handlers for a dropdown, but map
is lazy, so there is not guarantee they will be called. Should be mapv
or doseq
, etc.
Currently, the default :ref value of "input" overrides any custom option because the defaults are on the right:
https://github.com/racehub/om-bootstrap/blob/develop/src/om_bootstrap/input.cljs#L157
This means that a component can't have two inputs and grab refs to each distinct one.
Switch the order and write a test to verify that having two inputs in a component works great.
Ideally we'd inject the latest project version into a script tag fetched from Clojars on page load. I don't know the JSON call to get this from Clojars, but would love help!
Hey,
Sorry this is out of band a little bit, but I was wondering what editor do you use to have code indent right, would you mind sharing the settings if its something like emacs and/or vim?
This is what I get:
(render []
(this is what I get))
This is what you have:
(render []
(this is what I get))
Thanks,
Uday
This is what I found out: Rendering of dropdown*
component has an update-child-props
function that expects to find :on-select
value from the child props (button.cljs:194). The problem is that menu-item
children are actually li
components that don't have :on-select
in props because it has been given to the underlaying a
component.
In the current version of documentation the namespace is written as "om-bootstrap.pager", but it should be "om-bootstrap.pagination".
http://om-bootstrap.herokuapp.com/components
(:require [om-bootstrap.pager :as pg])
(pg/pagination {}
(pg/page {} "1")
(pg/page {} "2")
(pg/page {} "3"))
Every button and UI element is rendered with standard look on Safari (Mac), which means all the special buttons look exactly the same.
Tested on Safari Version 7.0.6 (9537.78.2)
Tested it, reverted back to 11.1. Om 0.8.0 downloads 0.12.2. My HTML references 0.11.1. Tried to use 0.12.2, but that didn't work. Not sure how long this bastardization combination will continue. I guess at some point I will have to stop upgrading Om or om-bootstrap.
Currently g/col
looks like:
(g/col {:xs 12 :sm 12 :md 12 :lg 12} "Some Text")
It would be nice to have an alternative (higher priority?) attributes, :sizes
:
(g/col {:sizes [12 12 12 12]} "Some Text")
Even if all 4 sizes are required, it's still considerably more succinct.
Just a small thought I had while writing this out again and again!
This is required for the modal, among other things. Here's the beginning:
;; ## Fade
(defn get-fades [e]
(.querySelectorAll (om/get-node e) ".fade"))
(defn fade-in
"The idea here is to grab all components with a `fade` class and add
the `in` class to them."
[e]
(doseq [elem (get-fades e)]
;; In the react-bootstrap example, they directly set the className
;; property here.
(om/update-state! elem :className (fn [s] (str s " in")))))
(defn fade-out-end [e]
;; Select the fadeout element and remove it from its parent.
)
(defn fade-out
"Removes the `in` class from all child elements with a `fade` class."
[e]
;; TODO: Make this accessible by ID.
(let [fade-out-el (.querySelectorAll "#fadeout")]
(doseq [e (.querySelectorAll ".fade.in")]
;; TODO: Use a better method for removing and adding
;; classes. This is janky. BUT, we still want to avoid
;; dependencies.
;;
;; check om-tools for deps.
(om/update-state! e :className #(.replace % #"\bin\b" "")))
(js/setTimeout fade-out-end 300)
))
(defmixin fade-mixin
(did-mount [owner]
;; Not totally sure what's going on here; I THINK that
;; we're checking if the page has been loaded yet, and
;; then triggering a small delay before we fade all
;; components in.
(when (.-querySelectorAll js/document)
;; Firefox needs delay for transition to be triggered
(js/setTimeout #(fade-in owner) 20)))
(will-unmount [owner]
(when-let [els (not-empty (get-fades owner))]
;; TODO: Add an ID?
(let [node (om/get-node owner)
fade-out-el (.createElement js/document "div")]
(.appendChild js/document.body fade-out-el)
(.appendChild fade-out-el (.cloneNode node true))
;; Firefox needs delay for transition to be triggered
(js/setTimeout fade-out 20)))))
When schema validation is turned on, input components cannot be given optional keys to be applied to their child component. This is because of a missing t/bootstrap
in the definition of the Input
schema at https://github.com/racehub/om-bootstrap/blob/develop/src/om_bootstrap/input.cljs#L39.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.