mirror of
https://github.com/penpot/penpot.git
synced 2025-07-05 21:57:15 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
6d4e898f79
6 changed files with 69 additions and 53 deletions
|
@ -5,6 +5,7 @@
|
||||||
### :sparkles: New features
|
### :sparkles: New features
|
||||||
|
|
||||||
- Allow for nested and rotated boards inside other boards and groups [Taiga #2874](https://tree.taiga.io/project/penpot/us/2874?milestone=319982)
|
- Allow for nested and rotated boards inside other boards and groups [Taiga #2874](https://tree.taiga.io/project/penpot/us/2874?milestone=319982)
|
||||||
|
- View mode improvements to enable access and use in different conditions [Taiga #3023](https://tree.taiga.io/project/penpot/us/3023)
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
|
@ -20,12 +21,13 @@
|
||||||
- Multiple team invitations on onboarding [Taiga #3084](https://tree.taiga.io/project/penpot/us/3084)
|
- Multiple team invitations on onboarding [Taiga #3084](https://tree.taiga.io/project/penpot/us/3084)
|
||||||
- Change text properties position at the sidebar [Taiga #3047](https://tree.taiga.io/project/penpot/us/3047)
|
- Change text properties position at the sidebar [Taiga #3047](https://tree.taiga.io/project/penpot/us/3047)
|
||||||
- Group assets by drag and drop [Taiga #2831](https://tree.taiga.io/project/penpot/us/2831)
|
- Group assets by drag and drop [Taiga #2831](https://tree.taiga.io/project/penpot/us/2831)
|
||||||
- View mode improvements to enable access and use in different conditions [Taiga #3023](https://tree.taiga.io/project/penpot/us/3023)
|
- Navigate to the original link after log in [Taiga #3624](https://tree.taiga.io/project/penpot/issue/3624)
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
- Fix menu file not accessible in certain conditions [Taiga #3385](https://tree.taiga.io/project/penpot/issue/3385)
|
- Fix menu file not accessible in certain conditions [Taiga #3385](https://tree.taiga.io/project/penpot/issue/3385)
|
||||||
- Remove deprecated menu options [Taiga #3333](https://tree.taiga.io/project/penpot/issue/3333)
|
- Remove deprecated menu options [Taiga #3333](https://tree.taiga.io/project/penpot/issue/3333)
|
||||||
- Prototype connection should be under the rules [Taiga #3384](https://tree.taiga.io/project/penpot/issue/3384)
|
- Prototype connection should be under the rules [Taiga #3384](https://tree.taiga.io/project/penpot/issue/3384)
|
||||||
|
- Fix problem with empty text boxes events [Taiga #3627](https://tree.taiga.io/project/penpot/issue/3627)
|
||||||
|
|
||||||
|
|
||||||
## 1.13.5-beta
|
## 1.13.5-beta
|
||||||
|
|
|
@ -157,8 +157,13 @@
|
||||||
accepting invitation, or third party auth signup or singin."
|
accepting invitation, or third party auth signup or singin."
|
||||||
[profile]
|
[profile]
|
||||||
(letfn [(get-redirect-event []
|
(letfn [(get-redirect-event []
|
||||||
(let [team-id (:default-team-id profile)]
|
(let [team-id (:default-team-id profile)
|
||||||
(rt/nav' :dashboard-projects {:team-id team-id})))]
|
redirect-url (:redirect-url @storage)]
|
||||||
|
(if (some? redirect-url)
|
||||||
|
(do
|
||||||
|
(swap! storage dissoc :redirect-url)
|
||||||
|
(.replace js/location redirect-url))
|
||||||
|
(rt/nav' :dashboard-projects {:team-id team-id}))))]
|
||||||
(ptk/reify ::logged-in
|
(ptk/reify ::logged-in
|
||||||
IDeref
|
IDeref
|
||||||
(-deref [_] profile)
|
(-deref [_] profile)
|
||||||
|
|
|
@ -308,7 +308,7 @@
|
||||||
(assoc-in [:workspace-local :edition] (-> selected first :id)))))))
|
(assoc-in [:workspace-local :edition] (-> selected first :id)))))))
|
||||||
|
|
||||||
(defn not-changed? [old-dim new-dim]
|
(defn not-changed? [old-dim new-dim]
|
||||||
(> (mth/abs (- old-dim new-dim)) 0.1))
|
(> (mth/abs (- old-dim new-dim)) 1))
|
||||||
|
|
||||||
(defn resize-text
|
(defn resize-text
|
||||||
[id new-width new-height]
|
[id new-width new-height]
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
[app.util.globals :as glob]
|
[app.util.globals :as glob]
|
||||||
[app.util.i18n :refer [tr]]
|
[app.util.i18n :refer [tr]]
|
||||||
[app.util.router :as rt]
|
[app.util.router :as rt]
|
||||||
|
[app.util.storage :refer [storage]]
|
||||||
[app.util.timers :as ts]
|
[app.util.timers :as ts]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[potok.core :as ptk]))
|
[potok.core :as ptk]))
|
||||||
|
@ -50,9 +51,11 @@
|
||||||
;; here and not in app.main.errors because of circular dependency.
|
;; here and not in app.main.errors because of circular dependency.
|
||||||
(defmethod ptk/handle-error :authentication
|
(defmethod ptk/handle-error :authentication
|
||||||
[_]
|
[_]
|
||||||
(let [msg (tr "errors.auth.unable-to-login")]
|
(let [msg (tr "errors.auth.unable-to-login")
|
||||||
|
uri (. (. js/document -location) -href)]
|
||||||
(st/emit! (du/logout {:capture-redirect true}))
|
(st/emit! (du/logout {:capture-redirect true}))
|
||||||
(ts/schedule 500 #(st/emit! (msg/warn msg)))))
|
(ts/schedule 500 #(st/emit! (msg/warn msg)))
|
||||||
|
(ts/schedule 1000 #(swap! storage assoc :redirect-url uri))))
|
||||||
|
|
||||||
;; Error that happens on an active business model validation does not
|
;; Error that happens on an active business model validation does not
|
||||||
;; passes an validation (example: profile can't leave a team). From
|
;; passes an validation (example: profile can't leave a team). From
|
||||||
|
|
|
@ -271,20 +271,24 @@
|
||||||
(mf/deref text-modifier-ref)
|
(mf/deref text-modifier-ref)
|
||||||
|
|
||||||
bounding-box
|
bounding-box
|
||||||
(gsht/position-data-bounding-box text-modifier)]
|
(gsht/position-data-bounding-box text-modifier)
|
||||||
|
|
||||||
|
x (min (:x bounding-box) (:x shape))
|
||||||
|
y (min (:y bounding-box) (:y shape))
|
||||||
|
width (max (:width bounding-box) (:width shape))
|
||||||
|
height (max (:height bounding-box) (:height shape))]
|
||||||
|
|
||||||
[:g.text-editor {:clip-path (dm/fmt "url(#%)" clip-id)
|
[:g.text-editor {:clip-path (dm/fmt "url(#%)" clip-id)
|
||||||
:transform (dm/str (gsh/transform-matrix shape))}
|
:transform (dm/str (gsh/transform-matrix shape))}
|
||||||
[:defs
|
[:defs
|
||||||
[:clipPath {:id clip-id}
|
[:clipPath {:id clip-id}
|
||||||
[:rect {:x (min (:x bounding-box) (:x shape))
|
[:rect {:x (or x (:x shape))
|
||||||
:y (min (:y bounding-box) (:y shape))
|
:y (or y (:y shape))
|
||||||
:width (max (:width bounding-box) (:width shape))
|
:width (or width (:width shape))
|
||||||
:height (max (:height bounding-box) (:height shape))
|
:height (or height (:height shape))
|
||||||
:fill "red"}]]]
|
:fill "red"}]]]
|
||||||
|
|
||||||
[:foreignObject {:x (:x shape) :y (:y shape) :width "100%" :height "100%"
|
[:foreignObject {:x (:x shape) :y (:y shape) :width "100%" :height "100%"}
|
||||||
:externalResourcesRequired true}
|
|
||||||
[:div {:style {:position "absolute"
|
[:div {:style {:position "absolute"
|
||||||
:left 0
|
:left 0
|
||||||
:top 0
|
:top 0
|
||||||
|
|
|
@ -407,8 +407,7 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(on-asset-drag-start event component selected-components item-ref :components on-drag-start)))]
|
(on-asset-drag-start event component selected-components item-ref :components on-drag-start)))]
|
||||||
|
|
||||||
[:div {:key (:id component)
|
[:div {:ref item-ref
|
||||||
:ref item-ref
|
|
||||||
:class (dom/classnames
|
:class (dom/classnames
|
||||||
:selected (contains? selected-components (:id component))
|
:selected (contains? selected-components (:id component))
|
||||||
:grid-cell @listing-thumbs?
|
:grid-cell @listing-thumbs?
|
||||||
|
@ -426,8 +425,9 @@
|
||||||
[:& component-svg {:group (get-in component [:objects (:id component)])
|
[:& component-svg {:group (get-in component [:objects (:id component)])
|
||||||
:objects (:objects component)}]
|
:objects (:objects component)}]
|
||||||
(let [renaming? (= renaming (:id component))]
|
(let [renaming? (= renaming (:id component))]
|
||||||
|
[:*
|
||||||
[:& editable-label
|
[:& editable-label
|
||||||
{:class (dom/classnames
|
{:class-name (dom/classnames
|
||||||
:cell-name @listing-thumbs?
|
:cell-name @listing-thumbs?
|
||||||
:item-name (not @listing-thumbs?)
|
:item-name (not @listing-thumbs?)
|
||||||
:editing renaming?)
|
:editing renaming?)
|
||||||
|
@ -442,7 +442,7 @@
|
||||||
:on-change do-rename
|
:on-change do-rename
|
||||||
:on-cancel cancel-rename}]
|
:on-cancel cancel-rename}]
|
||||||
(when @dragging?
|
(when @dragging?
|
||||||
[:div.dragging]))]))
|
[:div.dragging])])]))
|
||||||
|
|
||||||
(mf/defc components-group
|
(mf/defc components-group
|
||||||
[{:keys [file-id prefix groups open-groups renaming listing-thumbs? selected-components on-asset-click
|
[{:keys [file-id prefix groups open-groups renaming listing-thumbs? selected-components on-asset-click
|
||||||
|
@ -510,6 +510,7 @@
|
||||||
[:div.drop-space])
|
[:div.drop-space])
|
||||||
(for [component components]
|
(for [component components]
|
||||||
[:& components-item {:component component
|
[:& components-item {:component component
|
||||||
|
:key (:id component)
|
||||||
:renaming renaming
|
:renaming renaming
|
||||||
:listing-thumbs? listing-thumbs?
|
:listing-thumbs? listing-thumbs?
|
||||||
:selected-components selected-components
|
:selected-components selected-components
|
||||||
|
@ -751,8 +752,7 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(on-asset-drag-start event object selected-objects item-ref :graphics on-drag-start)))]
|
(on-asset-drag-start event object selected-objects item-ref :graphics on-drag-start)))]
|
||||||
|
|
||||||
[:div {:key (:id object)
|
[:div {:ref item-ref
|
||||||
:ref item-ref
|
|
||||||
:class-name (dom/classnames
|
:class-name (dom/classnames
|
||||||
:selected (contains? selected-objects (:id object))
|
:selected (contains? selected-objects (:id object))
|
||||||
:grid-cell @listing-thumbs?
|
:grid-cell @listing-thumbs?
|
||||||
|
@ -769,6 +769,7 @@
|
||||||
:draggable false}] ;; Also need to add css pointer-events: none
|
:draggable false}] ;; Also need to add css pointer-events: none
|
||||||
|
|
||||||
(let [renaming? (= renaming (:id object))]
|
(let [renaming? (= renaming (:id object))]
|
||||||
|
[:*
|
||||||
[:& editable-label
|
[:& editable-label
|
||||||
{:class-name (dom/classnames
|
{:class-name (dom/classnames
|
||||||
:cell-name @listing-thumbs?
|
:cell-name @listing-thumbs?
|
||||||
|
@ -785,7 +786,7 @@
|
||||||
:on-change do-rename
|
:on-change do-rename
|
||||||
:on-cancel cancel-rename}]
|
:on-cancel cancel-rename}]
|
||||||
(when @dragging?
|
(when @dragging?
|
||||||
[:div.dragging]))]))
|
[:div.dragging])])]))
|
||||||
|
|
||||||
(mf/defc graphics-group
|
(mf/defc graphics-group
|
||||||
[{:keys [file-id prefix groups open-groups renaming listing-thumbs? selected-objects on-asset-click
|
[{:keys [file-id prefix groups open-groups renaming listing-thumbs? selected-objects on-asset-click
|
||||||
|
@ -852,7 +853,8 @@
|
||||||
(some? groups))
|
(some? groups))
|
||||||
[:div.drop-space])
|
[:div.drop-space])
|
||||||
(for [object objects]
|
(for [object objects]
|
||||||
[:& graphics-item {:object object
|
[:& graphics-item {:key (:id object)
|
||||||
|
:object object
|
||||||
:renaming renaming
|
:renaming renaming
|
||||||
:listing-thumbs? listing-thumbs?
|
:listing-thumbs? listing-thumbs?
|
||||||
:selected-objects selected-objects
|
:selected-objects selected-objects
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue