0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

🔧 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
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".
### :sparkles: New features
@ -139,7 +139,7 @@
- The `PENPOT_LDAP_ATTRS_PHOTO` finally removed, it was unused for many
versions.
- 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`,
`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
@ -244,7 +244,7 @@
- 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 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 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 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 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)
- 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)
@ -337,7 +337,7 @@
- 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)
- 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)
- 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)
@ -466,7 +466,7 @@
- Fix issue on handling empty content on boolean shapes
- 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
- Disable parallel upload of file media on import (causes too much
contention on the rlimit subsistem that does not works as expected
@ -578,7 +578,7 @@
## 1.10.4-beta
### :sparkles: Enhacements
### :sparkles: Enhancements
- Allow parametrice file snapshoting interval
@ -590,7 +590,7 @@
## 1.10.3-beta
### :sparkles: Enhacements
### :sparkles: Enhancements
- Make all logging asynchronous, this avoid some overhead on jetty threads at cost of logging latency.
- Increase default session time to 15 days.
@ -926,7 +926,7 @@
- Add better auth module logging.
- 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 incorrect unicode code points handling on draft-to-penpot conversion.
- 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
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: Set proper error message on generic error

View file

@ -77,7 +77,7 @@ Debug Main Page
<legend>Import binfile:</legend>
<desc>Import penpot file in binary
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>
<form method="post" enctype="multipart/form-data" action="/dbg/file/import">
@ -90,7 +90,7 @@ Debug Main Page
<input type="checkbox" name="overwrite" />
<br />
<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
already exists on the database.
<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/>
<br />
<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
relations or missing pieces.
</small>

View file

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

View file

@ -76,7 +76,7 @@
(defmethod ig/halt-key! ::server
[_ {: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))
(defn- not-found-handler

View file

@ -125,7 +125,7 @@
(l/error :hint "error on persist-events" :cause cause))))]
(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))
(p/catch handle-error))

View file

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

View file

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

View file

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

View file

@ -30,7 +30,7 @@
[::default :app.worker/executor]
{: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]
{:parallelism (cf/get :worker-executor-parallelism 20)}

View file

@ -220,7 +220,7 @@
(ttf-or-otf->woff [data]
;; 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.
(let [finput (tmp/tempfile :prefix "penpot.font." :suffix "")
foutput (fs/path (str finput ".woff"))

View file

@ -51,13 +51,13 @@
: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/type :histogram}
: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/type :histogram}
@ -126,7 +126,7 @@
:executors-completed-tasks
{::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/type :counter}

View file

@ -138,7 +138,7 @@
(defn- disj-subscription
"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."
[nsubs cfg topic chan]
(let [nsubs (disj nsubs chan)]
@ -159,7 +159,7 @@
topics))))
(defn- unsubscribe-single-channel
"Auxiliar function responsible on removing a single local
"Auxiliary function responsible on removing a single local
subscription from the state."
[state cfg chan]
(let [topics (get-in state [:chans chan])
@ -211,7 +211,7 @@
(cond
(nil? val)
(do
(l/trace :hint "stoping io-loop, nil received")
(l/trace :hint "stopping io-loop, nil received")
(send-via executor state (fn [state]
(->> (vals state)
(mapcat identity)

View file

@ -123,7 +123,7 @@
(tokens/verify sprops {:token token :iss :team-invitation}))
;; 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
response (if (and (some? invitation) (= (:id profile) (:member-id invitation)))
{:invitation-token (:invitation-token params)}

View file

@ -268,7 +268,7 @@
(when (not= readed# expected#)
(ex/raise :type :validation
:code :unexpected-label
:hint (format "unxpected label found: %s, expected: %s" readed# expected#)))))
:hint (format "unexpected label found: %s, expected: %s" readed# expected#)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; API
@ -366,7 +366,7 @@
(def ^:dynamic *state*)
(def ^:dynamic *options*)
;; --- EXPORT WRITTER
;; --- EXPORT WRITER
(defn- embed-file-assets
[data conn file-id]
@ -396,8 +396,8 @@
form))
(process-group-of-assets [data [lib-id items]]
;; NOTE: there are a posibility that shape refers to a not
;; existing file because the file was removed. In this
;; NOTE: there is a possibility that shape refers to an
;; non-existant file because the file was removed. In this
;; case we just ignore the asset.
(if-let [lib (retrieve-file conn lib-id)]
(reduce (partial process-asset lib) data items)
@ -433,14 +433,14 @@
:opt [::include-libraries? ::embed-assets?]))
(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:
`::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
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."
[{:keys [::include-libraries? ::embed-assets?] :as options}]
(us/assert! ::write-export-options options)
@ -556,7 +556,7 @@
format. There are some options for customize the importation
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`.
`::migrate?`: if true, applies the migration before persisting the
@ -621,7 +621,7 @@
(l/debug :hint "update media references" ::l/async false)
(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)
data (-> (:data file)

View file

@ -24,11 +24,11 @@
(sv/defmethod ::create-demo-profile
"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."
{:auth false
::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} _]
(let [id (uuid/next)
sem (System/currentTimeMillis)

View file

@ -566,7 +566,7 @@
(sv/defmethod ::upsert-file-thumbnail
"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]}]
(db/with-atomic [conn pool]
(files/check-edition-permissions! conn profile-id file-id)

View file

@ -97,7 +97,7 @@
;; something fails, all leaked (already created storage objects) will
;; 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
;; `reference` metadata exists: it indicates the name of the table
;; 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
;; the params map and update the profile props data
;; acordingly.
;; accordingly.
profile (cond-> profile
(some? newsletter-subscribed)
(update :props assoc :newsletter-subscribed newsletter-subscribed))]

View file

@ -318,7 +318,7 @@
(assoc frame :page-id (:id page)))))
;; 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.
(filter-objects [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))
;; Assoc the available thumbnails and prune not visible shapes
;; for avoid transfer unnecesary data.
;; for avoid transfer unnecessary data.
:always
(update :objects assoc-thumbnails page-id thumbs)))))

View file

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

View file

@ -37,7 +37,7 @@
permits (or 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
::name name}

View file

@ -57,7 +57,7 @@
(db/xact-lock! conn 0)
(when-not key
(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")))
(let [secret (or key (generate-random-key))]

View file

@ -5,7 +5,7 @@
;; Copyright (c) KALEIDOS INC
(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."
(:require
[app.common.logging :as l]

View file

@ -371,7 +371,7 @@
(db/create-array conn "uuid" ids)]))
;; 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
;; to `:bucket` and now is string instead. This is
;; implemented in this way for backward comaptibilty.

View file

@ -6,7 +6,7 @@
(ns app.storage.tmp
"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
permanently delete these files (look at systemd-tempfiles)."
(:require
@ -50,7 +50,7 @@
(defmethod ig/halt-key! ::cleaner
[_ close-ch]
(l/info :hint "stoping tempfile cleaner service")
(l/info :hint "stopping tempfile cleaner service")
(some-> close-ch a/close!))
(defn- remove-temp-file

View file

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

View file

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

View file

@ -134,7 +134,7 @@
(aa/thread-sleep interval)
(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))))
(monitor-fn []
@ -146,7 +146,7 @@
(recur (conj items item) state)
(recur items state))))
(catch InterruptedException _cause
(l/debug :hint "stoping monitor; interrupted"))))]
(l/debug :hint "stopping monitor; interrupted"))))]
(let [thread (Thread. monitor-fn)]
(.setDaemon thread true)

View file

@ -183,7 +183,7 @@
:type :image
: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.
(t/is (= (:media-id fmo1) (:media-id fmo2)))
(t/is (= (:thumbnail-id fmo1) (:thumbnail-id fmo2)))
@ -228,8 +228,8 @@
:page-id (first (get-in file [:data :pages]))
:id shid}]})
;; Now, we have deleted the usag of pointers to the
;; file-media-objects, if we pase file-gc, they should be marked
;; Now, we have deleted the usage of pointers to the
;; file-media-objects, if we paste file-gc, they should be marked
;; as deleted.
(let [task (:app.tasks.file-gc/handler th/*system*)
res (task {:min-age (dt/duration 0)})]

View file

@ -16,7 +16,7 @@
(cond
;; 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
;; 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
;; attributes to be used in the measures menu.
(#{:ox :oy} attr)

View file

@ -83,7 +83,7 @@
(defn concat-all
"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]
(lazy-seq
(let [c (seq colls)
@ -663,7 +663,7 @@
coll))))
(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
will be passed initk, returning 'ret'. If (somef ret) is true, (vf
ret) will be included in the iteration, else iteration will

View file

@ -17,7 +17,7 @@
[cljs.analyzer.api :as aapi]))
(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).
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) ~@[] })
(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)."
([target keys]
(assert (vector? keys) "keys expected to be a vector")

View file

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

View file

@ -479,7 +479,7 @@
(into [id] (cph/get-parent-ids (:objects page) id)))
need-sync? (fn [operation]
; 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)
(component-sync-attrs (:attr operation))))
any-sync? (some need-sync? operations)]

View file

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

View file

@ -27,7 +27,7 @@
(t/is (= (cph/insert-at-index [:a :b] 10 [: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])
[:a :b]))

View file

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

View file

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

View file

@ -17,7 +17,7 @@ describe("onboarding slides", () => {
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-next-btn").should("exist");
cy.getBySel("onboarding-next-btn").click();

View file

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

View file

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

View file

@ -229,9 +229,9 @@
(swap! st/ongoing-tasks disj :export))))
;; 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
;; completelly closed.
;; completely closed.
(->> progress-stream
(rx/filter #(= "ended" (:status %)))
(rx/take 1)

View file

@ -124,7 +124,7 @@
(try
(assoc params :font (ot/parse data))
(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)))
(read-blob [blob]
@ -169,7 +169,7 @@
(defn rename-and-regroup
"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."
[current-fonts id name installed-fonts]
(let [famdb (-> (merge current-fonts installed-fonts)

View file

@ -198,7 +198,7 @@
:invitation-token invitation-token}]
;; 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).
;; So, we proceed to make an additional call to fetch the
;; profile, and ensure that cookie is set correctly. If

View file

@ -573,7 +573,7 @@
(let [page-id (:current-page-id state)
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)
;; If we try to move a parent into a child we remove it
@ -624,7 +624,7 @@
ids)
;; 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.
;; Sets the correct components metadata for the moved shapes

View file

@ -17,7 +17,7 @@
(log/set-level! :warn)
(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."
[state]
(and (uuid? (:current-file-id state))

View file

@ -26,7 +26,7 @@
(sort-by ::index)))
(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.
The corner case happens when you selects two (or more) shapes that

View file

@ -342,7 +342,7 @@
update-fn
(fn [component]
;; 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.
(when component
(-> component

View file

@ -164,7 +164,7 @@
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
be syncrhonized."
be synchronized."
[it file-id asset-type asset-id library-id state]
(s/assert #{:colors :components :typographies} asset-type)
(s/assert (s/nilable ::us/uuid) asset-id)
@ -198,7 +198,7 @@
the given library.
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]
(s/assert #{:colors :components :typographies} asset-type)
(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
;; handled separatelly
;; handled separately
(defn upload-media-workspace
[{:keys [position file-id] :as params}]
(let [params (assoc params

View file

@ -219,7 +219,7 @@
(fn [[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-by-pages (group-by :page-id changes)]

View file

@ -304,7 +304,7 @@
(update :workspace-pages dissoc id)))
(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/WatchEvent

View file

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

View file

@ -766,7 +766,7 @@
(pcb/with-objects objects)
(pcb/update-shapes moving-frames
(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
;; situations like: 1. Moving inside the same frame; 2. Moving
;; outside the frame

View file

@ -214,7 +214,7 @@
;; https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
(defn use-previous
"Returns the value from previuous render cycle."
"Returns the value from previous render cycle."
[value]
(let [ref (mf/use-ref value)]
(mf/use-effect
@ -234,7 +234,7 @@
(defn use-ref-callback
"Returns a stable callback pointer what calls the interned
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."
[f]
(let [ptr (mf/use-ref nil)]

View file

@ -59,7 +59,7 @@
{::mf/wrap-props false
::mf/register modal/components
::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.
[props]
(let [project-id (unchecked-get props "project-id")

View file

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

View file

@ -62,7 +62,7 @@
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
:className "text-container"
:x x

View file

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

View file

@ -113,7 +113,7 @@
::mf/wrap-props false}
[props]
(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.
mode (h/use-equal-memo (unchecked-get props "interactions-mode"))
offset (h/use-equal-memo (unchecked-get props "frame-offset"))

View file

@ -116,7 +116,7 @@
(mf/use-effect
(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
(let [sub
(->> (dwt/force-render-stream (:id shape))

View file

@ -232,7 +232,7 @@
(when (some? node)
(cond
(= (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
(or (= (dom/get-tag-name node) "mask")

View file

@ -103,7 +103,7 @@
(when @show-frame-thumbnail
(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 (not @thumbnail-data-ref)
(st/emit! (dwt/update-thumbnail page-id id) ))

View file

@ -241,7 +241,7 @@
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
(mf/use-memo
(mf/deps text-shapes edition)

View file

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

View file

@ -79,7 +79,7 @@
;; To show interactively the measures while the user is manipulating
;; the shape with the mouse, generate a copy of the shapes applying
;; the transient tranformations.
;; the transient transformations.
shapes (as-> old-shapes $
(map gsh/transform-shape $)
(map gsh/translate-to-frame $ frames))
@ -256,7 +256,7 @@
;; FRAME 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.presets.custom-select.flex-grow {:on-click #(reset! show-presets-dropdown? true)}
[:span (tr "workspace.options.size-presets")]

View file

@ -76,7 +76,7 @@
It receives a function to execute for retrieve the stream that will
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.
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
;;
;; 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://www.w3schools.com/jsref/event_relatedtarget.asp
;; https://stackoverflow.com/questions/14194324/firefox-firing-dragleave-when-dragging-over-text?noredirect=1&lq=1

View file

@ -69,7 +69,7 @@
(autodetect))))
;; 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
;; code is executed in the critical part (application bootstrap) and
;; used in many parts of the application.

View file

@ -76,7 +76,7 @@
(defn make-curve-point
"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]
(let [indices (upc/point-indices content point)

View file

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