diff --git a/.circleci/config.yml b/.circleci/config.yml index 70ba3b801..09cc658e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,10 +22,10 @@ jobs: # Download and cache dependencies - restore_cache: - keys: - - v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- + keys: + - v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- - run: cd .clj-kondo && cat config.edn - run: cat .cljfmt.edn @@ -58,6 +58,7 @@ jobs: command: | yarn install yarn run fmt:clj:check + yarn run fmt:js:check - run: name: "common linter check" @@ -107,8 +108,8 @@ jobs: working_directory: "./frontend" command: | yarn install - yarn run compile - yarn run compile:cljs + yarn run build:app:assets + clojure -M:dev:shadow-cljs release main yarn playwright install --with-deps chromium yarn e2e:test @@ -125,7 +126,6 @@ jobs: PENPOT_TEST_REDIS_URI: "redis://localhost/1" - save_cache: - paths: - - ~/.m2 - key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}} - + paths: + - ~/.m2 + key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}} diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn index fe1d14d90..5675b9d5d 100644 --- a/.clj-kondo/config.edn +++ b/.clj-kondo/config.edn @@ -3,7 +3,6 @@ promesa.core/->> clojure.core/->> promesa.core/-> clojure.core/-> promesa.exec.csp/go-loop clojure.core/loop - rumext.v2/defc clojure.core/defn promesa.util/with-open clojure.core/with-open app.common.schema.generators/let clojure.core/let app.common.data/export clojure.core/def @@ -20,6 +19,7 @@ app.db/with-atomic hooks.export/penpot-with-atomic potok.v2.core/reify hooks.export/potok-reify rumext.v2/fnc hooks.export/rumext-fnc + rumext.v2/defc hooks.export/rumext-defc rumext.v2/lazy-component hooks.export/rumext-lazycomponent shadow.lazy/loadable hooks.export/rumext-lazycomponent }} diff --git a/.clj-kondo/hooks/export.clj b/.clj-kondo/hooks/export.clj index a209cf018..50e617de5 100644 --- a/.clj-kondo/hooks/export.clj +++ b/.clj-kondo/hooks/export.clj @@ -12,6 +12,7 @@ (def registry (atom {})) + (defn potok-reify [{:keys [:node :filename] :as params}] (let [[rnode rtype & other] (:children node) @@ -66,12 +67,86 @@ (let [[cname mdata params & body] (rest (:children node)) [params body] (if (api/vector-node? mdata) [mdata (cons params body)] - [params body])] - (let [result (api/list-node - (into [(api/token-node 'fn) - params] - (cons mdata body)))] - {:node result}))) + [params body]) + + result (api/list-node + (into [(api/token-node 'fn) params] + (cons mdata body)))] + + {:node result})) + + +(defn- parse-defc + [{:keys [children] :as node}] + (let [args (rest children) + + [cname args] + (if (api/token-node? (first args)) + [(first args) (rest args)] + (throw (ex-info "unexpected1" {}))) + + [docs args] + (if (api/string-node? (first args)) + [(first args) (rest args)] + ["" args]) + + [mdata args] + (if (api/map-node? (first args)) + [(first args) (rest args)] + [(api/map-node []) args]) + + [params body] + (if (api/vector-node? (first args)) + [(first args) (rest args)] + (throw (ex-info "unexpected2" {})))] + + [cname docs mdata params body])) + +(defn rumext-defc + [{:keys [node]}] + (let [[cname docs mdata params body] (parse-defc node) + + param1 (first (:children params)) + paramN (rest (:children params)) + + param1 (if (api/map-node? param1) + (let [param1 (into {} (comp + (partition-all 2) + (map (fn [[k v]] + [(if (api/keyword-node? k) + (:k k) + k) + (if (api/vector-node? v) + (vec (:children v)) + v)]))) + (:children param1)) + + binding (:rest param1) + param1 (if binding + (if (contains? param1 :as) + (update param1 :keys (fnil conj []) binding) + (assoc param1 :as binding)) + param1)] + (->> (dissoc param1 :rest) + (mapcat (fn [[k v]] + [(if (keyword? k) + (api/keyword-node k) + k) + (if (vector? v) + (api/vector-node v) + v)])) + (api/map-node))) + param1) + + result (api/list-node + (into [(api/token-node 'defn) + cname + (api/vector-node (filter some? (cons param1 paramN)))] + (cons mdata body)))] + + ;; (prn (api/sexpr result)) + + {:node result})) (defn rumext-lazycomponent diff --git a/.cljfmt.edn b/.cljfmt.edn index 38cfeb89b..02c567b2e 100644 --- a/.cljfmt.edn +++ b/.cljfmt.edn @@ -4,6 +4,7 @@ :remove-consecutive-blank-lines? false :extra-indents {rumext.v2/fnc [[:inner 0]] cljs.test/async [[:inner 0]] + app.common.schema/register! [[:inner 0] [:inner 1]] promesa.exec/thread [[:inner 0]] specify! [[:inner 0] [:inner 1]]} } diff --git a/.gitignore b/.gitignore index caf638f38..b0b2074d8 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,8 @@ /deploy /docker/images/bundle* /exporter/target +/frontend/.storybook/preview-body.html +/frontend/.storybook/preview-head.html /frontend/cypress/fixtures/validuser.json /frontend/cypress/videos/*/ /frontend/cypress/videos/*/ @@ -68,7 +70,6 @@ /web clj-profiler/ node_modules -frontend/.storybook/preview-body.html /test-results/ /playwright-report/ /blob-report/ diff --git a/CHANGES.md b/CHANGES.md index 17f333222..ea160e12e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # CHANGELOG -## 2.1.0 +## 2.2.0 ### :rocket: Epics and highlights @@ -9,18 +9,87 @@ ### :heart: Community contributions (Thank you!) ### :sparkles: New features -- Improve auth process [Taiga #Change Auth Process](https://tree.taiga.io/project/penpot/us/7094) ### :bug: Bugs fixed +- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273) + +## 2.1.1 + +### :sparkles: New features + +- Consolidate templates new order and naming [Taiga #8392](https://tree.taiga.io/project/penpot/task/8392) + +### :bug: Bugs fixed + +- Fix the “search” label in translations [Taiga #8402](https://tree.taiga.io/project/penpot/issue/8402) +- Fix pencil loader [Taiga #8348](https://tree.taiga.io/project/penpot/issue/8348) +- Fix several issues on the OIDC. +- Fix regression on the `email-verification` flag [Taiga #8398](https://tree.taiga.io/project/penpot/issue/8398) + +## 2.1.0 - Things can only get better! + +### :rocket: Epics and highlights + +### :boom: Breaking changes & Deprecations + +### :heart: Community contributions (Thank you!) + +### :sparkles: New features + +- Improve auth process [Taiga #7094](https://tree.taiga.io/project/penpot/us/7094) +- Add locking degrees increment (hold shift) on path edition [Taiga #7761](https://tree.taiga.io/project/penpot/issue/7761) +- Persistence & Concurrent Edition Enhancements [Taiga #5657](https://tree.taiga.io/project/penpot/us/5657) +- Allow library colors as recent colors [Taiga #7640](https://tree.taiga.io/project/penpot/issue/7640) +- Missing scroll in viewmode comments [Taiga #7427](https://tree.taiga.io/project/penpot/issue/7427) +- Comments in View mode should mimic the positioning behavior of the Workspace [Taiga #7346](https://tree.taiga.io/project/penpot/issue/7346) +- Misaligned input on comments [Taiga #7461](https://tree.taiga.io/project/penpot/issue/7461) + +### :bug: Bugs fixed + +- Fix selection rectangle appears on scroll [Taiga #7525](https://tree.taiga.io/project/penpot/issue/7525) +- Fix layer tree not expanding to the bottom edge [Taiga #7466](https://tree.taiga.io/project/penpot/issue/7466) +- Fix guides move when board is moved by inputs [Taiga #8010](https://tree.taiga.io/project/penpot/issue/8010) +- Fix clickable area of Penptot logo in the viewer [Taiga #7988](https://tree.taiga.io/project/penpot/issue/7988) +- Fix constraints dropdown when selecting multiple shapes [Taiga #7686](https://tree.taiga.io/project/penpot/issue/7686) +- Layout and scrollign fixes for the bottom palette [Taiga #7559](https://tree.taiga.io/project/penpot/issue/7559) +- Fix expand libraries when search results are present [Taiga #7876](https://tree.taiga.io/project/penpot/issue/7876) +- Fix color palette default library [Taiga #8029](https://tree.taiga.io/project/penpot/issue/8029) +- Component Library is lost after exporting/importing in .zip format [Github #4672](https://github.com/penpot/penpot/issues/4672) +- Fix problem with moving+selection not working properly [Taiga #7943](https://tree.taiga.io/project/penpot/issue/7943) +- Fix problem with flex layout fit to content not positioning correctly children [Taiga #7537](https://tree.taiga.io/project/penpot/issue/7537) +- Fix black line is displaying after show main [Taiga #7653](https://tree.taiga.io/project/penpot/issue/7653) +- Fix "Share prototypes" modal remains open [Taiga #7442](https://tree.taiga.io/project/penpot/issue/7442) +- Fix "Components visibility and opacity" [#4694](https://github.com/penpot/penpot/issues/4694) +- Fix "Attribute overrides in copies are not exported in zip file" [Taiga #8072](https://tree.taiga.io/project/penpot/issue/8072) +- Fix group not automatically selected in the Layers panel after creation [Taiga #8078](https://tree.taiga.io/project/penpot/issue/8078) +- Fix export boards loses opacity [Taiga #7592](https://tree.taiga.io/project/penpot/issue/7592) +- Fix change color on imported svg also changes the stroke alignment[Taiga #7673](https://github.com/penpot/penpot/pull/7673) +- Fix show in view mode and interactions workflow [Taiga #4711](https://github.com/penpot/penpot/pull/4711) +- Fix internal error when I set up a stroke for some objects without and with stroke [Taiga #7558](https://tree.taiga.io/project/penpot/issue/7558) +- Toolbar keeps toggling on and off on spacebar press [Taiga #7654](https://github.com/penpot/penpot/pull/7654) +- Fix toolbar keeps hiding when click outside workspace [Taiga #7776](https://tree.taiga.io/project/penpot/issue/7776) +- Fix open overlay relative to a frame [Taiga #7563](https://tree.taiga.io/project/penpot/issue/7563) +- Workspace-palette items stay hidden when opening with keyboard-shortcut [Taiga #7489](https://tree.taiga.io/project/penpot/issue/7489) +- Fix SVG attrs are not handled correctly when exporting/importing in .zip [Taiga #7920](https://tree.taiga.io/project/penpot/issue/7920) +- Fix validation error when detaching with two nested copies and a swap [Taiga #8095](https://tree.taiga.io/project/penpot/issue/8095) +- Export shapes that are rotated act a bit strange when reimported [Taiga #7585](https://tree.taiga.io/project/penpot/issue/7585) +- Penpot crashes when a new colorpicker is created while uploading an image to another instance [Taiga #8119](https://tree.taiga.io/project/penpot/issue/8119) +- Removing Underline and Strikethrough Affects the Previous Text Object [Taiga #8103](https://tree.taiga.io/project/penpot/issue/8103) +- Color library loses association with shapes when exporting/importing the document [Taiga #8132](https://tree.taiga.io/project/penpot/issue/8132) +- Fix can't collapse groups when searching in the assets tab [Taiga #8125](https://tree.taiga.io/project/penpot/issue/8125) +- Fix 'Detach instance' shortcut is not working [Taiga #8102](https://tree.taiga.io/project/penpot/issue/8102) +- Fix import file message does not detect 0 as error [Taiga #6824](https://tree.taiga.io/project/penpot/issue/6824) +- Image Color Library is not persisted when exporting/importing in .zip [Taiga #8131](https://tree.taiga.io/project/penpot/issue/8131) +- Fix export files including libraries [Taiga #8266](https://tree.taiga.io/project/penpot/issue/8266) + ## 2.0.3 ### :bug: Bugs fixed -- Fix chrome scrollbar styling [Taiga Issue #7852](https://tree.taiga.io/project/penpot/issue/7852) +- Fix chrome scrollbar styling [Taiga #7852](https://tree.taiga.io/project/penpot/issue/7852) - Fix incorrect password encoding on create-profile manage scritp [Github #3651](https://github.com/penpot/penpot/issues/3651) - ## 2.0.2 ### :sparkles: Enhancements @@ -30,7 +99,7 @@ ### :bug: Bugs fixed -- Fix color palette sorting [Taiga Issue #7458](https://tree.taiga.io/project/penpot/issue/7458) +- Fix color palette sorting [Taiga #7458](https://tree.taiga.io/project/penpot/issue/7458) - Fix style scoping problem with imported SVG [Taiga #7671](https://tree.taiga.io/project/penpot/issue/7671) @@ -175,7 +244,7 @@ - Fix problem when changing typography assets [Github #3683](https://github.com/penpot/penpot/issues/3683) - Internal error when you copy and paste some main components between files [Taiga #7397](https://tree.taiga.io/project/penpot/issue/7397) - Fix toolbar disappearing [Taiga #7411](https://tree.taiga.io/project/penpot/issue/7411) -- Fix long text on tab breaks UI [Taiga Issue #7421](https://tree.taiga.io/project/penpot/issue/7421) +- Fix long text on tab breaks UI [Taiga #7421](https://tree.taiga.io/project/penpot/issue/7421) ## 1.19.5 diff --git a/README.md b/README.md index 52171b8c9..848b3efd1 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Penpot’s latest [huge release 2.0](https://penpot.app/dev-diaries), takes the - [Why Penpot](#why-penpot) - [Getting Started](#getting-started) - [Community](#community) +- [Contributing](#contributing) - [Resources](#resources) - [License](#license) diff --git a/THANKYOU.md b/THANKYOU.md index 1a27aa8eb..8c075112b 100644 --- a/THANKYOU.md +++ b/THANKYOU.md @@ -2,12 +2,19 @@ We want to thank to the amazing people that help us! Thank you! You're the best! +Feel free you make a PR updating this file if you miss you in the +list. + ## Security + * Husnain Iqbal (CEO OF ALPHA INFERNO PVT LTD) * [Shiraz Ali Khan](https://www.linkedin.com/in/shiraz-ali-khan-1ba508180/) * Vaibhav Shukla +* Hassan Ahmed (Alias Xen Lee) +* Michal Biesiada (@mbiesiad) ## Internationalization + * [00ff88](https://hosted.weblate.org/user/00ff88) * [AhmadHB](https://hosted.weblate.org/user/AhmadHB) * [Aimee](https://hosted.weblate.org/user/Aimee) @@ -89,6 +96,7 @@ We want to thank to the amazing people that help us! Thank you! You're the best! * [zcraber](https://hosted.weblate.org/user/zcraber) ## Libraries & templates + * systxema * plumilla * victor crespo diff --git a/backend/deps.edn b/backend/deps.edn index df9fd4708..a88402829 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -3,10 +3,10 @@ :deps {penpot/common {:local/root "../common"} - org.clojure/clojure {:mvn/version "1.12.0-alpha9"} + org.clojure/clojure {:mvn/version "1.12.0-alpha12"} org.clojure/tools.namespace {:mvn/version "1.5.0"} - com.github.luben/zstd-jni {:mvn/version "1.5.5-11"} + com.github.luben/zstd-jni {:mvn/version "1.5.6-3"} io.prometheus/simpleclient {:mvn/version "0.16.0"} io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"} @@ -26,13 +26,13 @@ :git/url "https://github.com/funcool/yetti.git" :exclusions [org.slf4j/slf4j-api]} - com.github.seancorfield/next.jdbc {:mvn/version "1.3.925"} - metosin/reitit-core {:mvn/version "0.6.0"} - nrepl/nrepl {:mvn/version "1.1.1"} - cider/cider-nrepl {:mvn/version "0.47.1"} + com.github.seancorfield/next.jdbc {:mvn/version "1.3.939"} + metosin/reitit-core {:mvn/version "0.7.0"} + nrepl/nrepl {:mvn/version "1.1.2"} + cider/cider-nrepl {:mvn/version "0.48.0"} org.postgresql/postgresql {:mvn/version "42.7.3"} - org.xerial/sqlite-jdbc {:mvn/version "3.45.2.0"} + org.xerial/sqlite-jdbc {:mvn/version "3.46.0.0"} com.zaxxer/HikariCP {:mvn/version "5.1.0"} @@ -58,7 +58,7 @@ ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} - software.amazon.awssdk/s3 {:mvn/version "2.22.12"} + software.amazon.awssdk/s3 {:mvn/version "2.25.63"} } :paths ["src" "resources" "target/classes"] @@ -74,13 +74,13 @@ :build {:extra-deps - {io.github.clojure/tools.build {:git/tag "v0.10.0" :git/sha "3a2c484"}} + {io.github.clojure/tools.build {:git/tag "v0.10.3" :git/sha "15ead66"}} :ns-default build} :test {:main-opts ["-m" "kaocha.runner"] :jvm-opts ["-Dlog4j2.configurationFile=log4j2-devenv-repl.xml"] - :extra-deps {lambdaisland/kaocha {:mvn/version "1.88.1376"}}} + :extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}} :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}} diff --git a/backend/package.json b/backend/package.json index 9efdad02c..0855bf4eb 100644 --- a/backend/package.json +++ b/backend/package.json @@ -4,19 +4,19 @@ "license": "MPL-2.0", "author": "Kaleidos INC", "private": true, - "packageManager": "yarn@4.2.2", + "packageManager": "yarn@4.3.1", "repository": { "type": "git", "url": "https://github.com/penpot/penpot" }, "dependencies": { - "luxon": "^3.4.2", - "sax": "^1.2.4" + "luxon": "^3.4.4", + "sax": "^1.4.1" }, "devDependencies": { - "nodemon": "^3.0.1", + "nodemon": "^3.1.2", "source-map-support": "^0.5.21", - "ws": "^8.13.0" + "ws": "^8.17.0" }, "scripts": { "fmt:clj:check": "cljfmt check --parallel=false src/ test/", diff --git a/backend/resources/app/email/change-email/en.html b/backend/resources/app/email/change-email/en.html index ad95fa641..d63efa72f 100644 --- a/backend/resources/app/email/change-email/en.html +++ b/backend/resources/app/email/change-email/en.html @@ -168,7 +168,7 @@
- Hello {{name}}!
+ Hello {{name|abbreviate:25}}!
|