mirror of
https://github.com/penpot/penpot.git
synced 2025-03-25 06:01:46 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
efc61241a0
13 changed files with 76 additions and 18 deletions
|
@ -88,6 +88,11 @@
|
|||
- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351)
|
||||
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
|
||||
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
|
||||
- Fix problem with SVG import [Github #4888](https://github.com/penpot/penpot/issues/4888)
|
||||
- Fix problem with overlay positions in viewer [Taiga #8464](https://tree.taiga.io/project/penpot/issue/8464)
|
||||
- Fix layer panel overflowing [Taiga #8665](https://tree.taiga.io/project/penpot/issue/8665)
|
||||
- Fix problem when creating a component instance from grid layout [Github #4881](https://github.com/penpot/penpot/issues/4881)
|
||||
- Fix problem when dismissing shared library update [Taiga #8669](https://tree.taiga.io/project/penpot/issue/8669)
|
||||
|
||||
## 2.1.5
|
||||
|
||||
|
|
|
@ -1058,7 +1058,7 @@
|
|||
(def ^:private schema:ignore-file-library-sync-status
|
||||
[:map {:title "ignore-file-library-sync-status"}
|
||||
[:file-id ::sm/uuid]
|
||||
[:date ::dt/duration]])
|
||||
[:date ::dt/instant]])
|
||||
|
||||
;; TODO: improve naming
|
||||
(sv/defmethod ::ignore-file-library-sync-status
|
||||
|
|
|
@ -141,21 +141,22 @@
|
|||
|
||||
;; --- INSTANT
|
||||
|
||||
(defn instant?
|
||||
[v]
|
||||
(instance? Instant v))
|
||||
|
||||
(defn instant
|
||||
([s]
|
||||
(if (int? s)
|
||||
(Instant/ofEpochMilli s)
|
||||
(Instant/parse s)))
|
||||
(cond
|
||||
(instant? s) s
|
||||
(int? s) (Instant/ofEpochMilli s)
|
||||
:else (Instant/parse s)))
|
||||
([s fmt]
|
||||
(case fmt
|
||||
:rfc1123 (Instant/from (.parse DateTimeFormatter/RFC_1123_DATE_TIME ^String s))
|
||||
:iso (Instant/from (.parse DateTimeFormatter/ISO_INSTANT ^String s))
|
||||
:iso8601 (Instant/from (.parse DateTimeFormatter/ISO_INSTANT ^String s)))))
|
||||
|
||||
(defn instant?
|
||||
[v]
|
||||
(instance? Instant v))
|
||||
|
||||
(defn is-after?
|
||||
[da db]
|
||||
(.isAfter ^Instant da ^Instant db))
|
||||
|
|
|
@ -1622,13 +1622,17 @@
|
|||
(defn remap-grid-cells
|
||||
"Remaps the shapes ids inside the cells"
|
||||
[shape ids-map]
|
||||
(let [do-remap-cells
|
||||
(let [remap-shape
|
||||
(fn [id]
|
||||
(get ids-map id id))
|
||||
|
||||
remap-cell
|
||||
(fn [cell]
|
||||
(-> cell
|
||||
(update :shapes #(into [] (keep ids-map) %))))
|
||||
(update :shapes #(into [] (keep remap-shape) %))))
|
||||
shape
|
||||
(-> shape
|
||||
(update :layout-grid-cells update-vals do-remap-cells))]
|
||||
(update :layout-grid-cells update-vals remap-cell))]
|
||||
shape))
|
||||
|
||||
(defn merge-cells
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
"highlight.js": "^11.9.0",
|
||||
"js-beautify": "^1.15.1",
|
||||
"jszip": "^3.10.1",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.4.4",
|
||||
"mousetrap": "^1.6.5",
|
||||
"opentype.js": "^1.3.4",
|
||||
|
|
|
@ -152,6 +152,16 @@
|
|||
(rx/of (rt/nav-raw href)))
|
||||
(rx/throw cause))))
|
||||
|
||||
(defn- on-fetch-profile-exception
|
||||
[cause]
|
||||
(let [data (ex-data cause)]
|
||||
(if (and (= :authorization (:type data))
|
||||
(= :challenge-required (:code data)))
|
||||
(let [path (rt/get-current-path)
|
||||
href (str "/challenge.html?redirect=" path)]
|
||||
(rx/of (rt/nav-raw href)))
|
||||
(rx/throw cause))))
|
||||
|
||||
(defn fetch-profile
|
||||
[]
|
||||
(ptk/reify ::fetch-profile
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
(let [id (d/nilv id (uuid/next))
|
||||
page-id (:current-page-id state)
|
||||
objects (wsh/lookup-page-objects state page-id)
|
||||
frame-id (ctst/top-nested-frame objects position)
|
||||
selected (if ignore-selection? #{} (wsh/lookup-selected state))
|
||||
base (cfh/get-base-shape objects selected)
|
||||
|
||||
|
@ -81,9 +80,16 @@
|
|||
selected-frame? (and (= 1 (count selected))
|
||||
(= :frame (dm/get-in objects [selected-id :type])))
|
||||
|
||||
base-id (:parent-id base)
|
||||
|
||||
frame-id (if (or selected-frame? (empty? selected)
|
||||
(not= :frame (dm/get-in objects [base-id :type])))
|
||||
(ctst/top-nested-frame objects position)
|
||||
base-id)
|
||||
|
||||
parent-id (if (or selected-frame? (empty? selected))
|
||||
frame-id
|
||||
(:parent-id base))
|
||||
base-id)
|
||||
|
||||
[new-shape new-children]
|
||||
(csvg.shapes-builder/create-svg-shapes id svg-data position objects frame-id parent-id selected true)
|
||||
|
|
|
@ -427,7 +427,8 @@
|
|||
(let [childs (mapv #(get objects %) (:shapes (unchecked-get props "shape")))
|
||||
props (obj/merge! #js {} props
|
||||
#js {:childs childs
|
||||
:objects objects})]
|
||||
:objects objects
|
||||
:all-objects all-objects})]
|
||||
(when (not-empty childs)
|
||||
[:> group-wrapper props])))))
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
overflow-x: hidden;
|
||||
overflow-y: overlay;
|
||||
scrollbar-gutter: stable;
|
||||
max-width: var(--width);
|
||||
}
|
||||
|
||||
.pages-list {
|
||||
|
|
29
frontend/src/app/util/functions.cljs
Normal file
29
frontend/src/app/util/functions.cljs
Normal file
|
@ -0,0 +1,29 @@
|
|||
;; 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) KALEIDOS INC
|
||||
|
||||
(ns app.util.functions
|
||||
"A functions helpers"
|
||||
(:require
|
||||
["lodash/debounce.js" :as lodash-debounce]))
|
||||
|
||||
;; NOTE: this is needed because depending on the type of the build and
|
||||
;; target execution evironment (browser, esm), the real export can be
|
||||
;; different. All this issue is about the commonjs and esm
|
||||
;; interop/conversion, because the js ecosystem decided that is should
|
||||
;; work this way.
|
||||
;;
|
||||
;; In this concrete case, lodash exposes commonjs module which works
|
||||
;; ok on browser build but for ESM build it is converted in the best
|
||||
;; effort to esm module, exporting the module.exports as the default
|
||||
;; property. This is why on ESM builds we need to look on .-default
|
||||
;; property.
|
||||
(def ^:private ext-debounce
|
||||
(or (.-default lodash-debounce)
|
||||
lodash-debounce))
|
||||
|
||||
(defn debounce
|
||||
[f timeout]
|
||||
(ext-debounce f timeout #{:leading false :trailing true}))
|
|
@ -13,7 +13,7 @@
|
|||
[app.main.data.events :as ev]
|
||||
[app.util.browser-history :as bhistory]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.globals :as globals]
|
||||
[app.util.globals :as globals]
|
||||
[app.util.timers :as ts]
|
||||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
(ns app.util.storage
|
||||
(:require
|
||||
["lodash/debounce" :as ldebounce]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.transit :as t]
|
||||
[app.util.functions :as fns]
|
||||
[app.util.globals :as g]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
|
@ -76,8 +76,7 @@
|
|||
(set! latest-state curr-state)))))
|
||||
|
||||
(defonce on-change
|
||||
(ldebounce on-change* 2000 #js {:leading false :trailing true}))
|
||||
|
||||
(fns/debounce on-change* 2000))
|
||||
|
||||
(defonce storage (atom latest-state))
|
||||
(add-watch storage :persistence
|
||||
|
|
|
@ -6647,6 +6647,7 @@ __metadata:
|
|||
js-beautify: "npm:^1.15.1"
|
||||
jsdom: "npm:^24.1.0"
|
||||
jszip: "npm:^3.10.1"
|
||||
lodash: "npm:^4.17.21"
|
||||
luxon: "npm:^3.4.4"
|
||||
map-stream: "npm:0.0.7"
|
||||
marked: "npm:^12.0.2"
|
||||
|
|
Loading…
Add table
Reference in a new issue