                          [:p.list-group-item-text (str (:stop/latitude stop)
                                                        "/"
                                                        (:stop/longitude stop))]])
-                      data))]])))))
+                      data))
+           [:button.btn.btn-default.btn-block {:href "#"} "Load More"]]])))))
 
-(defn route-panel [{:keys [panel data]} owner]
+(defn route-panel [{:keys [panel data active? in?]} owner]
   (reify
     om/IDisplayName (display-name [_] "Routes Panel")
     om/IRender
     (render [_]
       (let [tab (:tab panel)]
         (html
-         [:div {:className (tab-class tab :routes)}
+         [:div {:className (tab-class active? in?)}
           [:p "Routes Panel"]])))))
 
-(defn trip-panel [{:keys [panel data]} owner]
+(defn trip-panel [{:keys [panel data active? in?]} owner]
   (reify
     om/IDisplayName (display-name [_] "Trips Panel")
     om/IRender
     (render [_]
       (let [tab (:tab panel)]
         (html
-         [:div {:className (tab-class tab :trips)}
+         [:div {:className (tab-class active? in?)}
           [:p "Trips Panel"]])))))
 
 (defn side-panel [{:keys [panel data]} owner]
   (reify
     om/IDisplayName (display-name [_] "Side Panel")
+    om/IInitState
+    (init-state [_]
+      (let [tab (:tab panel)]
+        {:active tab
+         :in tab
+         :toggle-ch (chan 1)
+         :kill-ch (chan 1)}))
+    om/IDidMount
+    (did-mount [_]
+      (let [{:keys [toggle-ch kill-ch]} (om/get-state owner)
+            transition-ch (utils/listen
+                           (om/get-node owner)
+                           EventType.TRANSITIONEND
+                           (chan 1 (filter #(= "opacity" (.. % -event_ -propertyName)))))
+            active-in-ch (chan 1)]
+        (go-loop []
+          (let [[v c] (alts! [active-in-ch toggle-ch kill-ch])]
+            (if (= c kill-ch)
+              ::done
+              (do
+                (condp = c
+                  toggle-ch (let [{:keys [active in]} (om/get-state owner)]
+                              (om/set-state! owner :in nil)
+                              (<! transition-ch)
+                              (om/set-state! owner :active v)
+                              (>! active-in-ch v)
+                              )
+                  active-in-ch (om/set-state! owner :in v))
+                (recur)))))))
+    om/IWillUnmount
+    (will-unmount [_]
+      (let [{:keys [kill-ch]} (om/get-state owner)]
+        (put! kill-ch (js/Date.))))
+    om/IDidUpdate
+    (did-update [_ _ _]
+      (let [{:keys [transition? toggle-ch active in]} (om/get-state owner)
+            tab (:tab panel)]
+        (when (and (not (nil? in))
+                   (not= in tab))
+          (put! toggle-ch (:tab panel)))))
     om/IRenderState
-    (render-state [_ {:keys [active? in?]}]
+    (render-state [_ {:keys [active in]}]
       (let [tab (:tab panel)]
         (html [:div.side-panel
                [:ul.nav.nav-tabs

      (let [tab (:tab panel)
            query (:stops-query panel)]
        (html
         [:div {:className (tab-class tab :stops)}
          [:div.tab-content-wrapper
           [:form.form-horizontal
            {:on-submit #(do

                             (raise! owner [:side-panel-changed {:key key}])
                             (.preventDefault e))} label]]))))

(defn ^:private tab-class [active? in?]
  (join " "
        ["tab-pane" "fade" "side"
         (when active? "active")
         (when in? "in")]))

(defn stop-panel [{:keys [panel data active? in?]} owner]
  (reify
    om/IDisplayName (display-name [_] "Stop Panel")
    om/IRender
