🔧 Fix typos in source code

Found via `codespell -q 3 -S *.po,./frontend/yarn.lock -L childs,clen,fpr,inflight,ody,ot,ro,te,trys,ue`
This commit is contained in:
luz paz 2022-10-02 14:00:19 -04:00 committed by Andrey Antukh
parent ac4218a3c2
commit e30bea0b6f
72 changed files with 110 additions and 110 deletions

View file

@ -21,7 +21,7 @@
- Removed the support for v2 internal file data blob format. This - Removed the support for v2 internal file data blob format. This
version has never been documented nor set as default value so version has never been documented nor set as default value so
technicaly this is not a breaking change because we are removing technically this is not a breaking change because we are removing
a "private API". a "private API".
### :sparkles: New features ### :sparkles: New features
@ -139,7 +139,7 @@
- The `PENPOT_LDAP_ATTRS_PHOTO` finally removed, it was unused for many - The `PENPOT_LDAP_ATTRS_PHOTO` finally removed, it was unused for many
versions. versions.
- If you are using social login (google, github, gitlab or generic OIDC) you - If you are using social login (google, github, gitlab or generic OIDC) you
will need to ensure to add the following flags respectivelly to let them will need to ensure to add the following flags respectively to let them
enabled: `enable-login-with-google`, `enable-login-with-github`, enabled: `enable-login-with-google`, `enable-login-with-github`,
`enable-login-with-gitlab` and `enable-login-with-oidc`. If not, they will `enable-login-with-gitlab` and `enable-login-with-oidc`. If not, they will
remain disabled after application start independently if you set the client-id remain disabled after application start independently if you set the client-id
@ -244,7 +244,7 @@
- Fix undo when drawing curves [Taiga #3523](https://tree.taiga.io/project/penpot/issue/3523) - Fix undo when drawing curves [Taiga #3523](https://tree.taiga.io/project/penpot/issue/3523)
- Fix issue with text edition and certain fonts (WorkSans, Raleway, ...) and foreign objects [Taiga #3521](https://tree.taiga.io/project/penpot/issue/3521) - Fix issue with text edition and certain fonts (WorkSans, Raleway, ...) and foreign objects [Taiga #3521](https://tree.taiga.io/project/penpot/issue/3521)
- Fix thumbnail generation when concurrent edition [Taiga #3522](https://tree.taiga.io/project/penpot/issue/3522) - Fix thumbnail generation when concurrent edition [Taiga #3522](https://tree.taiga.io/project/penpot/issue/3522)
- Fix environment imporot for exporter in Docker - Fix environment import for exporter in Docker
- Fix auto scroll layers in Firefox [Taiga #3531](https://tree.taiga.io/project/penpot/issue/3531) - Fix auto scroll layers in Firefox [Taiga #3531](https://tree.taiga.io/project/penpot/issue/3531)
- Fix base background not visible for imported SVG - Fix base background not visible for imported SVG
@ -328,7 +328,7 @@
- Fix mouse leave in handoff close overlay animation breaks [Taiga #3173](https://tree.taiga.io/project/penpot/issue/3173) - Fix mouse leave in handoff close overlay animation breaks [Taiga #3173](https://tree.taiga.io/project/penpot/issue/3173)
- Fix different behaviour during image drag [Taiga #2279](https://tree.taiga.io/project/penpot/issue/2279) - Fix different behaviour during image drag [Taiga #2279](https://tree.taiga.io/project/penpot/issue/2279)
- Fix hidden file name on import [Taiga #3172](https://tree.taiga.io/project/penpot/issue/3172) - Fix hidden file name on import [Taiga #3172](https://tree.taiga.io/project/penpot/issue/3172)
- Fix unneccessary scrollbars at the color list [Taiga #3211](https://tree.taiga.io/project/penpot/issue/3211) - Fix unnecessary scrollbars at the color list [Taiga #3211](https://tree.taiga.io/project/penpot/issue/3211)
- "Show in exports" is showing in multiselections [Taiga #3194](https://tree.taiga.io/project/penpot/issue/3194) - "Show in exports" is showing in multiselections [Taiga #3194](https://tree.taiga.io/project/penpot/issue/3194)
- Edit file name navigates to the file workspace [Taiga #3183](https://tree.taiga.io/project/penpot/issue/3183) - Edit file name navigates to the file workspace [Taiga #3183](https://tree.taiga.io/project/penpot/issue/3183)
- Fix scroll into view behind fixed element [Taiga #3170](https://tree.taiga.io/project/penpot/issue/3170) - Fix scroll into view behind fixed element [Taiga #3170](https://tree.taiga.io/project/penpot/issue/3170)
@ -337,7 +337,7 @@
- Fix duplicate multi selected elements [Taiga #3155](https://tree.taiga.io/project/penpot/issue/3155) - Fix duplicate multi selected elements [Taiga #3155](https://tree.taiga.io/project/penpot/issue/3155)
- Fix add fills to artboard modify children [Taiga #3151](https://tree.taiga.io/project/penpot/issue/3151) - Fix add fills to artboard modify children [Taiga #3151](https://tree.taiga.io/project/penpot/issue/3151)
- Avoid numeric inputs to allow big numbers [Taiga #2858](https://tree.taiga.io/project/penpot/issue/2858) - Avoid numeric inputs to allow big numbers [Taiga #2858](https://tree.taiga.io/project/penpot/issue/2858)
- Fix component contex menu size [Taiga #2480](https://tree.taiga.io/project/penpot/issue/2480) - Fix component context menu size [Taiga #2480](https://tree.taiga.io/project/penpot/issue/2480)
- Add shadow to artboard make it lose the fill [Taiga #3139](https://tree.taiga.io/project/penpot/issue/3139) - Add shadow to artboard make it lose the fill [Taiga #3139](https://tree.taiga.io/project/penpot/issue/3139)
- Avoid numeric inputs to change its value without focusing them [Taiga #3140](https://tree.taiga.io/project/penpot/issue/3140) - Avoid numeric inputs to change its value without focusing them [Taiga #3140](https://tree.taiga.io/project/penpot/issue/3140)
- Fix comments modal when changing pages [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2508) - Fix comments modal when changing pages [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2508)
@ -466,7 +466,7 @@
- Fix issue on handling empty content on boolean shapes - Fix issue on handling empty content on boolean shapes
- Fix race condition issue on component renaming - Fix race condition issue on component renaming
- Handle EOF errors on writting streamed response - Handle EOF errors on writing streamed response
- Handle EOF errors on websocket send/ping methods - Handle EOF errors on websocket send/ping methods
- Disable parallel upload of file media on import (causes too much - Disable parallel upload of file media on import (causes too much
contention on the rlimit subsistem that does not works as expected contention on the rlimit subsistem that does not works as expected
@ -578,7 +578,7 @@
## 1.10.4-beta ## 1.10.4-beta
### :sparkles: Enhacements ### :sparkles: Enhancements
- Allow parametrice file snapshoting interval - Allow parametrice file snapshoting interval
@ -590,7 +590,7 @@
## 1.10.3-beta ## 1.10.3-beta
### :sparkles: Enhacements ### :sparkles: Enhancements
- Make all logging asynchronous, this avoid some overhead on jetty threads at cost of logging latency. - Make all logging asynchronous, this avoid some overhead on jetty threads at cost of logging latency.
- Increase default session time to 15 days. - Increase default session time to 15 days.
@ -926,7 +926,7 @@
- Add better auth module logging. - Add better auth module logging.
- Add missing `email` scope to OIDC backend. - Add missing `email` scope to OIDC backend.
- Add missing cause prop on error loging. - Add missing cause prop on error logging.
- Fix empty font-family handling on custom fonts page. - Fix empty font-family handling on custom fonts page.
- Fix incorrect unicode code points handling on draft-to-penpot conversion. - Fix incorrect unicode code points handling on draft-to-penpot conversion.
- Fix some problems with paths. - Fix some problems with paths.

View file

@ -99,7 +99,7 @@ Each commit should have:
- An entry on the CHANGES.md file if applicable, referencing the - An entry on the CHANGES.md file if applicable, referencing the
github or taiga issue/user-story using the these same rules. github or taiga issue/user-story using the these same rules.
Examples of good commit messags: Examples of good commit messages:
- :bug: Fix unexpected error on launching modal - :bug: Fix unexpected error on launching modal
- :bug: Set proper error message on generic error - :bug: Set proper error message on generic error

View file

@ -77,7 +77,7 @@ Debug Main Page
<legend>Import binfile:</legend> <legend>Import binfile:</legend>
<desc>Import penpot file in binary <desc>Import penpot file in binary
format. If <strong>overwrite</strong> is checked, all files will format. If <strong>overwrite</strong> is checked, all files will
be overwriten using the same ids found in the file instead of be overwritten using the same ids found in the file instead of
generating a new ones.</desc> generating a new ones.</desc>
<form method="post" enctype="multipart/form-data" action="/dbg/file/import"> <form method="post" enctype="multipart/form-data" action="/dbg/file/import">
@ -90,7 +90,7 @@ Debug Main Page
<input type="checkbox" name="overwrite" /> <input type="checkbox" name="overwrite" />
<br /> <br />
<small> <small>
Instead of creating a new file with all relations remaped, Instead of creating a new file with all relations remapped,
reuses all ids and updates/overwrites the objects that are reuses all ids and updates/overwrites the objects that are
already exists on the database. already exists on the database.
<strong>Warning, this operation should be used with caution.</strong> <strong>Warning, this operation should be used with caution.</strong>
@ -111,7 +111,7 @@ Debug Main Page
<input type="checkbox" name="ignore-index-errors" checked/> <input type="checkbox" name="ignore-index-errors" checked/>
<br /> <br />
<small> <small>
Do not break on index lookup erros (remap operation). Do not break on index lookup errors (remap operation).
Useful when importing a broken file that has broken Useful when importing a broken file that has broken
relations or missing pieces. relations or missing pieces.
</small> </small>

View file

@ -111,7 +111,7 @@
:id :verbosity :id :verbosity
:default 1 :default 1
:update-fn inc] :update-fn inc]
["-q" nil "Dont' print to console" ["-q" nil "Don't print to console"
:id :verbosity :id :verbosity
:update-fn (constantly 0)] :update-fn (constantly 0)]
["-h" "--help"]]) ["-h" "--help"]])

View file

@ -76,7 +76,7 @@
(defmethod ig/halt-key! ::server (defmethod ig/halt-key! ::server
[_ {:keys [server name port] :as cfg}] [_ {:keys [server name port] :as cfg}]
(l/info :msg "stoping http server" :name name :port port) (l/info :msg "stopping http server" :name name :port port)
(yt/stop! server)) (yt/stop! server))
(defn- not-found-handler (defn- not-found-handler

View file

@ -125,7 +125,7 @@
(l/error :hint "error on persist-events" :cause cause))))] (l/error :hint "error on persist-events" :cause cause))))]
(fn [request respond _] (fn [request respond _]
;; Fire and forget, log error in case of errro ;; Fire and forget, log error in case of error
(-> (px/submit! executor #(handler request)) (-> (px/submit! executor #(handler request))
(p/catch handle-error)) (p/catch handle-error))

View file

@ -82,7 +82,7 @@
(a/go-loop [] (a/go-loop []
(let [msg (a/<! output)] (let [msg (a/<! output)]
(if (nil? msg) (if (nil? msg)
(l/info :msg "stoping error reporting loop") (l/info :msg "stopping error reporting loop")
(do (do
(a/<! (handle-event cfg msg)) (a/<! (handle-event cfg msg))
(recur))))) (recur)))))

View file

@ -53,7 +53,7 @@
(handle-event cfg msg) (handle-event cfg msg)
(recur)))) (recur))))
(l/info :msg "stoping error reporting loop")) (l/info :msg "stopping error reporting loop"))
(defn- prepare-payload (defn- prepare-payload
[event] [event]

View file

@ -63,7 +63,7 @@
(a/go-loop [] (a/go-loop []
(let [msg (a/<! output)] (let [msg (a/<! output)]
(if (nil? msg) (if (nil? msg)
(l/info :msg "stoping error reporting loop") (l/info :msg "stopping error reporting loop")
(do (do
(a/<! (handle-event cfg msg)) (a/<! (handle-event cfg msg))
(recur))))) (recur)))))

View file

@ -30,7 +30,7 @@
[::default :app.worker/executor] [::default :app.worker/executor]
{:parallelism (cf/get :default-executor-parallelism 70)} {:parallelism (cf/get :default-executor-parallelism 70)}
;; Dedicated thread pool for backround tasks execution. ;; Dedicated thread pool for background tasks execution.
[::worker :app.worker/executor] [::worker :app.worker/executor]
{:parallelism (cf/get :worker-executor-parallelism 20)} {:parallelism (cf/get :worker-executor-parallelism 20)}

View file

@ -220,7 +220,7 @@
(ttf-or-otf->woff [data] (ttf-or-otf->woff [data]
;; NOTE: foutput is not used directly, it represents the ;; NOTE: foutput is not used directly, it represents the
;; default output of the exection of the underlying ;; default output of the execution of the underlying
;; command. ;; command.
(let [finput (tmp/tempfile :prefix "penpot.font." :suffix "") (let [finput (tmp/tempfile :prefix "penpot.font." :suffix "")
foutput (fs/path (str finput ".woff")) foutput (fs/path (str finput ".woff"))

View file

@ -51,13 +51,13 @@
:rpc-mutation-timing :rpc-mutation-timing
{::mdef/name "penpot_rpc_mutation_timing" {::mdef/name "penpot_rpc_mutation_timing"
::mdef/help "RPC mutation method call timming." ::mdef/help "RPC mutation method call timing."
::mdef/labels ["name"] ::mdef/labels ["name"]
::mdef/type :histogram} ::mdef/type :histogram}
:rpc-command-timing :rpc-command-timing
{::mdef/name "penpot_rpc_command_timing" {::mdef/name "penpot_rpc_command_timing"
::mdef/help "RPC command method call timming." ::mdef/help "RPC command method call timing."
::mdef/labels ["name"] ::mdef/labels ["name"]
::mdef/type :histogram} ::mdef/type :histogram}
@ -126,7 +126,7 @@
:executors-completed-tasks :executors-completed-tasks
{::mdef/name "penpot_executors_completed_tasks_total" {::mdef/name "penpot_executors_completed_tasks_total"
::mdef/help "Aproximate number of completed tasks by the executor." ::mdef/help "Approximate number of completed tasks by the executor."
::mdef/labels ["name"] ::mdef/labels ["name"]
::mdef/type :counter} ::mdef/type :counter}

View file

@ -138,7 +138,7 @@
(defn- disj-subscription (defn- disj-subscription
"A low level function responsible on removing subscriptions. The "A low level function responsible on removing subscriptions. The
subscription is trully removed from redis once no single local subscription is truly removed from redis once no single local
subscription is look for it. Intended to be executed in agent." subscription is look for it. Intended to be executed in agent."
[nsubs cfg topic chan] [nsubs cfg topic chan]
(let [nsubs (disj nsubs chan)] (let [nsubs (disj nsubs chan)]
@ -159,7 +159,7 @@
topics)))) topics))))
(defn- unsubscribe-single-channel (defn- unsubscribe-single-channel
"Auxiliar function responsible on removing a single local "Auxiliary function responsible on removing a single local
subscription from the state." subscription from the state."
[state cfg chan] [state cfg chan]
(let [topics (get-in state [:chans chan]) (let [topics (get-in state [:chans chan])
@ -211,7 +211,7 @@
(cond (cond
(nil? val) (nil? val)
(do (do
(l/trace :hint "stoping io-loop, nil received") (l/trace :hint "stopping io-loop, nil received")
(send-via executor state (fn [state] (send-via executor state (fn [state]
(->> (vals state) (->> (vals state)
(mapcat identity) (mapcat identity)

View file

@ -123,7 +123,7 @@
(tokens/verify sprops {:token token :iss :team-invitation})) (tokens/verify sprops {:token token :iss :team-invitation}))
;; If invitation member-id does not matches the profile-id, we just proceed to ignore the ;; If invitation member-id does not matches the profile-id, we just proceed to ignore the
;; invitation because invitations matches exactly; and user can't loging with other email and ;; invitation because invitations matches exactly; and user can't login with other email and
;; accept invitation with other email ;; accept invitation with other email
response (if (and (some? invitation) (= (:id profile) (:member-id invitation))) response (if (and (some? invitation) (= (:id profile) (:member-id invitation)))
{:invitation-token (:invitation-token params)} {:invitation-token (:invitation-token params)}

View file

@ -268,7 +268,7 @@
(when (not= readed# expected#) (when (not= readed# expected#)
(ex/raise :type :validation (ex/raise :type :validation
:code :unexpected-label :code :unexpected-label
:hint (format "unxpected label found: %s, expected: %s" readed# expected#))))) :hint (format "unexpected label found: %s, expected: %s" readed# expected#)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; API ;; API
@ -366,7 +366,7 @@
(def ^:dynamic *state*) (def ^:dynamic *state*)
(def ^:dynamic *options*) (def ^:dynamic *options*)
;; --- EXPORT WRITTER ;; --- EXPORT WRITER
(defn- embed-file-assets (defn- embed-file-assets
[data conn file-id] [data conn file-id]
@ -396,8 +396,8 @@
form)) form))
(process-group-of-assets [data [lib-id items]] (process-group-of-assets [data [lib-id items]]
;; NOTE: there are a posibility that shape refers to a not ;; NOTE: there is a possibility that shape refers to an
;; existing file because the file was removed. In this ;; non-existant file because the file was removed. In this
;; case we just ignore the asset. ;; case we just ignore the asset.
(if-let [lib (retrieve-file conn lib-id)] (if-let [lib (retrieve-file conn lib-id)]
(reduce (partial process-asset lib) data items) (reduce (partial process-asset lib) data items)
@ -433,14 +433,14 @@
:opt [::include-libraries? ::embed-assets?])) :opt [::include-libraries? ::embed-assets?]))
(defn write-export! (defn write-export!
"Do the exportation of a speficied file in custom penpot binary "Do the exportation of a specified file in custom penpot binary
format. There are some options available for customize the output: format. There are some options available for customize the output:
`::include-libraries?`: additionaly to the specified file, all the `::include-libraries?`: additionally to the specified file, all the
linked libraries also will be included (including transitive linked libraries also will be included (including transitive
dependencies). dependencies).
`::embed-assets?`: instead of including the libraryes, embedd in the `::embed-assets?`: instead of including the libraries, embed in the
same file library all assets used from external libraries." same file library all assets used from external libraries."
[{:keys [::include-libraries? ::embed-assets?] :as options}] [{:keys [::include-libraries? ::embed-assets?] :as options}]
(us/assert! ::write-export-options options) (us/assert! ::write-export-options options)
@ -556,7 +556,7 @@
format. There are some options for customize the importation format. There are some options for customize the importation
behavior: behavior:
`::overwrite?`: if true, instead of creating new files and remaping id references, `::overwrite?`: if true, instead of creating new files and remapping id references,
it reuses all ids and updates existing objects; defaults to `false`. it reuses all ids and updates existing objects; defaults to `false`.
`::migrate?`: if true, applies the migration before persisting the `::migrate?`: if true, applies the migration before persisting the
@ -621,7 +621,7 @@
(l/debug :hint "update media references" ::l/async false) (l/debug :hint "update media references" ::l/async false)
(vswap! *state* update :media into (map #(update % :id lookup-index)) media') (vswap! *state* update :media into (map #(update % :id lookup-index)) media')
(l/debug :hint "procesing file" :file-id file-id ::l/async false) (l/debug :hint "processing file" :file-id file-id ::l/async false)
(let [file-id' (lookup-index file-id) (let [file-id' (lookup-index file-id)
data (-> (:data file) data (-> (:data file)

View file

@ -24,11 +24,11 @@
(sv/defmethod ::create-demo-profile (sv/defmethod ::create-demo-profile
"A command that is responsible of creating a demo purpose "A command that is responsible of creating a demo purpose
profile. It only works if the `demo-users` flag is inabled in the profile. It only works if the `demo-users` flag is enabled in the
configuration." configuration."
{:auth false {:auth false
::doc/added "1.15" ::doc/added "1.15"
::doc/changes ["1.15" "This methos is migrated from mutations to commands."]} ::doc/changes ["1.15" "This method is migrated from mutations to commands."]}
[{:keys [pool] :as cfg} _] [{:keys [pool] :as cfg} _]
(let [id (uuid/next) (let [id (uuid/next)
sem (System/currentTimeMillis) sem (System/currentTimeMillis)

View file

@ -566,7 +566,7 @@
(sv/defmethod ::upsert-file-thumbnail (sv/defmethod ::upsert-file-thumbnail
"Creates or updates the file thumbnail. Mainly used for paint the "Creates or updates the file thumbnail. Mainly used for paint the
grid thumbnals." grid thumbnails."
[{:keys [pool] :as cfg} {:keys [profile-id file-id revn data props]}] [{:keys [pool] :as cfg} {:keys [profile-id file-id revn data props]}]
(db/with-atomic [conn pool] (db/with-atomic [conn pool]
(files/check-edition-permissions! conn profile-id file-id) (files/check-edition-permissions! conn profile-id file-id)

View file

@ -97,7 +97,7 @@
;; something fails, all leaked (already created storage objects) will ;; something fails, all leaked (already created storage objects) will
;; be eventually marked as deleted by the touched-gc task. ;; be eventually marked as deleted by the touched-gc task.
;; ;;
;; The touched-gc task, performs periodic analisis of all touched ;; The touched-gc task, performs periodic analysis of all touched
;; storage objects and check references of it. This is the reason why ;; storage objects and check references of it. This is the reason why
;; `reference` metadata exists: it indicates the name of the table ;; `reference` metadata exists: it indicates the name of the table
;; witch holds the reference to storage object (it some kind of ;; witch holds the reference to storage object (it some kind of

View file

@ -63,7 +63,7 @@
;; Update profile props if the indirect prop is coming in ;; Update profile props if the indirect prop is coming in
;; the params map and update the profile props data ;; the params map and update the profile props data
;; acordingly. ;; accordingly.
profile (cond-> profile profile (cond-> profile
(some? newsletter-subscribed) (some? newsletter-subscribed)
(update :props assoc :newsletter-subscribed newsletter-subscribed))] (update :props assoc :newsletter-subscribed newsletter-subscribed))]

View file

@ -318,7 +318,7 @@
(assoc frame :page-id (:id page))))) (assoc frame :page-id (:id page)))))
;; function responsible to filter objects data structure of ;; function responsible to filter objects data structure of
;; all unneded shapes if a concrete frame is provided. If no ;; all unneeded shapes if a concrete frame is provided. If no
;; frame, the objects is returned untouched. ;; frame, the objects is returned untouched.
(filter-objects [objects frame-id] (filter-objects [objects frame-id]
(d/index-by :id (cph/get-children-with-self objects frame-id))) (d/index-by :id (cph/get-children-with-self objects frame-id)))
@ -378,7 +378,7 @@
(update :objects filter-objects frame-id)) (update :objects filter-objects frame-id))
;; Assoc the available thumbnails and prune not visible shapes ;; Assoc the available thumbnails and prune not visible shapes
;; for avoid transfer unnecesary data. ;; for avoid transfer unnecessary data.
:always :always
(update :objects assoc-thumbnails page-id thumbs))))) (update :objects assoc-thumbnails page-id thumbs)))))

View file

@ -84,7 +84,7 @@
::rscript/path "app/rpc/rlimit/window.lua"}) ::rscript/path "app/rpc/rlimit/window.lua"})
(def enabled? (def enabled?
"Allows on runtime completly disable rate limiting." "Allows on runtime completely disable rate limiting."
(atom true)) (atom true))
(def ^:private window-opts-re (def ^:private window-opts-re

View file

@ -37,7 +37,7 @@
permits (or permits Long/MAX_VALUE)] permits (or permits Long/MAX_VALUE)]
(when (>= permits Long/MAX_VALUE) (when (>= permits Long/MAX_VALUE)
(l/warn :hint "permits value too hight" :permits permits :semaphore name)) (l/warn :hint "permits value too high" :permits permits :semaphore name))
^{::wrk/executor executor ^{::wrk/executor executor
::name name} ::name name}

View file

@ -57,7 +57,7 @@
(db/xact-lock! conn 0) (db/xact-lock! conn 0)
(when-not key (when-not key
(l/warn :hint (str "using autogenerated secret-key, it will change on each restart and will invalidate " (l/warn :hint (str "using autogenerated secret-key, it will change on each restart and will invalidate "
"all sessions on each restart, it is hightly recommeded setting up the " "all sessions on each restart, it is hightly recommended setting up the "
"PENPOT_SECRET_KEY environment variable"))) "PENPOT_SECRET_KEY environment variable")))
(let [secret (or key (generate-random-key))] (let [secret (or key (generate-random-key))]

View file

@ -5,7 +5,7 @@
;; Copyright (c) KALEIDOS INC ;; Copyright (c) KALEIDOS INC
(ns app.setup.builtin-templates (ns app.setup.builtin-templates
"A service/module that is reponsible for download, load & internally "A service/module that is responsible for download, load & internally
expose a set of builtin penpot file templates." expose a set of builtin penpot file templates."
(:require (:require
[app.common.logging :as l] [app.common.logging :as l]

View file

@ -371,7 +371,7 @@
(db/create-array conn "uuid" ids)])) (db/create-array conn "uuid" ids)]))
;; NOTE: A getter that retrieves the key witch will be used ;; NOTE: A getter that retrieves the key witch will be used
;; for group ids; previoulsy we have no value, then we ;; for group ids; previously we have no value, then we
;; introduced the `:reference` prop, and then it is renamed ;; introduced the `:reference` prop, and then it is renamed
;; to `:bucket` and now is string instead. This is ;; to `:bucket` and now is string instead. This is
;; implemented in this way for backward comaptibilty. ;; implemented in this way for backward comaptibilty.

View file

@ -6,7 +6,7 @@
(ns app.storage.tmp (ns app.storage.tmp
"Temporal files service all created files will be tried to clean after "Temporal files service all created files will be tried to clean after
1 hour afrer creation. This is a best effort, if this process fails, 1 hour after creation. This is a best effort, if this process fails,
the operating system cleaning task should be responsible of the operating system cleaning task should be responsible of
permanently delete these files (look at systemd-tempfiles)." permanently delete these files (look at systemd-tempfiles)."
(:require (:require
@ -50,7 +50,7 @@
(defmethod ig/halt-key! ::cleaner (defmethod ig/halt-key! ::cleaner
[_ close-ch] [_ close-ch]
(l/info :hint "stoping tempfile cleaner service") (l/info :hint "stopping tempfile cleaner service")
(some-> close-ch a/close!)) (some-> close-ch a/close!))
(defn- remove-temp-file (defn- remove-temp-file

View file

@ -158,7 +158,7 @@
(recur (rest tables) (recur (rest tables)
(+ total (process-table (assoc cfg :table table)))) (+ total (process-table (assoc cfg :table table))))
(do (do
(l/info :hint "objects gc finished succesfully" (l/info :hint "objects gc finished successfully"
:min-age (dt/format-duration min-age) :min-age (dt/format-duration min-age)
:total total) :total total)

View file

@ -41,7 +41,7 @@
:hours ChronoUnit/HOURS :hours ChronoUnit/HOURS
:days ChronoUnit/DAYS :days ChronoUnit/DAYS
:weeks ChronoUnit/WEEKS :weeks ChronoUnit/WEEKS
:monts ChronoUnit/MONTHS))) :months ChronoUnit/MONTHS)))
;; --- DURATION ;; --- DURATION

View file

@ -134,7 +134,7 @@
(aa/thread-sleep interval) (aa/thread-sleep interval)
(if (.isShutdown executor) (if (.isShutdown executor)
(l/debug :hint "stoping monitor; cause: executor is shutdown") (l/debug :hint "stopping monitor; cause: executor is shutdown")
(assoc state skey steals)))) (assoc state skey steals))))
(monitor-fn [] (monitor-fn []
@ -146,7 +146,7 @@
(recur (conj items item) state) (recur (conj items item) state)
(recur items state)))) (recur items state))))
(catch InterruptedException _cause (catch InterruptedException _cause
(l/debug :hint "stoping monitor; interrupted"))))] (l/debug :hint "stopping monitor; interrupted"))))]
(let [thread (Thread. monitor-fn)] (let [thread (Thread. monitor-fn)]
(.setDaemon thread true) (.setDaemon thread true)

View file

@ -183,7 +183,7 @@
:type :image :type :image
:metadata {:id (:id fmo1)}}}]})] :metadata {:id (:id fmo1)}}}]})]
;; Check that reference storage objets on filemediaobjects ;; Check that reference storage objects on filemediaobjects
;; are the same because of deduplication feature. ;; are the same because of deduplication feature.
(t/is (= (:media-id fmo1) (:media-id fmo2))) (t/is (= (:media-id fmo1) (:media-id fmo2)))
(t/is (= (:thumbnail-id fmo1) (:thumbnail-id fmo2))) (t/is (= (:thumbnail-id fmo1) (:thumbnail-id fmo2)))
@ -228,8 +228,8 @@
:page-id (first (get-in file [:data :pages])) :page-id (first (get-in file [:data :pages]))
:id shid}]}) :id shid}]})
;; Now, we have deleted the usag of pointers to the ;; Now, we have deleted the usage of pointers to the
;; file-media-objects, if we pase file-gc, they should be marked ;; file-media-objects, if we paste file-gc, they should be marked
;; as deleted. ;; as deleted.
(let [task (:app.tasks.file-gc/handler th/*system*) (let [task (:app.tasks.file-gc/handler th/*system*)
res (task {:min-age (dt/duration 0)})] res (task {:min-age (dt/duration 0)})]

View file

@ -16,7 +16,7 @@
(cond (cond
;; For rotated or stretched shapes, the origin point we show in the menu ;; For rotated or stretched shapes, the origin point we show in the menu
;; is not the (:x :y) shape attribute, but the top left coordinate of the ;; is not the (:x :y) shape attribute, but the top left coordinate of the
;; wrapping recangle (see measures.cljs). As the :points attribute cannot ;; wrapping rectangle (see measures.cljs). As the :points attribute cannot
;; be merged for several objects, we calculate the origin point in two fake ;; be merged for several objects, we calculate the origin point in two fake
;; attributes to be used in the measures menu. ;; attributes to be used in the measures menu.
(#{:ox :oy} attr) (#{:ox :oy} attr)

View file

@ -83,7 +83,7 @@
(defn concat-all (defn concat-all
"A totally lazy implementation of concat with different call "A totally lazy implementation of concat with different call
signature. It works like a flatten with a single level of neesting." signature. It works like a flatten with a single level of nesting."
[colls] [colls]
(lazy-seq (lazy-seq
(let [c (seq colls) (let [c (seq colls)
@ -663,7 +663,7 @@
coll)))) coll))))
(defn iteration (defn iteration
"Creates a toally lazy seqable via repeated calls to step, a "Creates a totally lazy seqable via repeated calls to step, a
function of some (continuation token) 'k'. The first call to step function of some (continuation token) 'k'. The first call to step
will be passed initk, returning 'ret'. If (somef ret) is true, (vf will be passed initk, returning 'ret'. If (somef ret) is true, (vf
ret) will be included in the iteration, else iteration will ret) will be included in the iteration, else iteration will

View file

@ -17,7 +17,7 @@
[cljs.analyzer.api :as aapi])) [cljs.analyzer.api :as aapi]))
(defmacro select-keys (defmacro select-keys
"A macro version of `select-keys`. Usefull when keys vector is known "A macro version of `select-keys`. Useful when keys vector is known
at compile time (aprox 600% performance boost). at compile time (aprox 600% performance boost).
It is not 100% equivalent, this macro does not removes not existing It is not 100% equivalent, this macro does not removes not existing
@ -27,7 +27,7 @@
`{ ~@(mapcat (fn [key] [key (list `c/get target key)]) keys) ~@[] }) `{ ~@(mapcat (fn [key] [key (list `c/get target key)]) keys) ~@[] })
(defmacro get-in (defmacro get-in
"A macro version of `get-in`. Usefull when the keys vector is known at "A macro version of `get-in`. Useful when the keys vector is known at
compile time (20-40% performance improvement)." compile time (20-40% performance improvement)."
([target keys] ([target keys]
(assert (vector? keys) "keys expected to be a vector") (assert (vector? keys) "keys expected to be a vector")

View file

@ -197,7 +197,7 @@
(write-log! ~logger-sym ~level-sym ~cause message#) (write-log! ~logger-sym ~level-sym ~cause message#)
(catch Throwable cause# (catch Throwable cause#
(write-log! ~logger-sym (get-level :error) cause# (write-log! ~logger-sym (get-level :error) cause#
"unexpected error on writting log"))))))) "unexpected error on writing log")))))))
nil) nil)
`(let [message# (or ~raw (build-message ~(vec props)))] `(let [message# (or ~raw (build-message ~(vec props)))]
(write-log! ~logger-sym ~level-sym ~cause message#) (write-log! ~logger-sym ~level-sym ~cause message#)

View file

@ -479,7 +479,7 @@
(into [id] (cph/get-parent-ids (:objects page) id))) (into [id] (cph/get-parent-ids (:objects page) id)))
need-sync? (fn [operation] need-sync? (fn [operation]
; We need to trigger a sync if the shape has changed any ; We need to trigger a sync if the shape has changed any
; attribute that participates in components syncronization. ; attribute that participates in components synchronization.
(and (= (:type operation) :set) (and (= (:type operation) :set)
(component-sync-attrs (:attr operation)))) (component-sync-attrs (:attr operation))))
any-sync? (some need-sync? operations)] any-sync? (some need-sync? operations)]

View file

@ -259,7 +259,7 @@
(s/valid? spec value)) (s/valid? spec value))
(defmacro assert-expr* (defmacro assert-expr*
"Auxiliar macro for expression assertion." "Auxiliary macro for expression assertion."
[expr hint] [expr hint]
`(when-not ~expr `(when-not ~expr
(ex/raise :type :assertion (ex/raise :type :assertion
@ -267,7 +267,7 @@
:hint ~hint))) :hint ~hint)))
(defmacro assert-spec* (defmacro assert-spec*
"Auxiliar macro for spec assertion." "Auxiliary macro for spec assertion."
[spec value hint] [spec value hint]
(let [context (if-let [nsdata (:ns &env)] (let [context (if-let [nsdata (:ns &env)]
{:ns (str (:name nsdata)) {:ns (str (:name nsdata))

View file

@ -27,7 +27,7 @@
(t/is (= (cph/insert-at-index [:a :b] 10 [:c]) (t/is (= (cph/insert-at-index [:a :b] 10 [:c])
[:a :b :c])) [:a :b :c]))
;; insert existing in a contiguos index ;; insert existing in a contiguous index
(t/is (= (cph/insert-at-index [:a :b] 1 [:a]) (t/is (= (cph/insert-at-index [:a :b] 1 [:a])
[:a :b])) [:a :b]))

View file

@ -34,7 +34,7 @@
;; an empty line for visual feedback of restart ;; an empty line for visual feedback of restart
(js/console.log "") (js/console.log "")
(l/info :msg "stoping") (l/info :msg "stopping")
(p/do! (p/do!
(bwr/stop) (bwr/stop)
(redis/stop) (redis/stop)

View file

@ -5,7 +5,7 @@
;; Copyright (c) KALEIDOS INC ;; Copyright (c) KALEIDOS INC
(ns app.handlers.resources (ns app.handlers.resources
"Temporal resouces management." "Temporal resources management."
(:require (:require
["archiver" :as arc] ["archiver" :as arc]
["fs" :as fs] ["fs" :as fs]

View file

@ -17,7 +17,7 @@ describe("onboarding slides", () => {
cy.demoLogin(); cy.demoLogin();
}); });
it("go trough all the onboarding slides", () => { it("go through all the onboarding slides", () => {
cy.getBySel("onboarding-welcome").should("exist"); cy.getBySel("onboarding-welcome").should("exist");
cy.getBySel("onboarding-next-btn").should("exist"); cy.getBySel("onboarding-next-btn").should("exist");
cy.getBySel("onboarding-next-btn").click(); cy.getBySel("onboarding-next-btn").click();

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# A repl usefull for debug macros. # A repl useful for debug macros.
export OPTIONS="\ export OPTIONS="\
-J-XX:-OmitStackTraceInFastThrow \ -J-XX:-OmitStackTraceInFastThrow \

View file

@ -17,7 +17,7 @@
[clojure.spec.alpha :as s] [clojure.spec.alpha :as s]
[cuerdas.core :as str])) [cuerdas.core :as str]))
;; --- Auxiliar Functions ;; --- Auxiliary Functions
(s/def ::platform #{:windows :linux :macos :other}) (s/def ::platform #{:windows :linux :macos :other})
(s/def ::browser #{:chrome :firefox :safari :edge :other}) (s/def ::browser #{:chrome :firefox :safari :edge :other})

View file

@ -229,9 +229,9 @@
(swap! st/ongoing-tasks disj :export)))) (swap! st/ongoing-tasks disj :export))))
;; We hide need to hide the ui elements of the export after ;; We hide need to hide the ui elements of the export after
;; some interval. We also delay a litle bit more the stopper ;; some interval. We also delay a little bit more the stopper
;; for ensure that after some security time, the stream is ;; for ensure that after some security time, the stream is
;; completelly closed. ;; completely closed.
(->> progress-stream (->> progress-stream
(rx/filter #(= "ended" (:status %))) (rx/filter #(= "ended" (:status %)))
(rx/take 1) (rx/take 1)

View file

@ -124,7 +124,7 @@
(try (try
(assoc params :font (ot/parse data)) (assoc params :font (ot/parse data))
(catch :default _e (catch :default _e
(log/warn :msg (str/fmt "skiping file %s, unsupported format" (:name params))) (log/warn :msg (str/fmt "skipping file %s, unsupported format" (:name params)))
nil))) nil)))
(read-blob [blob] (read-blob [blob]
@ -169,7 +169,7 @@
(defn rename-and-regroup (defn rename-and-regroup
"Function responsible to rename a font in a local state and properly "Function responsible to rename a font in a local state and properly
regroup it to the apropriate `font-id` having in account current regroup it to the appropriate `font-id` having in account current
fonts and installed fonts." fonts and installed fonts."
[current-fonts id name installed-fonts] [current-fonts id name installed-fonts]
(let [famdb (-> (merge current-fonts installed-fonts) (let [famdb (-> (merge current-fonts installed-fonts)

View file

@ -198,7 +198,7 @@
:invitation-token invitation-token}] :invitation-token invitation-token}]
;; NOTE: We can't take the profile value from login because ;; NOTE: We can't take the profile value from login because
;; there are cases when login is successfull but the cookie is ;; there are cases when login is successful but the cookie is
;; not set properly (because of possible misconfiguration). ;; not set properly (because of possible misconfiguration).
;; So, we proceed to make an additional call to fetch the ;; So, we proceed to make an additional call to fetch the
;; profile, and ensure that cookie is set correctly. If ;; profile, and ensure that cookie is set correctly. If

View file

@ -573,7 +573,7 @@
(let [page-id (:current-page-id state) (let [page-id (:current-page-id state)
objects (wsh/lookup-page-objects state page-id) objects (wsh/lookup-page-objects state page-id)
;; Ignore any shape whose parent is also intented to be moved ;; Ignore any shape whose parent is also intended to be moved
ids (cph/clean-loops objects ids) ids (cph/clean-loops objects ids)
;; If we try to move a parent into a child we remove it ;; If we try to move a parent into a child we remove it
@ -624,7 +624,7 @@
ids) ids)
;; TODO: Probably implementing this using loop/recur will ;; TODO: Probably implementing this using loop/recur will
;; be more efficient than using reduce and continuos data ;; be more efficient than using reduce and continuous data
;; desturcturing. ;; desturcturing.
;; Sets the correct components metadata for the moved shapes ;; Sets the correct components metadata for the moved shapes

View file

@ -17,7 +17,7 @@
(log/set-level! :warn) (log/set-level! :warn)
(defn initialized? (defn initialized?
"Check if the state is properly intialized in a workspace. This means "Check if the state is properly initialized in a workspace. This means
it has the `:current-page-id` and `:current-file-id` properly set." it has the `:current-page-id` and `:current-file-id` properly set."
[state] [state]
(and (uuid? (:current-file-id state)) (and (uuid? (:current-file-id state))

View file

@ -26,7 +26,7 @@
(sort-by ::index))) (sort-by ::index)))
(defn- get-empty-groups-after-group-creation (defn- get-empty-groups-after-group-creation
"An auxiliar function that finds and returns a set of ids that "An auxiliary function that finds and returns a set of ids that
corresponds to groups that should be deleted after a group creation. corresponds to groups that should be deleted after a group creation.
The corner case happens when you selects two (or more) shapes that The corner case happens when you selects two (or more) shapes that

View file

@ -342,7 +342,7 @@
update-fn update-fn
(fn [component] (fn [component]
;; NOTE: we need to ensure the component exists, ;; NOTE: we need to ensure the component exists,
;; because there are small posibilities of race ;; because there are small possibilities of race
;; conditions with component deletion. ;; conditions with component deletion.
(when component (when component
(-> component (-> component

View file

@ -164,7 +164,7 @@
that use assets of the given type in the given library. that use assets of the given type in the given library.
If an asset id is given, only shapes linked to this particular asset will If an asset id is given, only shapes linked to this particular asset will
be syncrhonized." be synchronized."
[it file-id asset-type asset-id library-id state] [it file-id asset-type asset-id library-id state]
(s/assert #{:colors :components :typographies} asset-type) (s/assert #{:colors :components :typographies} asset-type)
(s/assert (s/nilable ::us/uuid) asset-id) (s/assert (s/nilable ::us/uuid) asset-id)
@ -198,7 +198,7 @@
the given library. the given library.
If an asset id is given, only shapes linked to this particular asset will If an asset id is given, only shapes linked to this particular asset will
be syncrhonized." be synchronized."
[it file-id asset-type asset-id library-id state] [it file-id asset-type asset-id library-id state]
(s/assert #{:colors :components :typographies} asset-type) (s/assert #{:colors :components :typographies} asset-type)
(s/assert (s/nilable ::us/uuid) asset-id) (s/assert (s/nilable ::us/uuid) asset-id)

View file

@ -244,7 +244,7 @@
;; TODO: it is really need handle SVG here, looks like it already ;; TODO: it is really need handle SVG here, looks like it already
;; handled separatelly ;; handled separately
(defn upload-media-workspace (defn upload-media-workspace
[{:keys [position file-id] :as params}] [{:keys [position file-id] :as params}]
(let [params (assoc params (let [params (assoc params

View file

@ -219,7 +219,7 @@
(fn [[page-id changes]] (fn [[page-id changes]]
(dch/update-indices page-id changes)) (dch/update-indices page-id changes))
;; We update `position-data` from the incomming message ;; We update `position-data` from the incoming message
changes (->> changes (mapv update-position-data)) changes (->> changes (mapv update-position-data))
changes-by-pages (group-by :page-id changes)] changes-by-pages (group-by :page-id changes)]

View file

@ -304,7 +304,7 @@
(update :workspace-pages dissoc id))) (update :workspace-pages dissoc id)))
(defn preload-data-uris (defn preload-data-uris
"Preloads the image data so it's ready when necesary" "Preloads the image data so it's ready when necessary"
[] []
(ptk/reify ::preload-data-uris (ptk/reify ::preload-data-uris
ptk/WatchEvent ptk/WatchEvent

View file

@ -222,7 +222,7 @@
ptk/UpdateEvent ptk/UpdateEvent
(update [_ state] (update [_ state]
;; Only deselect if there is no modal openned ;; Only deselect if there is no modal opened
(cond-> state (cond-> state
(or (not check-modal) (or (not check-modal)
(not (::md/modal state))) (not (::md/modal state)))

View file

@ -766,7 +766,7 @@
(pcb/with-objects objects) (pcb/with-objects objects)
(pcb/update-shapes moving-frames (pcb/update-shapes moving-frames
(fn [shape] (fn [shape]
;; Hide in viwer must be enabled just when a board is moved ;; Hide in viewer must be enabled just when a board is moved
;; inside another artboard an nested to it, we have to avoid ;; inside another artboard an nested to it, we have to avoid
;; situations like: 1. Moving inside the same frame; 2. Moving ;; situations like: 1. Moving inside the same frame; 2. Moving
;; outside the frame ;; outside the frame

View file

@ -214,7 +214,7 @@
;; https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state ;; https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
(defn use-previous (defn use-previous
"Returns the value from previuous render cycle." "Returns the value from previous render cycle."
[value] [value]
(let [ref (mf/use-ref value)] (let [ref (mf/use-ref value)]
(mf/use-effect (mf/use-effect
@ -234,7 +234,7 @@
(defn use-ref-callback (defn use-ref-callback
"Returns a stable callback pointer what calls the interned "Returns a stable callback pointer what calls the interned
callback. The interned callback will be automatically updated on callback. The interned callback will be automatically updated on
each reander if the reference changes and works as noop if the each render if the reference changes and works as noop if the
pointer references to nil value." pointer references to nil value."
[f] [f]
(let [ptr (mf/use-ref nil)] (let [ptr (mf/use-ref nil)]

View file

@ -59,7 +59,7 @@
{::mf/wrap-props false {::mf/wrap-props false
::mf/register modal/components ::mf/register modal/components
::mf/register-as :onboarding-templates} ::mf/register-as :onboarding-templates}
;; NOTE: the project usually comes empty, it only comes fullfilled ;; NOTE: the project usually comes empty, it only comes fulfilled
;; when a user creates a new team just after signup. ;; when a user creates a new team just after signup.
[props] [props]
(let [project-id (unchecked-get props "project-id") (let [project-id (unchecked-get props "project-id")

View file

@ -22,7 +22,7 @@
(try (try
(upf/format-path content) (upf/format-path content)
(catch :default e (catch :default e
(log/error :hint "unexpected error on formating path" (log/error :hint "unexpected error on formatting path"
:shape-name (:name shape) :shape-name (:name shape)
:shape-id (:id shape) :shape-id (:id shape)
:cause e) :cause e)

View file

@ -62,7 +62,7 @@
transform (gsh/transform-str shape {:no-flip true}) transform (gsh/transform-str shape {:no-flip true})
;; These position attributes are not really necesary but they are convenient for for the export ;; These position attributes are not really necessary but they are convenient for for the export
group-props (-> #js {:transform transform group-props (-> #js {:transform transform
:className "text-container" :className "text-container"
:x x :x x

View file

@ -44,7 +44,7 @@
;; In other all cases we only allowed to have a single ;; In other all cases we only allowed to have a single
;; shape-id because multiple shape-ids are handled ;; shape-id because multiple shape-ids are handled
;; separatelly by the export-modal. ;; separately by the export-modal.
(let [defaults {:page-id page-id (let [defaults {:page-id page-id
:file-id file-id :file-id file-id
:name filename :name filename

View file

@ -113,7 +113,7 @@
::mf/wrap-props false} ::mf/wrap-props false}
[props] [props]
(let [;; NOTE: with `use-equal-memo` hook we ensure that all values (let [;; NOTE: with `use-equal-memo` hook we ensure that all values
;; conserves the reference identity for avoid unnecesary dummy ;; conserves the reference identity for avoid unnecessary dummy
;; rerenders. ;; rerenders.
mode (h/use-equal-memo (unchecked-get props "interactions-mode")) mode (h/use-equal-memo (unchecked-get props "interactions-mode"))
offset (h/use-equal-memo (unchecked-get props "frame-offset")) offset (h/use-equal-memo (unchecked-get props "frame-offset"))

View file

@ -116,7 +116,7 @@
(mf/use-effect (mf/use-effect
(fn [] (fn []
;; When a change in the data is received a "force-render" event is emited ;; When a change in the data is received a "force-render" event is emitted
;; that will force the component to be mounted in memory ;; that will force the component to be mounted in memory
(let [sub (let [sub
(->> (dwt/force-render-stream (:id shape)) (->> (dwt/force-render-stream (:id shape))

View file

@ -232,7 +232,7 @@
(when (some? node) (when (some? node)
(cond (cond
(= (dom/get-tag-name node) "foreignObject") (= (dom/get-tag-name node) "foreignObject")
;; The shape width/height will be automaticaly setup when the modifiers are applied ;; The shape width/height will be automatically setup when the modifiers are applied
nil nil
(or (= (dom/get-tag-name node) "mask") (or (= (dom/get-tag-name node) "mask")

View file

@ -103,7 +103,7 @@
(when @show-frame-thumbnail (when @show-frame-thumbnail
(reset! show-frame-thumbnail false)) (reset! show-frame-thumbnail false))
;; If we don't have the thumbnail data saved (normaly the first load) we update the data ;; If we don't have the thumbnail data saved (normally the first load) we update the data
;; when available ;; when available
(when (not @thumbnail-data-ref) (when (not @thumbnail-data-ref)
(st/emit! (dwt/update-thumbnail page-id id) )) (st/emit! (dwt/update-thumbnail page-id id) ))

View file

@ -241,7 +241,7 @@
editing-shape (get text-shapes edition) editing-shape (get text-shapes edition)
;; This memo is necesary so the viewport-text-wrapper memoize its props correctly ;; This memo is necessary so the viewport-text-wrapper memoize its props correctly
text-shapes-wrapper text-shapes-wrapper
(mf/use-memo (mf/use-memo
(mf/deps text-shapes edition) (mf/deps text-shapes edition)

View file

@ -53,7 +53,7 @@
;; In other all cases we only allowed to have a single ;; In other all cases we only allowed to have a single
;; shape-id because multiple shape-ids are handled ;; shape-id because multiple shape-ids are handled
;; separatelly by the export-modal. ;; separately by the export-modal.
(let [defaults {:page-id page-id (let [defaults {:page-id page-id
:file-id file-id :file-id file-id
:name sname :name sname

View file

@ -79,7 +79,7 @@
;; To show interactively the measures while the user is manipulating ;; To show interactively the measures while the user is manipulating
;; the shape with the mouse, generate a copy of the shapes applying ;; the shape with the mouse, generate a copy of the shapes applying
;; the transient tranformations. ;; the transient transformations.
shapes (as-> old-shapes $ shapes (as-> old-shapes $
(map gsh/transform-shape $) (map gsh/transform-shape $)
(map gsh/translate-to-frame $ frames)) (map gsh/translate-to-frame $ frames))
@ -256,7 +256,7 @@
;; FRAME PRESETS ;; FRAME PRESETS
(when (and (options :presets) (when (and (options :presets)
(or (nil? all-types) (= (count all-types) 1))) ;; Dont' show presets if multi selected (or (nil? all-types) (= (count all-types) 1))) ;; Don't show presets if multi selected
[:div.row-flex ;; some frames and some non frames [:div.row-flex ;; some frames and some non frames
[:div.presets.custom-select.flex-grow {:on-click #(reset! show-presets-dropdown? true)} [:div.presets.custom-select.flex-grow {:on-click #(reset! show-presets-dropdown? true)}
[:span (tr "workspace.options.size-presets")] [:span (tr "workspace.options.size-presets")]

View file

@ -76,7 +76,7 @@
It receives a function to execute for retrieve the stream that will It receives a function to execute for retrieve the stream that will
be used for creating the subscription. The function should be be used for creating the subscription. The function should be
stable, so is the responsability of the user of this hook to stable, so is the responsibility of the user of this hook to
properly memoize it. properly memoize it.
TODO: this should be placed in some generic hooks namespace but his TODO: this should be placed in some generic hooks namespace but his

View file

@ -14,7 +14,7 @@
;; https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API ;; https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
;; ;;
;; The API is broken in several ways. Here is some discussion of the problems, ;; The API is broken in several ways. Here is some discussion of the problems,
;; and many uncomplete solutions: ;; and many incomplete solutions:
;; https://github.com/lolmaus/jquery.dragbetter/#what-this-is-all-about ;; https://github.com/lolmaus/jquery.dragbetter/#what-this-is-all-about
;; https://www.w3schools.com/jsref/event_relatedtarget.asp ;; https://www.w3schools.com/jsref/event_relatedtarget.asp
;; https://stackoverflow.com/questions/14194324/firefox-firing-dragleave-when-dragging-over-text?noredirect=1&lq=1 ;; https://stackoverflow.com/questions/14194324/firefox-firing-dragleave-when-dragging-over-text?noredirect=1&lq=1

View file

@ -69,7 +69,7 @@
(autodetect)))) (autodetect))))
;; The translations `data` is a javascript object and should be treated ;; The translations `data` is a javascript object and should be treated
;; with `goog.object` namespace functions instead of a standart ;; with `goog.object` namespace functions instead of a standard
;; clojure functions. This is for performance reasons because this ;; clojure functions. This is for performance reasons because this
;; code is executed in the critical part (application bootstrap) and ;; code is executed in the critical part (application bootstrap) and
;; used in many parts of the application. ;; used in many parts of the application.

View file

@ -76,7 +76,7 @@
(defn make-curve-point (defn make-curve-point
"Changes the content to make the point a 'curve'. The handlers will be positioned "Changes the content to make the point a 'curve'. The handlers will be positioned
in the same vector that results from te previous->next points but with fixed length." in the same vector that results from the previous->next points but with fixed length."
[content point] [content point]
(let [indices (upc/point-indices content point) (let [indices (upc/point-indices content point)

View file

@ -5,8 +5,8 @@
;; Copyright (c) KALEIDOS INC ;; Copyright (c) KALEIDOS INC
(ns app.util.snap-data (ns app.util.snap-data
"Data structure that holds and retrieves the data to make the snaps. Internaly "Data structure that holds and retrieves the data to make the snaps.
is implemented with a balanced binary tree that queries by range. Internally is implemented with a balanced binary tree that queries by range.
https://en.wikipedia.org/wiki/Range_tree" https://en.wikipedia.org/wiki/Range_tree"
(:require (:require
[app.common.data :as d] [app.common.data :as d]