 
 (defn attr-values-view
   [conn pull-expr attr-ident values]
-  (let [default-config-rx (default-config conn)
-        pull-meta (meta pull-expr)]
-    (fn [_ pull-expr attr-ident values]
-      [:div (utils/deep-merge {:style h-box-styles
-                               :class "attr-view"}
-                              (:attr-values-view @default-config-rx)
-                              (:attr-values-view pull-meta))
-       (for [value (utils/deref-or-value values)]
-         ^{:id (hash value)}
-         [value-view conn pull-expr attr-ident value])])))
+  [:div @(attributes-for-component conn pull-expr :attr-values-view)
+   (for [value (utils/deref-or-value values)]
+     ^{:id (hash value)}
+     [value-view conn pull-expr attr-ident value])])
 
 
 (defn cardinality
   [conn attr-ident])
-
-(def default-attr-view-style
-  (merge v-box-styles
-         {:padding "5px 12px"}))
 
 ;; Need to have controls etc here
 (defn attr-view
   [conn pull-expr attr-ident values]
-  (let [default-config-rx (default-config conn)
-        pull-meta (meta pull-expr)
-        attribute-signature (attribute-signature-reaction conn attr-ident)]
-    (fn [_ pull-expr attr-ident values]
-      [:div (utils/deep-merge {:style default-attr-view-style
-                               :class "attr-view"}
-                              (:attr-view @default-config-rx)
-                              (:attr-view pull-meta))
-       [label-view conn pull-expr attr-ident]
-       (match [@attribute-signature]
-         [{:db/cardinality :db.cardinality/many}]
-         [attr-values-view conn pull-expr attr-ident values]
-         :else
-         [value-view conn pull-expr attr-ident values])])))
+  [:div @(attributes-for-component conn pull-expr :attr-view)
+   [label-view conn pull-expr attr-ident]
+   (match [@(attribute-signature-reaction conn attr-ident)]
+     [{:db/cardinality :db.cardinality/many}]
+     [attr-values-view conn pull-expr attr-ident values]
+     :else
+     [value-view conn pull-expr attr-ident values])])
 
 
 ;(defn attribute-values-view


(declare pull-data-view)

(defn value-view
  [conn pull-expr attr-ident value]
  (let [attribute-signature (attribute-signature-reaction conn attr-ident)]
    (fn [_ pull-expr attr-ident value]
      [re-com/v-box
       :padding "3px"
       :children
       [(match [@attribute-signature]
          ;; For now, all refs render the same; May treat component vs non-comp separately later
          [{:db/valueType :db.type/ref}]
          [pull-data-view conn (get-nested-pull-expr pull-expr attr-ident) value]
          ;; Miscellaneous value
          :else
          (str value))]])))

(defn collapse-summary
  [conn attr-ident values]


(defn label-view
  [conn pull-expr attr-ident]
  (when attr-ident
    [re-com/label
     :style {:font-size "14px"
             :font-weight "bold"}
     :label
     ;; XXX Again, should be pull-based
     (or @(posh/q conn '[:find ?attr-label .
                         :in $ ?attr-ident
                         :where [?attr :db/ident ?attr-ident]
                                [?attr :attribute/label ?attr-label]]
                  attr-ident)
         (lablify-attr-ident attr-ident))]))



