Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2024-06-14 08:10:51 +02:00
commit b991391667
3 changed files with 10 additions and 3 deletions

View file

@ -54,6 +54,7 @@
- Fix toolbar keeps hiding when click outside workspace [Taiga #7776](https://tree.taiga.io/project/penpot/issue/7776) - Fix toolbar keeps hiding when click outside workspace [Taiga #7776](https://tree.taiga.io/project/penpot/issue/7776)
- Fix open overlay relative to a frame [Taiga #7563](https://tree.taiga.io/project/penpot/issue/7563) - Fix open overlay relative to a frame [Taiga #7563](https://tree.taiga.io/project/penpot/issue/7563)
- Workspace-palette items stay hidden when opening with keyboard-shortcut [Taiga #7489](https://tree.taiga.io/project/penpot/issue/7489) - Workspace-palette items stay hidden when opening with keyboard-shortcut [Taiga #7489](https://tree.taiga.io/project/penpot/issue/7489)
- Fix SVG attrs are not handled correctly when exporting/importing in .zip [Taiga #7920](https://tree.taiga.io/project/penpot/issue/7920)
## 2.0.3 ## 2.0.3

View file

@ -96,6 +96,13 @@
(rx/of (run-persistence-task) (rx/of (run-persistence-task)
(update-status :saving)))))))) (update-status :saving))))))))
(defn- discard-persistence-state
[]
(ptk/reify ::discard-persistence-state
ptk/UpdateEvent
(update [_ state]
(dissoc state :persistence))))
(defn- persist-commit (defn- persist-commit
[commit-id] [commit-id]
(ptk/reify ::persist-commit (ptk/reify ::persist-commit
@ -114,7 +121,6 @@
:changes (vec changes) :changes (vec changes)
:features features}] :features features}]
;; FIXME: handle lagged here !!!!
(->> (rp/cmd! :update-file params) (->> (rp/cmd! :update-file params)
(rx/mapcat (fn [{:keys [revn lagged] :as response}] (rx/mapcat (fn [{:keys [revn lagged] :as response}]
(log/debug :hint "changes persisted" :commit-id (dm/str commit-id) :lagged (count lagged)) (log/debug :hint "changes persisted" :commit-id (dm/str commit-id) :lagged (count lagged))
@ -128,6 +134,7 @@
(rx/of (rt/assign-exception cause) (rx/of (rt/assign-exception cause)
(ptk/data-event ::error cause) (ptk/data-event ::error cause)
(update-status :error))) (update-status :error)))
(rx/of (discard-persistence-state))
(rx/throw cause)))))))))) (rx/throw cause))))))))))
@ -173,7 +180,6 @@
(assoc :redo-changes rchg) (assoc :redo-changes rchg)
(assoc :changes rchg))))))) (assoc :changes rchg)))))))
(defn initialize-persistence (defn initialize-persistence
[] []
(ptk/reify ::initialize-persistence (ptk/reify ::initialize-persistence

View file

@ -263,7 +263,7 @@
[:* [:*
(when (contains? shape :svg-attrs) (when (contains? shape :svg-attrs)
(let [svg-transform (get shape :svg-transform) (let [svg-transform (get shape :svg-transform)
svg-attrs (->> shape :svg-attrs keys (mapv d/name) (str/join ",")) svg-attrs (->> shape :svg-attrs keys (mapv (comp d/name str/kebab)) (str/join ","))
svg-defs (->> shape :svg-defs keys (mapv d/name) (str/join ","))] svg-defs (->> shape :svg-defs keys (mapv d/name) (str/join ","))]
[:> "penpot:svg-import" [:> "penpot:svg-import"
#js {:penpot:svg-attrs (when-not (empty? svg-attrs) svg-attrs) #js {:penpot:svg-attrs (when-not (empty? svg-attrs) svg-attrs)