🐛 Fix history panel shortcut (#6420)

*  Remove duplicate ID in file menu

* 🐛 Fix shortcut for Show Version History

*  Add regression test
This commit is contained in:
Belén Albeza 2025-05-07 16:49:54 +02:00 committed by GitHub
parent a9725a1aac
commit 3fe16bd8f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 6 deletions

View file

@ -464,11 +464,11 @@
:subsections [:panels]
:fn #(st/emit! (dcm/go-to-workspace :layout :assets))}
:toggle-history {:tooltip (ds/alt "H")
:command (ds/a-mod "h")
:toggle-history {:tooltip (ds/meta-alt "H")
:command (ds/ca-mod "h")
:subsections [:panels]
:fn #(emit-when-no-readonly
(dcm/go-to-workspace :layout :document-history))}
(dw/toggle-layout-flag :document-history))}
:toggle-colorpalette {:tooltip (ds/alt "P")
:command (ds/a-mod "p")

View file

@ -618,7 +618,7 @@
[:> dropdown-menu-item* {:class (stl/css :submenu-item)
:on-click on-pin-version
:on-key-down on-pin-version-key-down
:id "file-menu-show-version-history"}
:id "file-menu-create-version"}
[:span {:class (stl/css :item-name)}
(tr "dashboard.create-version-menu")]]
@ -627,7 +627,10 @@
:on-key-down on-show-version-history-key-down
:id "file-menu-show-version-history"}
[:span {:class (stl/css :item-name)}
(tr "dashboard.show-version-history")]]
(tr "dashboard.show-version-history")]
[:span {:class (stl/css :shortcut)}
(for [sc (scd/split-sc (sc/get-tooltip :toggle-history))]
[:span {:class (stl/css :shortcut-key) :key sc} sc])]]
[:div {:class (stl/css :separator)}]])