Open the palette lane onto its selected transition, like any lane
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1a6d6564c5
commit
c359ac650f
2 changed files with 53 additions and 17 deletions
|
|
@ -98,19 +98,42 @@
|
|||
"creating in a lane does not move the playhead"))))
|
||||
|
||||
(deftest the-palette-row-is-a-lane-row-whether-or-not-its-track-exists
|
||||
(let [empty-row (timeline/palette-track-row (clip/blank) :main 120 #{} nil)
|
||||
(let [empty-row (first (timeline/palette-track-rows (clip/blank) :main 120 #{} nil))
|
||||
filled (-> (clip/blank)
|
||||
(assoc-in [:symbols :main :palette-track] :track)
|
||||
(assoc-in [:symbols :track]
|
||||
{:id :track :type :palette-track :display :lane
|
||||
:frames 120 :nodes {}}))
|
||||
filled-row (timeline/palette-track-row filled :main 120 #{} nil)]
|
||||
filled-row (first (timeline/palette-track-rows filled :main 120 #{} nil))]
|
||||
;; The double-click that creates in a lane asks nothing else of a row.
|
||||
(is (:lane? empty-row))
|
||||
(is (:lane? filled-row))
|
||||
(is (= [:node :track nil []] (:select filled-row))
|
||||
"a track that exists is addressed as the lane it is")))
|
||||
|
||||
(deftest the-palette-row-opens-onto-the-selected-transition-like-any-lane
|
||||
(let [doc (-> (clip/blank)
|
||||
(assoc-in [:symbols :main :palette-track] :track)
|
||||
(assoc-in [:symbols :night] {:id :night :type :palette :frames 1 :nodes {}})
|
||||
(assoc-in [:symbols :track]
|
||||
{:id :track :type :palette-track :display :lane :frames 120
|
||||
:nodes {:p {:id :p :kind :instance :source :night :span [10 40]
|
||||
:time {:mode :map :at 10 :rate 1}
|
||||
:channels {[:pos] {:keys {0 [0 0] 12 [5 0]}}}}}}))
|
||||
closed (timeline/palette-track-rows doc :main 120 #{} [:p])
|
||||
[lane portal & channels] (timeline/palette-track-rows
|
||||
doc :main 120 #{[:arthur.ui.timeline/palette-track] [:p]} [:p])]
|
||||
(is (= 1 (count closed)))
|
||||
(is (:expandable? (first closed)) "the palette lane has a disclosure like any lane")
|
||||
(is (:expanded? lane))
|
||||
(is (= [:p] (:path portal)) "the portal is the selected transition, by its own path")
|
||||
(is (= [:node :track :p [:p]] (:select portal)))
|
||||
(is (= :track (:owner portal)) "dragging its bar slides it in the track")
|
||||
(is (= [10 22] (:keys portal)) "its keys are on this ruler")
|
||||
(is (= [:p [:pos]] (:path (first channels))) "and it opens onto its channels")
|
||||
(is (not (contains? #{[:arthur.ui.timeline/lane]} (:path lane)))
|
||||
"the palette lane never shares the open lane's expansion")))
|
||||
|
||||
(deftest the-same-double-click-command-creates-a-palette-symbol-on-the-palette-row
|
||||
(let [doc (clip/blank)
|
||||
id (store/install! {:clip doc :store {}} "double-click-palette-symbol")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue