Code Monkey home page Code Monkey logo

om-bootstrap's People

Contributors

aecay avatar brendanyounger avatar brutasse avatar danielglauser avatar dhruvbhatia avatar dpetrovics avatar julienba avatar lbradstreet avatar lenaschoenburg avatar licenser avatar moquist avatar phillc avatar pyr avatar sritchie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

om-bootstrap's Issues

Dismissable alert breaks

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

Control and Identify Collapsible state?

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

Re-drawing i/input "select" doesn't reset default-value

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.

Mark all relevant schema keys as "optional"

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.

server.clj?

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?

0.3.2 doesn't work with with Om beta4 and react 0.12.2

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

dropdown won't close after an item is clicked

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.

allow pull right section in collapsable nav bars

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

Getting ClassNotFoundException when compiling

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

Modals don't work without overriding styles

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

add horizontal and inline form helpers to input.cljs

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-classnames 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})])

navbar with om 0.8.7

It seems like the navbar breaks pretty badly. It works without navs (is displayed), however

  • :brand key doesn't work with a nested dom element as described in docs - it displays a strange string
  • as soon as I use a nav or nav-item, react blows the callstack with traverseAllChildrenImpl

Exception when require:ing anything that uses mixins.cljs

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}

Version conflict with prismatic/om-tools

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.

Getting warning "dangerous use of this in static method"

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;
                ^

Various compile warnings

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.

Editor settings?

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

Styles not applied to UI elements on Safari

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)

0.3.3 doesn't work with with Om 0.8.0 and react 0.12.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.

Alternative column size notation?

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!

"Fade" mixin

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.