diff --git a/.gitignore b/.gitignore index 7b5ea6e61..330eadd83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,49 +1,50 @@ -figwheel_server.log -*jar *-init.clj +*.jar +*.penpot +.calva +.clj-kondo +.cpcache .lein-deps-sum .lein-failures -.lein-repl-history .lein-plugins/ -.repl +.lein-repl-history +.lsp .nrepl-port -.cpcache -.rebel_readline_history .nyc_output -/vendor/**/target -/cd.md -node_modules -/backend/target/ -/backend/resources/public/media -/backend/resources/public/assets +.rebel_readline_history +.repl +/.clj-kondo/.cache +/_dump +/backend/- /backend/assets/ /backend/dist/ /backend/logs/ -/backend/- -/telemetry/ -/frontend/npm-debug.log -/frontend/target/ -/frontend/dist/ -/frontend/out/ -/frontend/.shadow-cljs -/frontend/resources/public/* -/frontend/resources/fonts/experiments -/exporter/target -/exporter/.shadow-cljs -/docker/images/bundle* -/common/.shadow-cljs -/common/target -/common/coverage -/.clj-kondo/.cache -clj-profiler/ +/backend/resources/public/assets +/backend/resources/public/media +/backend/target/ /bundle* -/media +/cd.md +/clj-profiler/ +/common/.shadow-cljs +/common/coverage +/common/target /deploy -/web -/_dump -/vendor/svgclean/bundle*.js - -.calva -.clj-kondo -.lsp +/docker/images/bundle* +/exporter/.shadow-cljs +/exporter/target +/frontend/.shadow-cljs /frontend/cypress/videos/*/ +/frontend/dist/ +/frontend/npm-debug.log +/frontend/out/ +/frontend/resources/fonts/experiments +/frontend/resources/public/* +/frontend/target/ +/media +/telemetry/ +/vendor/**/target +/vendor/svgclean/bundle*.js +/web +clj-profiler/ +figwheel_server.log +node_modules diff --git a/backend/src/app/srepl/main.clj b/backend/src/app/srepl/main.clj index 844d6b3a3..2a7167753 100644 --- a/backend/src/app/srepl/main.clj +++ b/backend/src/app/srepl/main.clj @@ -2,9 +2,10 @@ "A main namespace for server repl." #_:clj-kondo/ignore (:require + [app.common.data :as d] [app.common.pages :as cp] - [app.common.uuid :as uuid] [app.common.pages.migrations :as pmg] + [app.common.uuid :as uuid] [app.config :as cfg] [app.db :as db] [app.db.sql :as sql] @@ -12,12 +13,12 @@ [app.rpc.queries.profile :as prof] [app.srepl.dev :as dev] [app.util.blob :as blob] - [cuerdas.core :as str] - [clojure.pprint :refer [pprint]])) + [clojure.pprint :refer [pprint]] + [cuerdas.core :as str])) (defn update-file - ([id f] (update-file id f false)) - ([id f save?] + ([system id f] (update-file system id f false)) + ([system id f save?] (db/with-atomic [conn (:app.db/pool system)] (let [file (db/get-by-id conn :file id {:for-update true}) file (-> file diff --git a/frontend/src/app/main/ui/shapes/path.cljs b/frontend/src/app/main/ui/shapes/path.cljs index 8c2decdc6..e62fb46e8 100644 --- a/frontend/src/app/main/ui/shapes/path.cljs +++ b/frontend/src/app/main/ui/shapes/path.cljs @@ -6,6 +6,7 @@ (ns app.main.ui.shapes.path (:require + [app.common.logging :as log] [app.main.ui.shapes.attrs :as attrs] [app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]] [app.util.object :as obj] @@ -19,10 +20,21 @@ [props] (let [shape (unchecked-get props "shape") content (:content shape) - pdata (mf/use-memo (mf/deps content) #(upf/format-path content)) + pdata (mf/use-memo + (mf/deps content) + (fn [] + (try + (upf/format-path content) + (catch :default e + (log/error :hint "unexpected error on formating path" + :shape-name (:name shape) + :shape-id (:id shape) + :cause e) + "")))) + props (-> (attrs/extract-style-attrs shape) (obj/merge! #js {:d pdata}))] + [:& shape-custom-stroke {:shape shape} [:> :path props]])) - diff --git a/frontend/src/app/main/ui/workspace/viewport/outline.cljs b/frontend/src/app/main/ui/workspace/viewport/outline.cljs index bab870bf9..f525bb31f 100644 --- a/frontend/src/app/main/ui/workspace/viewport/outline.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/outline.cljs @@ -6,6 +6,7 @@ (ns app.main.ui.workspace.viewport.outline (:require + [app.common.exceptions :as ex] [app.common.geom.shapes :as gsh] [app.common.pages :as cp] [app.main.refs :as refs] @@ -27,7 +28,9 @@ path-data (mf/use-memo (mf/deps shape) - #(when path? (upf/format-path (:content shape)))) + #(when path? + (or (ex/ignoring (upf/format-path (:content shape))) + ""))) {:keys [x y width height selrect]} shape