mirror of https://github.com/penpot/penpot.git
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
a558bfdb2f
|
|
@ -52,6 +52,7 @@ root.
|
|||
### :boom: Breaking changes & Deprecations
|
||||
|
||||
### :heart: Community contributions (Thank you!)
|
||||
|
||||
- Design improvements to the Invitations page with an empty state [GitHub #2608](https://github.com/penpot/penpot/issues/2608) by [@iprithvitharun](https://github.com/iprithvitharun)
|
||||
|
||||
### :sparkles: New features
|
||||
|
|
@ -65,6 +66,7 @@ root.
|
|||
- Create `input*` wrapper component, and `label*`, `input-field*` and `hint-message*` components [Taiga #10713](https://tree.taiga.io/project/penpot/us/10713)
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix problem in viewer with the back button [Taiga #10907](https://tree.taiga.io/project/penpot/issue/10907)
|
||||
- Fix resize bar background on tokens panel [Taiga #10811](https://tree.taiga.io/project/penpot/issue/10811)
|
||||
- Fix shortcut for history version panel [Taiga #11006](https://tree.taiga.io/project/penpot/issue/11006)
|
||||
|
|
@ -90,6 +92,7 @@ root.
|
|||
- Fix Color should preserve color space [Github #69](https://github.com/tokens-studio/penpot/issues/69)
|
||||
- Fix cannot rename Design Token Sets when group of same name exists [Taiga Issue #10773](https://tree.taiga.io/project/penpot/issue/10773)
|
||||
- Fix problem when duplicating grid layout [Github #6391](https://github.com/penpot/penpot/issues/6391)
|
||||
- Fix issue that makes workspace shortcuts stop working [Taiga #11062](https://tree.taiga.io/project/penpot/issue/11062)
|
||||
|
||||
## 2.6.2
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(:refer-clojure :exclude [meta reset!])
|
||||
(:require
|
||||
["@penpot/mousetrap$default" :as mousetrap]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.data :as d]
|
||||
[app.common.logging :as log]
|
||||
[app.common.schema :as sm]
|
||||
[app.config :as cf]
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
[:fn {:optional true} fn?]
|
||||
[:tooltip {:optional true} :string]]])
|
||||
|
||||
(def check-shortcuts!
|
||||
(def ^:private check-shortcuts
|
||||
(sm/check-fn schema:shortcuts))
|
||||
|
||||
(defn- wrap-cb
|
||||
|
|
@ -167,23 +167,20 @@
|
|||
(mousetrap/reset)
|
||||
(bind! shortcuts)))
|
||||
|
||||
(def ^:private conj*
|
||||
(fnil conj (d/ordered-map)))
|
||||
|
||||
(defn push-shortcuts
|
||||
[key shortcuts]
|
||||
(assert (keyword? key) "expected a keyword for `key`")
|
||||
(let [shortcuts (check-shortcuts shortcuts)]
|
||||
(ptk/reify ::push-shortcuts
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update state :shortcuts conj* [key shortcuts]))
|
||||
|
||||
(dm/assert!
|
||||
"expected valid parameters"
|
||||
(and (keyword? key)
|
||||
(check-shortcuts! shortcuts)))
|
||||
|
||||
(ptk/reify ::push-shortcuts
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(update :shortcuts (fnil conj '()) [key shortcuts])))
|
||||
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(let [[_key shortcuts] (peek (:shortcuts state))]
|
||||
ptk/EffectEvent
|
||||
(effect [_ _ _]
|
||||
(reset! shortcuts)))))
|
||||
|
||||
(defn pop-shortcuts
|
||||
|
|
@ -192,12 +189,9 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update state :shortcuts (fn [shortcuts]
|
||||
(let [current-key (first (peek shortcuts))]
|
||||
(if (= key current-key)
|
||||
(pop shortcuts)
|
||||
shortcuts)))))
|
||||
(dissoc shortcuts key))))
|
||||
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(let [[key* shortcuts] (peek (:shortcuts state))]
|
||||
(when (not= key key*)
|
||||
(reset! shortcuts))))))
|
||||
(let [[_key shortcuts] (last (:shortcuts state))]
|
||||
(reset! shortcuts)))))
|
||||
|
|
|
|||
|
|
@ -586,10 +586,10 @@
|
|||
|
||||
(mf/with-effect []
|
||||
(st/emit! (st/emit! (dsc/push-shortcuts ::colorpicker sc/shortcuts)))
|
||||
#(do
|
||||
(st/emit! (dsc/pop-shortcuts ::colorpicker))
|
||||
(when (and @dirty? @last-change on-close)
|
||||
(on-close @last-change))))
|
||||
(fn []
|
||||
(st/emit! (dsc/pop-shortcuts ::colorpicker))
|
||||
(when (and @dirty? @last-change on-close)
|
||||
(on-close @last-change))))
|
||||
|
||||
[:div {:class (stl/css :colorpicker-tooltip)
|
||||
:data-testid "colorpicker"
|
||||
|
|
|
|||
|
|
@ -472,16 +472,23 @@
|
|||
(defn setup-shortcuts
|
||||
[path-editing? drawing-path? text-editing? grid-editing?]
|
||||
(hooks/use-shortcuts ::workspace wsc/shortcuts)
|
||||
(mf/use-effect
|
||||
(mf/deps path-editing? drawing-path? grid-editing?)
|
||||
(fn []
|
||||
(cond
|
||||
grid-editing?
|
||||
(do (st/emit! (dsc/push-shortcuts ::grid gsc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::grid)))
|
||||
(or drawing-path? path-editing?)
|
||||
(do (st/emit! (dsc/push-shortcuts ::path psc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::path)))
|
||||
text-editing?
|
||||
(do (st/emit! (dsc/push-shortcuts ::text tsc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::text)))))))
|
||||
|
||||
(mf/with-effect [path-editing? drawing-path? grid-editing?]
|
||||
(cond
|
||||
grid-editing?
|
||||
(do
|
||||
(st/emit! (dsc/push-shortcuts ::grid gsc/shortcuts))
|
||||
(fn []
|
||||
(st/emit! (dsc/pop-shortcuts ::grid))))
|
||||
|
||||
(or drawing-path? path-editing?)
|
||||
(do
|
||||
(st/emit! (dsc/push-shortcuts ::path psc/shortcuts))
|
||||
(fn []
|
||||
(st/emit! (dsc/pop-shortcuts ::path))))
|
||||
|
||||
text-editing?
|
||||
(do
|
||||
(st/emit! (dsc/push-shortcuts ::text tsc/shortcuts))
|
||||
(fn []
|
||||
(st/emit! (dsc/pop-shortcuts ::text)))))))
|
||||
|
|
|
|||
Loading…
Reference in New Issue