0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

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

This commit is contained in:
Alejandro Alonso 2024-09-24 09:42:56 +02:00
commit 21aa8b0703
9 changed files with 27 additions and 9 deletions

View file

@ -18,6 +18,10 @@
### :boom: Breaking changes & Deprecations
- Removed "merge assets" option when exporting ".svg + .json" files. After the components changes the option wasn't
working properly and we're planning to change the format soon. We think it's better to deprecate the option for the
time being.
### :heart: Community contributions (Thank you!)
- Set proper default tenant on exporter (by @june128) [#4946](https://github.com/penpot/penpot/pull/4946)
@ -97,6 +101,7 @@
- Fix issue when exporting libraries when merging libraries [Taiga #8758](https://tree.taiga.io/project/penpot/issue/8758)
- Fix problem with comments max length [Taiga #8778](https://tree.taiga.io/project/penpot/issue/8778)
- Fix copy/paste images in Safari [Taiga #8771](https://tree.taiga.io/project/penpot/issue/8771)
- Fix swap when the copy is the only child of a group [#5075](https://github.com/penpot/penpot/issues/5075)
## 2.1.5

View file

@ -711,6 +711,7 @@
(d/update-in-when [pid :shapes] d/without-obj sid)
(d/update-in-when [pid :shapes] d/vec-without-nils)
(cond-> component? (d/update-when pid #(dissoc % :remote-synced))))))))
(update-parent-id [objects id]
(-> objects
(d/update-when id assoc :parent-id parent-id)))

View file

@ -149,7 +149,11 @@
empty-parents
;; Any parent whose children are all deleted, must be deleted too.
(into (d/ordered-set) (find-all-empty-parents #{}))
;; Unless we are during a component swap: in this case we are replacing a shape by
;; other one, so must not delete empty parents.
(if-not component-swap
(into (d/ordered-set) (find-all-empty-parents #{}))
#{})
components-to-delete
(if components-v2

View file

@ -118,9 +118,9 @@
(mf/defc tab-switcher*
{::mf/props :obj
::mf/schema schema:tab-switcher}
[{:keys [tabs class on-change-tab default-selected action-button-position action-button] :rest props}]
(let [selected* (mf/use-state #(get-selected-tab-id tabs default-selected))
selected (deref selected*)
[{:keys [tabs class on-change-tab default-selected selected action-button-position action-button] :rest props}]
(let [selected* (mf/use-state #(or selected (get-selected-tab-id tabs default-selected)))
selected (or selected (deref selected*))
tabs-nodes-refs (mf/use-ref nil)
tabs-ref (mf/use-ref nil)

View file

@ -369,7 +369,9 @@
selected (:selected state)
status (:status state)
;; We've deprecated the merge option on non-binary files because it wasn't working
;; and we're planning to remove this export in future releases.
export-types (if binary? export-types [:all :detach])
start-export
(mf/use-fn

View file

@ -57,7 +57,7 @@
(def ^:private schema:invite-form
[:map {:title "InviteForm"}
[:role :keyword]
[:emails [::sm/set {:kind ::sm/email}]]])
[:emails {:optional true} [::sm/set {:kind ::sm/email}]]])
(defn- get-available-roles
[]

View file

@ -244,7 +244,8 @@
(fn [result]
(reset! images-data* result)))))
[:div {:class (stl/css :element-options)}
[:div {:class (stl/css-case :element-options true
:viewer-code-block (= :viewer from))}
[:div {:class (stl/css :attributes-block)}
[:button {:class (stl/css :download-button)
:on-click handle-copy-all-code}

View file

@ -9,7 +9,7 @@
.element-options {
display: flex;
flex-direction: column;
height: calc(100vh - #{$s-128}); // TODO: Fix this hardcoded value
height: calc(100vh - #{$s-160}); // TODO: Fix this hardcoded value
overflow: hidden;
padding-bottom: $s-16;
overflow-y: auto;
@ -17,6 +17,10 @@
scrollbar-gutter: stable;
}
.viewer-code-block {
height: calc(100vh - #{$s-108}); // TODO: Fix this hardcoded value
}
.download-button {
@extend .button-secondary;
@include uppercaseTitleTipography;

View file

@ -136,7 +136,8 @@
:else
[:div {:class (stl/css :settings-bar-content)}
[:> tab-switcher* {:tabs tabs
:default-selected (dm/str section)
:default-selected "layers"
:selected (name section)
:on-change-tab on-tab-change
:class (stl/css :left-sidebar-tabs)
:action-button-position "start"