mirror of
https://github.com/penpot/penpot.git
synced 2025-07-06 08:27:17 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
5f81c7bc2d
13 changed files with 178 additions and 72 deletions
|
@ -9,6 +9,7 @@
|
|||
[app.common.data :as d]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.pages :as cp]
|
||||
[app.common.pages.changes-builder :as cb]
|
||||
[app.common.spec :as us]
|
||||
[app.main.data.workspace.changes :as dch]
|
||||
[app.main.data.workspace.common :as dwc]
|
||||
|
@ -136,8 +137,8 @@
|
|||
[group rchanges uchanges]))
|
||||
|
||||
(defn prepare-remove-group
|
||||
[page-id group objects]
|
||||
(let [shapes (into [] (:shapes group)) ; ensure we always have vector
|
||||
[it page-id group objects]
|
||||
(let [children (mapv #(get objects %) (:shapes group))
|
||||
parent-id (cp/get-parent (:id group) objects)
|
||||
parent (get objects parent-id)
|
||||
|
||||
|
@ -147,29 +148,25 @@
|
|||
(filter #(#{(:id group)} (second %)))
|
||||
(ffirst))
|
||||
|
||||
rchanges [{:type :mov-objects
|
||||
:page-id page-id
|
||||
:parent-id parent-id
|
||||
:shapes shapes
|
||||
:index index-in-parent}
|
||||
{:type :del-obj
|
||||
:page-id page-id
|
||||
:id (:id group)}]
|
||||
uchanges [{:type :add-obj
|
||||
:page-id page-id
|
||||
:id (:id group)
|
||||
:frame-id (:frame-id group)
|
||||
:obj (assoc group :shapes [])}
|
||||
{:type :mov-objects
|
||||
:page-id page-id
|
||||
:parent-id (:id group)
|
||||
:shapes shapes}
|
||||
{:type :mov-objects
|
||||
:page-id page-id
|
||||
:parent-id parent-id
|
||||
:shapes [(:id group)]
|
||||
:index index-in-parent}]]
|
||||
[rchanges uchanges]))
|
||||
ids-to-detach (when (:component-id group)
|
||||
(cp/get-children (:id group) objects))
|
||||
|
||||
detach-fn (fn [attrs]
|
||||
(dissoc attrs
|
||||
:component-id
|
||||
:component-file
|
||||
:component-root?
|
||||
:remote-synced?
|
||||
:shape-ref
|
||||
:touched))]
|
||||
|
||||
(cond-> (-> (cb/empty-changes it page-id)
|
||||
(cb/with-objects objects)
|
||||
(cb/change-parent parent-id children index-in-parent)
|
||||
(cb/remove-objects [(:id group)]))
|
||||
|
||||
(some? ids-to-detach)
|
||||
(cb/update-shapes ids-to-detach detach-fn))))
|
||||
|
||||
(defn prepare-remove-mask
|
||||
[page-id mask]
|
||||
|
@ -223,20 +220,20 @@
|
|||
objects (wsh/lookup-page-objects state page-id)
|
||||
is-group? #(or (= :bool (:type %)) (= :group (:type %)))
|
||||
lookup #(get objects %)
|
||||
prepare #(prepare-remove-group page-id % objects)
|
||||
prepare #(prepare-remove-group it page-id % objects)
|
||||
|
||||
changes (sequence
|
||||
(comp (map lookup)
|
||||
(filter is-group?)
|
||||
(map prepare))
|
||||
(wsh/lookup-selected state))
|
||||
changes-list (sequence
|
||||
(comp (map lookup)
|
||||
(filter is-group?)
|
||||
(map prepare))
|
||||
(wsh/lookup-selected state))
|
||||
|
||||
rchanges (into [] (mapcat first) changes)
|
||||
uchanges (into [] (mapcat second) changes)]
|
||||
changes {:redo-changes (vec (mapcat :redo-changes changes-list))
|
||||
:undo-changes (vec (mapcat :undo-changes changes-list))
|
||||
:origin it}]
|
||||
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
|
||||
(rx/of (dch/commit-changes {:redo-changes rchanges
|
||||
:undo-changes uchanges
|
||||
:origin it}))))))
|
||||
(def mask-group
|
||||
(ptk/reify ::mask-group
|
||||
ptk/WatchEvent
|
||||
|
|
|
@ -81,7 +81,13 @@
|
|||
(js/console.group "Validation Error:")
|
||||
(ex/ignoring
|
||||
(js/console.info
|
||||
(with-out-str (pprint error))))
|
||||
(with-out-str (pprint (dissoc error :explain)))))
|
||||
|
||||
(when-let [explain (:explain error)]
|
||||
(js/console.group "Spec explain:")
|
||||
(js/console.log explain)
|
||||
(js/console.groupEnd "Spec explain:"))
|
||||
|
||||
(js/console.groupEnd "Validation Error:"))
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
[app.main.store :as st]
|
||||
[app.main.ui.releases.common :as rc]
|
||||
[app.main.ui.releases.v1-10]
|
||||
[app.main.ui.releases.v1-11]
|
||||
[app.main.ui.releases.v1-4]
|
||||
[app.main.ui.releases.v1-5]
|
||||
[app.main.ui.releases.v1-6]
|
||||
|
@ -81,4 +82,4 @@
|
|||
|
||||
(defmethod rc/render-release-notes "0.0"
|
||||
[params]
|
||||
(rc/render-release-notes (assoc params :version "1.10")))
|
||||
(rc/render-release-notes (assoc params :version "1.11")))
|
||||
|
|
89
frontend/src/app/main/ui/releases/v1_11.cljs
Normal file
89
frontend/src/app/main/ui/releases/v1_11.cljs
Normal file
|
@ -0,0 +1,89 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) UXBOX Labs SL
|
||||
|
||||
(ns app.main.ui.releases.v1-11
|
||||
(:require
|
||||
[app.main.ui.releases.common :as c]
|
||||
[rumext.alpha :as mf]))
|
||||
|
||||
(defmethod c/render-release-notes "1.11"
|
||||
[{:keys [slide klass next finish navigate version]}]
|
||||
(mf/html
|
||||
(case @slide
|
||||
:start
|
||||
[:div.modal-overlay
|
||||
[:div.animated {:class @klass}
|
||||
[:div.modal-container.onboarding.feature
|
||||
[:div.modal-left
|
||||
[:img {:src "images/login-on.jpg" :border "0" :alt "What's new Beta release 1.11"}]]
|
||||
[:div.modal-right
|
||||
[:div.modal-title
|
||||
[:h2 "What's new?"]]
|
||||
[:span.release "Beta version " version]
|
||||
[:div.modal-content
|
||||
[:p "Penpot continues growing with new features that improve performance, user experience and visual design."]
|
||||
[:p "We are happy to show you a sneak peak of the most important stuff that the Beta 1.11 version brings."]]
|
||||
[:div.modal-navigation
|
||||
[:button.btn-secondary {:on-click next} "Continue"]]]
|
||||
[:img.deco {:src "images/deco-left.png" :border "0"}]
|
||||
[:img.deco.right {:src "images/deco-right.png" :border "0"}]]]]
|
||||
|
||||
0
|
||||
[:div.modal-overlay
|
||||
[:div.animated {:class @klass}
|
||||
[:div.modal-container.onboarding.feature
|
||||
[:div.modal-left
|
||||
[:img {:src "images/features/1.11-animations.gif" :border "0" :alt "Animations"}]]
|
||||
[:div.modal-right
|
||||
[:div.modal-title
|
||||
[:h2 "Prototype animations"]]
|
||||
[:div.modal-content
|
||||
[:p "Bring your prototypes to life with animations! With animations now you can define the transition between artboards when an interaction is triggered."]
|
||||
[:p "Use dissolve, slide and push animations to fade screens and imitate gestures like swipe."]]
|
||||
[:div.modal-navigation
|
||||
[:button.btn-secondary {:on-click next} "Continue"]
|
||||
[:& c/navigation-bullets
|
||||
{:slide @slide
|
||||
:navigate navigate
|
||||
:total 3}]]]]]]
|
||||
|
||||
1
|
||||
[:div.modal-overlay
|
||||
[:div.animated {:class @klass}
|
||||
[:div.modal-container.onboarding.feature
|
||||
[:div.modal-left
|
||||
[:img {:src "images/features/1.11-bg-export.gif" :border "0" :alt "Ignore background on export"}]]
|
||||
[:div.modal-right
|
||||
[:div.modal-title
|
||||
[:h2 "Ignore artboard background on export"]]
|
||||
[:div.modal-content
|
||||
[:p "Sometimes you don’t need the artboards to be part of your designs, but only their support to work on them."]
|
||||
[:p "Now you can decide to include their backgrounds on your exports or leave them out."]]
|
||||
[:div.modal-navigation
|
||||
[:button.btn-secondary {:on-click next} "Continue"]
|
||||
[:& c/navigation-bullets
|
||||
{:slide @slide
|
||||
:navigate navigate
|
||||
:total 3}]]]]]]
|
||||
|
||||
2
|
||||
[:div.modal-overlay
|
||||
[:div.animated {:class @klass}
|
||||
[:div.modal-container.onboarding.feature
|
||||
[:div.modal-left
|
||||
[:img {:src "images/features/1.11-zoom-widget.gif" :border "0" :alt "New zoom widget"}]]
|
||||
[:div.modal-right
|
||||
[:div.modal-title
|
||||
[:h2 "New zoom widget"]]
|
||||
[:div.modal-content
|
||||
[:p "We’ve redesigned zooming menus to improve their usability and the consistency between zooming in the design workspace and in the view mode."]
|
||||
[:p "We’ve also added two new options to scale your designs at the view mode that might help you to make your presentations look better."]]
|
||||
[:div.modal-navigation
|
||||
[:button.btn-secondary {:on-click finish} "Start!"]
|
||||
[:& c/navigation-bullets
|
||||
{:slide @slide
|
||||
:navigate navigate
|
||||
:total 3}]]]]]])))
|
Loading…
Add table
Add a link
Reference in a new issue