mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 08:11:39 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
e012046f62
7 changed files with 129 additions and 104 deletions
|
@ -70,6 +70,7 @@
|
||||||
methods (add missing team-id prop)
|
methods (add missing team-id prop)
|
||||||
- Fix problem with viewer role and inspect mode [Taiga #9751](https://tree.taiga.io/project/penpot/issue/9751)
|
- Fix problem with viewer role and inspect mode [Taiga #9751](https://tree.taiga.io/project/penpot/issue/9751)
|
||||||
- Fix error when clicking on a comment at the viewer's sidebar [Taiga #10465](https://tree.taiga.io/project/penpot/issue/10465)
|
- Fix error when clicking on a comment at the viewer's sidebar [Taiga #10465](https://tree.taiga.io/project/penpot/issue/10465)
|
||||||
|
- Internal error when install a plugin by penpothub - Try plugin [Taiga #10542](https://tree.taiga.io/project/penpot/issue/10542)
|
||||||
|
|
||||||
## 2.5.3
|
## 2.5.3
|
||||||
|
|
||||||
|
|
|
@ -169,20 +169,12 @@
|
||||||
(let [data (assoc data :pages-index pages-index)]
|
(let [data (assoc data :pages-index pages-index)]
|
||||||
(assoc file :data (d/removem (comp t/pointer? val) data))))))))))
|
(assoc file :data (d/removem (comp t/pointer? val) data))))))))))
|
||||||
|
|
||||||
(defn- libraries-fetched
|
(defn- check-libraries-synchronozation
|
||||||
[file-id libraries]
|
[file-id libraries]
|
||||||
(ptk/reify ::libraries-fetched
|
(ptk/reify ::check-libraries-synchronozation
|
||||||
ptk/UpdateEvent
|
|
||||||
(update [_ state]
|
|
||||||
(let [libraries (->> libraries
|
|
||||||
(map (fn [l] (assoc l :library-of file-id)))
|
|
||||||
(d/index-by :id))]
|
|
||||||
(update state :files merge libraries)))
|
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
(let [file (dsh/lookup-file state)
|
(let [file (dsh/lookup-file state file-id)
|
||||||
file-id (get file :id)
|
|
||||||
ignore-until (get file :ignore-sync-until)
|
ignore-until (get file :ignore-sync-until)
|
||||||
|
|
||||||
needs-check?
|
needs-check?
|
||||||
|
@ -195,6 +187,23 @@
|
||||||
(->> (rx/of (dwl/notify-sync-file file-id))
|
(->> (rx/of (dwl/notify-sync-file file-id))
|
||||||
(rx/delay 1000)))))))
|
(rx/delay 1000)))))))
|
||||||
|
|
||||||
|
(defn- library-resolved
|
||||||
|
[library]
|
||||||
|
(ptk/reify ::library-resolved
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
(update state :files assoc (:id library) library))))
|
||||||
|
|
||||||
|
(defn- libraries-fetched
|
||||||
|
[file-id libraries]
|
||||||
|
(ptk/reify ::libraries-fetched
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
(update state :files merge
|
||||||
|
(->> libraries
|
||||||
|
(map #(assoc % :library-of file-id))
|
||||||
|
(d/index-by :id))))))
|
||||||
|
|
||||||
(defn- fetch-libraries
|
(defn- fetch-libraries
|
||||||
[file-id]
|
[file-id]
|
||||||
(ptk/reify ::fetch-libries
|
(ptk/reify ::fetch-libries
|
||||||
|
@ -204,20 +213,22 @@
|
||||||
(->> (rp/cmd! :get-file-libraries {:file-id file-id})
|
(->> (rp/cmd! :get-file-libraries {:file-id file-id})
|
||||||
(rx/mapcat
|
(rx/mapcat
|
||||||
(fn [libraries]
|
(fn [libraries]
|
||||||
|
(rx/concat
|
||||||
|
(rx/of (libraries-fetched file-id libraries))
|
||||||
(rx/merge
|
(rx/merge
|
||||||
(->> (rx/from libraries)
|
(->> (rx/from libraries)
|
||||||
(rx/merge-map
|
(rx/merge-map
|
||||||
(fn [{:keys [id synced-at]}]
|
(fn [{:keys [id synced-at]}]
|
||||||
(->> (rp/cmd! :get-file {:id id :features features})
|
(->> (rp/cmd! :get-file {:id id :features features})
|
||||||
(rx/map #(assoc % :synced-at synced-at)))))
|
(rx/map #(assoc % :synced-at synced-at :library-of file-id)))))
|
||||||
(rx/merge-map resolve-file)
|
(rx/mapcat resolve-file)
|
||||||
(rx/reduce conj [])
|
(rx/map library-resolved))
|
||||||
(rx/map (partial libraries-fetched file-id)))
|
|
||||||
(->> (rx/from libraries)
|
(->> (rx/from libraries)
|
||||||
(rx/map :id)
|
(rx/map :id)
|
||||||
(rx/mapcat (fn [file-id]
|
(rx/mapcat (fn [file-id]
|
||||||
(rp/cmd! :get-file-object-thumbnails {:file-id file-id :tag "component"})))
|
(rp/cmd! :get-file-object-thumbnails {:file-id file-id :tag "component"})))
|
||||||
(rx/map dwl/library-thumbnails-fetched))))))))))
|
(rx/map dwl/library-thumbnails-fetched)))
|
||||||
|
(rx/of (check-libraries-synchronozation file-id libraries))))))))))
|
||||||
|
|
||||||
(defn- workspace-initialized
|
(defn- workspace-initialized
|
||||||
[file-id]
|
[file-id]
|
||||||
|
|
|
@ -40,10 +40,6 @@
|
||||||
(when (not (:workspace-visited props))
|
(when (not (:workspace-visited props))
|
||||||
(rx/of (du/update-profile-props {:workspace-visited true})))))))
|
(rx/of (du/update-profile-props {:workspace-visited true})))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; UNDO
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Toolbar
|
;; Toolbar
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -157,7 +157,8 @@
|
||||||
(rt/nav :workspace
|
(rt/nav :workspace
|
||||||
{:page-id (dm/get-in data [:pages 0])
|
{:page-id (dm/get-in data [:pages 0])
|
||||||
:project-id project-id
|
:project-id project-id
|
||||||
:file-id id})))
|
:file-id id
|
||||||
|
:team-id team-id})))
|
||||||
|
|
||||||
create-file!
|
create-file!
|
||||||
(fn [plugin]
|
(fn [plugin]
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
|
|
||||||
(mf/defc file-library-content*
|
(mf/defc file-library-content*
|
||||||
{::mf/private true}
|
{::mf/private true}
|
||||||
[{:keys [file is-local open-status-ref on-clear-selection filters colors media typographies components]}]
|
[{:keys [file is-local is-loaded open-status-ref on-clear-selection filters colors media typographies components]}]
|
||||||
(let [open-status (mf/deref open-status-ref)
|
(let [open-status (mf/deref open-status-ref)
|
||||||
|
|
||||||
file-id (:id file)
|
file-id (:id file)
|
||||||
|
@ -246,6 +246,9 @@
|
||||||
(st/emit! (dwu/commit-undo-transaction undo-id)))))]
|
(st/emit! (dwu/commit-undo-transaction undo-id)))))]
|
||||||
|
|
||||||
[:div {:class (stl/css :library-content)}
|
[:div {:class (stl/css :library-content)}
|
||||||
|
(if-not is-loaded
|
||||||
|
[:span {:class (stl/css :loading)} (tr "labels.loading")]
|
||||||
|
[:*
|
||||||
(when ^boolean show-components?
|
(when ^boolean show-components?
|
||||||
[:& components-section
|
[:& components-section
|
||||||
{:file-id file-id
|
{:file-id file-id
|
||||||
|
@ -318,7 +321,7 @@
|
||||||
[:span {:class (stl/css :no-found-icon)}
|
[:span {:class (stl/css :no-found-icon)}
|
||||||
i/search]
|
i/search]
|
||||||
[:span {:class (stl/css :no-found-text)}
|
[:span {:class (stl/css :no-found-text)}
|
||||||
(tr "workspace.assets.not-found")]])]))
|
(tr "workspace.assets.not-found")]])])]))
|
||||||
|
|
||||||
(mf/defc file-library*
|
(mf/defc file-library*
|
||||||
[{:keys [file is-local is-default-open filters]}]
|
[{:keys [file is-local is-default-open filters]}]
|
||||||
|
@ -333,9 +336,7 @@
|
||||||
typographies (:typographies library)
|
typographies (:typographies library)
|
||||||
|
|
||||||
filters-term (:term filters)
|
filters-term (:term filters)
|
||||||
|
is-loaded (some? library)
|
||||||
;; FIXME: maybe unused
|
|
||||||
;; has-term? (not (str/blank? filters-term))
|
|
||||||
|
|
||||||
filtered-colors
|
filtered-colors
|
||||||
(mf/with-memo [filters colors]
|
(mf/with-memo [filters colors]
|
||||||
|
@ -401,6 +402,7 @@
|
||||||
[:> file-library-content*
|
[:> file-library-content*
|
||||||
{:file file
|
{:file file
|
||||||
:is-local is-local
|
:is-local is-local
|
||||||
|
:is-loaded is-loaded
|
||||||
:filters filters
|
:filters filters
|
||||||
:colors filtered-colors
|
:colors filtered-colors
|
||||||
:components filtered-components
|
:components filtered-components
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) KALEIDOS INC
|
// Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
|
@use "../../../ds/typography.scss" as t;
|
||||||
@import "refactor/common-refactor.scss";
|
@import "refactor/common-refactor.scss";
|
||||||
.tool-window {
|
.tool-window {
|
||||||
padding: 0 0 $s-24 $s-12;
|
padding: 0 0 $s-24 $s-12;
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-name {
|
.file-name {
|
||||||
@include bodySmallTypography;
|
@include t.use-typography("body-small");
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -22,6 +23,16 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
@include t.use-typography("body-small");
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
height: $s-32;
|
||||||
|
padding-left: calc($s-12 + $s-2);
|
||||||
|
color: var(--color-foreground-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
.special-title {
|
.special-title {
|
||||||
@include textEllipsis;
|
@include textEllipsis;
|
||||||
color: var(--title-foreground-color-hover);
|
color: var(--title-foreground-color-hover);
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-wrapper {
|
.name-wrapper {
|
||||||
|
@include use-typography("code-font");
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.first-name-wrapper {
|
.first-name-wrapper {
|
||||||
|
@include use-typography("code-font");
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.last-name-wrapper {
|
.last-name-wrapper {
|
||||||
|
@include use-typography("code-font");
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue