mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 21:41:40 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
93bbe1b2f8
4 changed files with 47 additions and 6 deletions
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
|
## 1.16.2-beta
|
||||||
|
|
||||||
## 1.16.1-beta
|
## 1.16.1-beta
|
||||||
|
|
||||||
|
@ -37,7 +38,9 @@
|
||||||
- Fix join nodes icon is active when 2 already joined nodes are selected [Taiga #4370](https://tree.taiga.io/project/penpot/issue/4370)
|
- Fix join nodes icon is active when 2 already joined nodes are selected [Taiga #4370](https://tree.taiga.io/project/penpot/issue/4370)
|
||||||
- Fix path nodes panel. "To curve" and "To corner" icons are active if node is already curved/cornered [Taiga #4371](https://tree.taiga.io/project/penpot/issue/4371)
|
- Fix path nodes panel. "To curve" and "To corner" icons are active if node is already curved/cornered [Taiga #4371](https://tree.taiga.io/project/penpot/issue/4371)
|
||||||
- Fix displaying comments settings are not applied via "Comments" menu drop-down on the top navbar on view mode [Taiga #4389](https://tree.taiga.io/project/penpot/issue/4389)
|
- Fix displaying comments settings are not applied via "Comments" menu drop-down on the top navbar on view mode [Taiga #4389](https://tree.taiga.io/project/penpot/issue/4389)
|
||||||
- Fix bad behaviour on hovering and click nested artboards[Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) and [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269)
|
- Fix bad behaviour on hovering and click nested artboards [Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) and [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269)
|
||||||
|
- Fix lang autodetect issue [Taiga #4277](https://tree.taiga.io/project/penpot/issue/4277)
|
||||||
|
- Fix colorpicker does not close upon switching to Dashboard [Taiga #4408](https://tree.taiga.io/project/penpot/issue/4408)
|
||||||
|
|
||||||
## 1.16.0-beta
|
## 1.16.0-beta
|
||||||
|
|
||||||
|
|
|
@ -599,10 +599,34 @@
|
||||||
(remove #(and (= (:frame-id %) frame-id)
|
(remove #(and (= (:frame-id %) frame-id)
|
||||||
(not= (:parent-id %) frame-id))))
|
(not= (:parent-id %) frame-id))))
|
||||||
|
|
||||||
|
all-parents
|
||||||
|
(reduce (fn [res id]
|
||||||
|
(into res (cph/get-parent-ids objects id)))
|
||||||
|
(d/ordered-set)
|
||||||
|
ids)
|
||||||
|
|
||||||
|
find-all-empty-parents
|
||||||
|
(fn recursive-find-empty-parents [empty-parents]
|
||||||
|
(let [all-ids (into empty-parents ids)
|
||||||
|
contains? (partial contains? all-ids)
|
||||||
|
xform (comp (map lookup)
|
||||||
|
(filter cph/group-shape?)
|
||||||
|
(remove #(->> (:shapes %) (remove contains?) seq))
|
||||||
|
(map :id))
|
||||||
|
parents (into #{} xform all-parents)]
|
||||||
|
(if (= empty-parents parents)
|
||||||
|
empty-parents
|
||||||
|
(recursive-find-empty-parents parents))))
|
||||||
|
|
||||||
|
empty-parents
|
||||||
|
;; Any parent whose children are moved should be deleted
|
||||||
|
(into (d/ordered-set) (find-all-empty-parents #{}))
|
||||||
|
|
||||||
changes
|
changes
|
||||||
(-> (pcb/empty-changes it page-id)
|
(-> (pcb/empty-changes it page-id)
|
||||||
(pcb/with-objects objects)
|
(pcb/with-objects objects)
|
||||||
(pcb/change-parent frame-id moving-shapes drop-index))]
|
(pcb/change-parent frame-id moving-shapes drop-index)
|
||||||
|
(pcb/remove-objects empty-parents))]
|
||||||
|
|
||||||
(when (and (some? frame-id) (d/not-empty? changes))
|
(when (and (some? frame-id) (d/not-empty? changes))
|
||||||
(rx/of (dch/commit-changes changes)
|
(rx/of (dch/commit-changes changes)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
[app.main.data.exports :as de]
|
[app.main.data.exports :as de]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.workspace :as dw]
|
[app.main.data.workspace :as dw]
|
||||||
|
[app.main.data.workspace.colors :as dc]
|
||||||
[app.main.data.workspace.libraries :as dwl]
|
[app.main.data.workspace.libraries :as dwl]
|
||||||
[app.main.data.workspace.shortcuts :as sc]
|
[app.main.data.workspace.shortcuts :as sc]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
|
@ -436,10 +437,18 @@
|
||||||
zoom (mf/deref refs/selected-zoom)
|
zoom (mf/deref refs/selected-zoom)
|
||||||
params {:page-id page-id :file-id (:id file) :section "interactions"}
|
params {:page-id page-id :file-id (:id file) :section "interactions"}
|
||||||
|
|
||||||
|
close-modals
|
||||||
|
(mf/use-callback
|
||||||
|
(fn []
|
||||||
|
(st/emit! (dc/stop-picker))
|
||||||
|
(st/emit! (modal/hide!))))
|
||||||
|
|
||||||
go-back
|
go-back
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
(mf/deps project)
|
(mf/deps project)
|
||||||
#(st/emit! (dw/go-to-dashboard project)))
|
(fn []
|
||||||
|
(close-modals)
|
||||||
|
(st/emit! (dw/go-to-dashboard project))))
|
||||||
|
|
||||||
go-viewer
|
go-viewer
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|
|
@ -897,7 +897,7 @@
|
||||||
:selected-graphics-paths selected-graphics-paths}]))])]))
|
:selected-graphics-paths selected-graphics-paths}]))])]))
|
||||||
|
|
||||||
(mf/defc graphics-box
|
(mf/defc graphics-box
|
||||||
[{:keys [file-id local? objects listing-thumbs? open? open-groups selected-assets reverse-sort?
|
[{:keys [file-id project-id local? objects listing-thumbs? open? open-groups selected-assets reverse-sort?
|
||||||
on-asset-click on-assets-delete on-clear-selection] :as props}]
|
on-asset-click on-assets-delete on-clear-selection] :as props}]
|
||||||
(let [input-ref (mf/use-ref nil)
|
(let [input-ref (mf/use-ref nil)
|
||||||
state (mf/use-state {:renaming nil
|
state (mf/use-state {:renaming nil
|
||||||
|
@ -918,6 +918,7 @@
|
||||||
groups (group-assets objects reverse-sort?)
|
groups (group-assets objects reverse-sort?)
|
||||||
|
|
||||||
components-v2 (mf/use-ctx ctx/components-v2)
|
components-v2 (mf/use-ctx ctx/components-v2)
|
||||||
|
team-id (mf/use-ctx ctx/current-team-id)
|
||||||
|
|
||||||
add-graphic
|
add-graphic
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -927,13 +928,16 @@
|
||||||
|
|
||||||
on-file-selected
|
on-file-selected
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps file-id)
|
(mf/deps file-id project-id team-id)
|
||||||
(fn [blobs]
|
(fn [blobs]
|
||||||
(let [params {:file-id file-id
|
(let [params {:file-id file-id
|
||||||
:blobs (seq blobs)}]
|
:blobs (seq blobs)}]
|
||||||
(st/emit! (dwm/upload-media-asset params)
|
(st/emit! (dwm/upload-media-asset params)
|
||||||
(ptk/event ::ev/event {::ev/name "add-asset-to-library"
|
(ptk/event ::ev/event {::ev/name "add-asset-to-library"
|
||||||
:asset-type "graphics"})))))
|
:asset-type "graphics"
|
||||||
|
:file-id file-id
|
||||||
|
:project-id project-id
|
||||||
|
:team-id team-id})))))
|
||||||
|
|
||||||
on-delete
|
on-delete
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -2095,6 +2099,7 @@
|
||||||
|
|
||||||
(when show-graphics?
|
(when show-graphics?
|
||||||
[:& graphics-box {:file-id (:id file)
|
[:& graphics-box {:file-id (:id file)
|
||||||
|
:project-id (:project-id file)
|
||||||
:local? local?
|
:local? local?
|
||||||
:objects media
|
:objects media
|
||||||
:listing-thumbs? listing-thumbs?
|
:listing-thumbs? listing-thumbs?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue