From caf31f662fb3314c4a37615d37401a5684d58837 Mon Sep 17 00:00:00 2001 From: Andrew Suzuki Date: Mon, 6 Jun 2016 15:32:01 -0400 Subject: [PATCH] fixes; remove test workspaces from db; fix u/new-id --- src/cljs/ulysses/components/basic.cljs | 2 +- src/cljs/ulysses/db.cljs | 6 ++---- src/cljs/ulysses/utils.cljs | 12 ++++++++---- src/sass/components/_range-slider.scss | 5 ----- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/cljs/ulysses/components/basic.cljs b/src/cljs/ulysses/components/basic.cljs index 0c6ccc3..900b4a6 100644 --- a/src/cljs/ulysses/components/basic.cljs +++ b/src/cljs/ulysses/components/basic.cljs @@ -26,7 +26,7 @@ (defn text-input [] "regular text field, with the special ability - to derefence a `forein` reference value, + to derefence a `foreign` reference value, as well as reset! it if an :on-change is not supplied ex. [text-input :value my-atom] ex. [text-input :value my-value :on-change #(dispatch ...)]" diff --git a/src/cljs/ulysses/db.cljs b/src/cljs/ulysses/db.cljs index 339e1e1..e10fb6e 100644 --- a/src/cljs/ulysses/db.cljs +++ b/src/cljs/ulysses/db.cljs @@ -37,9 +37,7 @@ :grant-ops [] ; workspaces (bare-bones) - :workspaces [{:id 1 :name "a" :grant-op-id 1} - {:id 2 :name "b" :grant-op-id 1} - {:id 3 :name "c" :grant-op-id 1}] + :workspaces [] ; faculties (extended, with keywords) [builder] :faculties {} @@ -99,7 +97,7 @@ ;; interface ;; ------------------------------------------------------------------------- - ; modal: {:title Hiccup | String, :action-label String :on-action Function :children Hiccup | String + ; modal: {:title Hiccup | String, :action-label String :on-action Function :children Hiccup | String} :modal nil}) (defn refresh-keys diff --git a/src/cljs/ulysses/utils.cljs b/src/cljs/ulysses/utils.cljs index c48fc29..d2bcac4 100644 --- a/src/cljs/ulysses/utils.cljs +++ b/src/cljs/ulysses/utils.cljs @@ -89,9 +89,9 @@ "merge multiple seqables of maps by :id; the rightmost having the highest preference" ([a b] (let [new-ids (map :id b)] - (->> a - (remove #(-> % :id hash-set (some new-ids))) - (concat b)))) + (concat + (remove #(-> % :id hash-set (some new-ids)) a) + b))) ([& seqables] (reduce merge-by-id seqables))) @@ -116,7 +116,11 @@ "generate a new integer id, given a list of maps containing existing integer ids" [existing] - (->> existing (map :id) (apply max) (inc))) + (->> existing + (map :id) + (cons 0) ; default pre-inc + (apply max) + (inc))) (defn map-lookup "map ids to elements retrieved from map, diff --git a/src/sass/components/_range-slider.scss b/src/sass/components/_range-slider.scss index 786ad4c..06f35f9 100644 --- a/src/sass/components/_range-slider.scss +++ b/src/sass/components/_range-slider.scss @@ -9,7 +9,6 @@ } .range-slider::-webkit-slider-runnable-track { - // animate: .2s; background: $white; border-radius: 11px; cursor: pointer; @@ -19,8 +18,6 @@ .range-slider::-webkit-slider-thumb { -webkit-appearance: none; - // border: 0; - // box-shadow: none; background: $brand-primary; border-radius: 9px; cursor: pointer; @@ -34,7 +31,6 @@ } .range-slider::-moz-range-track { - // animate: .2s; background: $white; border-radius: 11px; cursor: pointer; @@ -51,7 +47,6 @@ } .range-slider::-ms-track { - // animate: .2s; background: transparent; border-color: transparent; color: transparent;