Compare commits

..

16 Commits

Author SHA1 Message Date
Andrey Antukh
60af8d0bcb Merge pull request #5520 from penpot/azazeln28-fix-text-editor-issue-9285
Fix Copy/Paste text into the text block
2025-01-07 14:26:11 +01:00
Juanfran
d652ed8e68 Merge pull request #5519 from penpot/alotor-fix-plugins-current-user
🐛 Fix problem with currentUser in plugins
2025-01-07 14:05:07 +01:00
AzazelN28
09d73a2f51 🐛 Fix pasting text changes opacity to 0 2025-01-07 13:48:32 +01:00
alonso.torres
7d4535ebd4 🐛 Fix problem with currentUser in plugins 2025-01-07 13:03:56 +01:00
Andrey Antukh
a5a53219bf Merge remote-tracking branch 'origin/main' into staging 2025-01-07 12:00:09 +01:00
Marina López
8716f81765 Merge pull request #5456 from daledesilva/patch-1
📚 Add submission form link to deployment page
2025-01-07 10:58:05 +01:00
Andrey Antukh
7aa46a1f62 🔥 Remove 2.4.1 from changelog 2025-01-07 10:51:46 +01:00
Andrey Antukh
d62eb3d3f4 Merge pull request #5504 from penpot/palba-add-feature-flags-to-events
 Add feature flags info to posthog events
2025-01-07 09:34:22 +01:00
Pablo Alba
e4c427609d Add feature flags info to posthog events 2025-01-07 09:19:04 +01:00
Aitor Moreno
883a26845a Merge pull request #5510 from penpot/alotor-fix-thumbnail-generation
🐛 Fix problem with thumbnail generation when changing between ver…
2025-01-02 12:46:59 +01:00
alonso.torres
bcdf5d86ae 🐛 Fix problem with thumbnail generation when changing between versions 2025-01-02 12:01:30 +01:00
Pablo Alba
3eab9da74e Merge pull request #5492 from penpot/alotor-christmas-bugfixes
🐛 Fix problem with component swap style
2024-12-26 16:39:23 +01:00
alonso.torres
2813fda136 🐛 Fix problem with component swap style 2024-12-23 12:37:24 +01:00
Andrey Antukh
a0022a804b Merge branch 'backrunner-patch/backrunner_nginx-conf' into staging 2024-12-23 10:28:34 +01:00
BackRunner
068acb4303 🐛 Fix assets proxy ssl handshake error 2024-12-23 10:28:10 +01:00
Dale de Silva
dbeebf181f 📚 Add submission form link to deployment page
The plugin submission page is hard to find while looking at the plugin help docs (As it's not linked from there). It should eventually be a page of its own but there isn't enough content yet (or an illustration) to support it.
2024-12-11 23:51:11 +11:00
12 changed files with 72 additions and 36 deletions

View File

@@ -32,6 +32,7 @@
- Fix problem with some texts desynchronization [Taiga #9379](https://tree.taiga.io/project/penpot/issue/9379)
- Fix problem with reoder grid layers [#5446](https://github.com/penpot/penpot/issues/5446)
- Fix problem with swap component style [#9542](https://tree.taiga.io/project/penpot/issue/9542)
## 2.3.3

View File

@@ -90,6 +90,7 @@ http {
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_pass $redirect_uri;
proxy_ssl_server_name on;
add_header x-internal-redirect "$redirect_uri";
add_header x-cache-control "$redirect_cache_control";

View File

@@ -92,6 +92,7 @@ http {
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_ssl_server_name on;
proxy_pass $redirect_uri;
add_header x-internal-redirect "$redirect_uri";

View File

@@ -216,3 +216,9 @@ Success! - Published to example-plugin-penpot.surge.sh
```
5. Done!
## 3.5. Submitting to Penpot
To make your finished plugin available in our catalog, submit in on the [plugin submission page](https://penpot.app/penpothub/plugins/create-plugin). Once it becomes available any Penpot user will be able to install and use it.

View File

@@ -143,6 +143,11 @@
(let [f (obj/get global "externalSessionId")]
(when (fn? f) (f))))
(defn external-context-info
[]
(let [f (obj/get global "externalContextInfo")]
(when (fn? f) (f))))
;; --- Helper Functions
(defn ^boolean check-browser? [candidate]

View File

@@ -8,6 +8,7 @@
(:require
["ua-parser-js" :as ua]
[app.common.data :as d]
[app.common.json :as json]
[app.common.logging :as l]
[app.config :as cf]
[app.main.repo :as rp]
@@ -93,6 +94,11 @@
data
data))
(defn add-external-context-info
[context]
(let [external-context-info (json/->clj (cf/external-context-info))]
(merge context external-context-info)))
(defn- process-event-by-proto
[event]
(let [data (d/deep-merge (-data event) (meta event))
@@ -102,6 +108,7 @@
(assoc :event-origin (::origin data))
(assoc :event-namespace (namespace type))
(assoc :event-symbol ev-name)
(add-external-context-info)
(d/without-nils))
props (-> data d/without-qualified simplify-props)]
@@ -119,6 +126,7 @@
(let [type (::type data "action")
context (-> (::context data)
(assoc :event-origin (::origin data))
(add-external-context-info)
(d/without-nils))
props (-> data d/without-qualified simplify-props)]
{:type type

View File

@@ -52,6 +52,11 @@
(defonce queue
(q/create find-request (/ 1000 30)))
(defn clear-queue!
[]
(l/dbg :hint "clearing thumbnail queue")
(q/clear! queue))
;; This function first renders the HTML calling `render/render-frame` that
;; returns HTML as a string, then we send that data to the iframe rasterizer
;; that returns the image as a Blob. Finally we create a URI for that blob.

View File

@@ -11,6 +11,7 @@
[app.main.data.events :as ev]
[app.main.data.persistence :as dwp]
[app.main.data.workspace :as dw]
[app.main.data.workspace.thumbnails :as th]
[app.main.refs :as refs]
[app.main.repo :as rp]
[app.util.time :as dt]
@@ -132,6 +133,7 @@
(rx/filter #(or (nil? %) (= :saved %)))
(rx/take 1)
(rx/mapcat #(rp/cmd! :restore-file-snapshot {:file-id file-id :id id}))
(rx/tap #(th/clear-queue!))
(rx/map #(dw/initialize-file project-id file-id)))
(case origin
:version

View File

@@ -402,6 +402,7 @@
.component-swap {
padding-top: $s-12;
max-width: $s-248;
}
.component-swap-content {

View File

@@ -18,26 +18,24 @@
(defn- add-session-properties
[user-proxy session-id]
(let [plugin-id (obj/get user-proxy "$plugin")]
(crc/add-properties!
user-proxy
{:name "$plugin" :enumerable false :get (constantly plugin-id)}
{:name "$session" :enumerable false :get (constantly session-id)}
(crc/add-properties!
user-proxy
{:name "$session" :enumerable false :get (constantly session-id)}
{:name "id"
:get (fn [_] (-> (u/locate-profile session-id) :id str))}
{:name "id"
:get (fn [_] (-> (u/locate-profile session-id) :id str))}
{:name "name"
:get (fn [_] (-> (u/locate-profile session-id) :fullname))}
{:name "name"
:get (fn [_] (-> (u/locate-profile session-id) :fullname))}
{:name "avatarUrl"
:get (fn [_] (cfg/resolve-profile-photo-url (u/locate-profile session-id)))}
{:name "avatarUrl"
:get (fn [_] (cfg/resolve-profile-photo-url (u/locate-profile session-id)))}
{:name "color"
:get (fn [_] (-> (u/locate-presence session-id) :color))}
{:name "color"
:get (fn [_] (-> (u/locate-presence session-id) :color))}
{:name "sessionId"
:get (fn [_] (str session-id))})))
{:name "sessionId"
:get (fn [_] (str session-id))}))
(defn current-user-proxy? [p]
@@ -46,7 +44,8 @@
(defn current-user-proxy
[plugin-id session-id]
(-> (obj/reify {:name "CurrentUserProxy"}
:$plugin {:enumerable false :get (fn [] plugin-id)})
:$plugin
{:enumerable false :get (fn [] plugin-id)})
(add-session-properties session-id)))
(defn active-user-proxy? [p]
@@ -55,7 +54,8 @@
(defn active-user-proxy
[plugin-id session-id]
(-> (obj/reify {:name "ActiveUserProxy"}
:$plugin {:enumerable false :get (fn [] plugin-id)}
:$plugin
{:enumerable false :get (fn [] plugin-id)}
:position
{:get (fn [] (-> (u/locate-presence session-id) :point format/format-point))}
@@ -66,19 +66,16 @@
(defn- add-user-properties
[user-proxy data]
(let [plugin-id (obj/get user-proxy "$plugin")]
(crc/add-properties!
user-proxy
{:name "$plugin" :enumerable false :get (constantly plugin-id)}
(crc/add-properties!
user-proxy
{:name "id"
:get (fn [_] (-> data :id str))}
{:name "id"
:get (fn [_] (-> data :id str))}
{:name "name"
:get (fn [_] (-> data :fullname))}
{:name "name"
:get (fn [_] (-> data :fullname))}
{:name "avatarUrl"
:get (fn [_] (cfg/resolve-profile-photo-url data))})))
{:name "avatarUrl"
:get (fn [_] (cfg/resolve-profile-photo-url data))}))
(defn user-proxy
[plugin-id data]

View File

@@ -9,6 +9,7 @@
(:require
[app.common.logging :as l]
[app.common.math :as mth]
[app.util.object :as obj]
[app.util.time :as t]
[beicon.v2.core :as rx]))
@@ -47,13 +48,14 @@
;; NOTE: Right now there are no cases where we need to cancel a process
;; but if we do, we can use this function
;; (defn- cancel-process
;; [queue]
;; (l/dbg :hint "queue::cancel-process")
;; (let [timeout (unchecked-get queue "timeout")]
;; (when (some? timeout)
;; (js/clearTimeout timeout))
;; (unchecked-set queue "timeout" nil)))
(defn- cancel-process!
[queue]
(l/dbg :hint "queue::cancel-process")
(let [timeout (unchecked-get queue "timeout")]
(when (some? timeout)
(js/clearTimeout timeout))
(unchecked-set queue "timeout" nil))
queue)
(defn- process
[queue iterations]
@@ -131,3 +133,10 @@
(enqueue-last queue request))))
(rx/to-observable result)))
(defn clear!
[queue]
(-> queue
(cancel-process!)
(obj/set! "items" #js [])
(obj/set! "time" 0)))

View File

@@ -139,7 +139,7 @@ export function normalizeStyles(node, styleDefaults = getStyleDefaultsDeclaratio
// a --fills CSS variable property.
const fills = styleDeclaration.getPropertyValue("--fills");
const color = styleDeclaration.getPropertyValue("color");
if (color) {
if (color && !fills) {
styleDeclaration.removeProperty("color");
styleDeclaration.setProperty("--fills", getFills(color));
} else {