From fac2314d62123189a3bb03851e539a9dc26fac60 Mon Sep 17 00:00:00 2001 From: Yamila Moreno Date: Tue, 25 Feb 2025 09:10:53 +0100 Subject: [PATCH 1/6] :wrench: Relax secure cookies requirement when non-https public uri is set (#5939) --- backend/src/app/config.clj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/app/config.clj b/backend/src/app/config.clj index 1d3dac9a5..07f80d431 100644 --- a/backend/src/app/config.clj +++ b/backend/src/app/config.clj @@ -12,6 +12,7 @@ [app.common.exceptions :as ex] [app.common.flags :as flags] [app.common.schema :as sm] + [app.common.uri :as u] [app.common.version :as v] [app.util.overrides] [app.util.time :as dt] @@ -230,7 +231,14 @@ (defn- parse-flags [config] - (flags/parse flags/default (:flags config))) + (let [public-uri (c/get config :public-uri) + public-uri (some-> public-uri (u/uri)) + extra-flags (if (and public-uri + (= (:scheme public-uri) "http") + (not= (:host public-uri) "localhost")) + #{:disable-secure-session-cookies} + #{})] + (flags/parse flags/default extra-flags (:flags config)))) (defn read-env [prefix] From 2219d91e4d177d83da33b2af0819c1e76370914d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?luis=CE=B4=CE=BC?= Date: Tue, 25 Feb 2025 09:16:46 +0100 Subject: [PATCH 2/6] :bug: Fix all comments appear in every page (#5943) --- frontend/src/app/main/ui/workspace/viewport.cljs | 1 + frontend/src/app/main/ui/workspace/viewport/comments.cljs | 5 +++-- frontend/src/app/main/ui/workspace/viewport_wasm.cljs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/viewport.cljs b/frontend/src/app/main/ui/workspace/viewport.cljs index ebeafcad2..2a31a1013 100644 --- a/frontend/src/app/main/ui/workspace/viewport.cljs +++ b/frontend/src/app/main/ui/workspace/viewport.cljs @@ -301,6 +301,7 @@ (when show-comments? [:> comments/comments-layer* {:vbox vbox + :page-id page-id :file-id file-id :vport vport :zoom zoom diff --git a/frontend/src/app/main/ui/workspace/viewport/comments.cljs b/frontend/src/app/main/ui/workspace/viewport/comments.cljs index 74ceafbae..c68cb9af1 100644 --- a/frontend/src/app/main/ui/workspace/viewport/comments.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/comments.cljs @@ -16,7 +16,7 @@ [rumext.v2 :as mf])) (mf/defc comments-layer* - [{:keys [vbox vport zoom drawing file-id]}] + [{:keys [vbox vport zoom drawing file-id page-id]}] (let [vbox-x (dm/get-prop vbox :x) vbox-y (dm/get-prop vbox :y) vport-w (dm/get-prop vport :width) @@ -31,8 +31,9 @@ threads-map (mf/deref refs/threads) threads - (mf/with-memo [threads-map local profile] + (mf/with-memo [threads-map local profile page-id] (->> (vals threads-map) + (filter #(= (:page-id %) page-id)) (dcm/apply-filters local profile))) viewport diff --git a/frontend/src/app/main/ui/workspace/viewport_wasm.cljs b/frontend/src/app/main/ui/workspace/viewport_wasm.cljs index d74fea809..3de0c4c9d 100644 --- a/frontend/src/app/main/ui/workspace/viewport_wasm.cljs +++ b/frontend/src/app/main/ui/workspace/viewport_wasm.cljs @@ -348,6 +348,7 @@ (when show-comments? [:> comments/comments-layer* {:vbox vbox + :page-id page-id :vport vport :zoom zoom :drawing drawing}]) From 7f9a9ad7741032e3f5421a7e76e5ac664fa96be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?luis=CE=B4=CE=BC?= Date: Tue, 25 Feb 2025 09:17:42 +0100 Subject: [PATCH 3/6] :bug: Fix visual glitches in the comment dropdown at the dashboard (#5938) --- frontend/src/app/main/ui/comments.cljs | 4 ++-- frontend/src/app/main/ui/comments.scss | 2 +- frontend/src/app/main/ui/dashboard/comments.scss | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/ui/comments.cljs b/frontend/src/app/main/ui/comments.cljs index 4cd01a6d5..ee8882673 100644 --- a/frontend/src/app/main/ui/comments.cljs +++ b/frontend/src/app/main/ui/comments.cljs @@ -1258,8 +1258,8 @@ [:div {:class (stl/css :cover) :on-click on-click*} [:div {:class (stl/css :location)} - [:> icon* {:icon-id "comments" - :class (stl/css :location-icon)}] + [:div {:class (stl/css :location-icon)} + [:> icon* {:icon-id "comments"}]] [:div {:class (stl/css :location-text)} (str "#" (:seqn item)) (str " " (:file-name item)) diff --git a/frontend/src/app/main/ui/comments.scss b/frontend/src/app/main/ui/comments.scss index 8dda4e806..399a6ac46 100644 --- a/frontend/src/app/main/ui/comments.scss +++ b/frontend/src/app/main/ui/comments.scss @@ -31,7 +31,7 @@ color: var(--comment-subtitle-color); display: flex; align-items: center; - gap: $s-8; + gap: $s-6; } .location-icon { diff --git a/frontend/src/app/main/ui/dashboard/comments.scss b/frontend/src/app/main/ui/dashboard/comments.scss index 93070c2f7..344fa85c6 100644 --- a/frontend/src/app/main/ui/dashboard/comments.scss +++ b/frontend/src/app/main/ui/dashboard/comments.scss @@ -14,7 +14,6 @@ .thread-groups { height: calc(100% - $s-32); - overflow-y: scroll; max-height: $s-440; overflow: auto; } @@ -72,6 +71,7 @@ max-height: $s-480; min-height: $s-200; position: absolute; + overflow: hidden; width: 100%; z-index: $z-index-4; From 6c1e8c3fe87663283e4c5e2fce2e67f47e355e09 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 24 Feb 2025 15:38:34 +0100 Subject: [PATCH 4/6] :arrow_up: Update deps (fix compat issues with minio) --- backend/deps.edn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/deps.edn b/backend/deps.edn index 7eec3cde3..52c8f0dee 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -35,7 +35,7 @@ org.postgresql/postgresql {:mvn/version "42.7.5"} org.xerial/sqlite-jdbc {:mvn/version "3.48.0.0"} - com.zaxxer/HikariCP {:mvn/version "6.0.0"} + com.zaxxer/HikariCP {:mvn/version "6.2.1"} io.whitfin/siphash {:mvn/version "2.0.0"} @@ -59,7 +59,7 @@ ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} - software.amazon.awssdk/s3 {:mvn/version "2.30.7"} + software.amazon.awssdk/s3 {:mvn/version "2.30.26"} } :paths ["src" "resources" "target/classes"] From a549d783ba435e8d03b9c5b91ef567e635fc8c74 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 25 Feb 2025 12:49:33 +0100 Subject: [PATCH 5/6] :sparkles: Downgrade s3 sdk for compatibility with minio (#5946) * :books: Add `:arrow_down:` emoji to the contributing guide For cases where we need to downgrade dependencies * :sparkles: Downgrade S3 SDK version Mainly for minio and other S3-compatible services --- .github/workflows/commit-checker.yml | 2 +- CONTRIBUTING.md | 1 + backend/deps.edn | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commit-checker.yml b/.github/workflows/commit-checker.yml index 7ad5c1101..b5e0efbbe 100644 --- a/.github/workflows/commit-checker.yml +++ b/.github/workflows/commit-checker.yml @@ -26,7 +26,7 @@ jobs: - name: Check Commit Type uses: gsactions/commit-message-checker@v2 with: - pattern: '^:(lipstick|globe_with_meridians|wrench|books|arrow_up|zap|ambulance|construction|boom|fire|whale|bug|sparkles|paperclip|tada|recycle):\s[A-Z].*[^.]$' + pattern: '^:(lipstick|globe_with_meridians|wrench|books|arrow_up|arrow_down|zap|ambulance|construction|boom|fire|whale|bug|sparkles|paperclip|tada|recycle):\s[A-Z].*[^.]$' flags: 'gm' error: 'Commit should match CONTRIBUTING.md guideline' checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f183b34d6..58a4bf68a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,6 +84,7 @@ Where type is: - :whale: `:whale:` a commit for docker related stuff - :paperclip: `:paperclip:` a commit with other not relevant changes - :arrow_up: `:arrow_up:` a commit with dependencies updates +- :arrow_down: `:arrow_down:` a commit with dependencies downgrades - :fire: `:fire:` a commit that removes files or code More info: diff --git a/backend/deps.edn b/backend/deps.edn index 52c8f0dee..75187d746 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -59,8 +59,7 @@ ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} - software.amazon.awssdk/s3 {:mvn/version "2.30.26"} - } + software.amazon.awssdk/s3 {:mvn/version "2.28.26"}} :paths ["src" "resources" "target/classes"] :aliases From 8f06fa10267f7df9bfa794731f2bb13b067a9638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20L=C3=B3pez?= Date: Tue, 25 Feb 2025 12:50:16 +0100 Subject: [PATCH 6/6] :tada: Add AB test descriptive board tooltip (#5936) * :tada: Add AB test descriptive board tooltip * :paperclip: Add changes from feedback --- backend/src/app/rpc/commands/profile.clj | 3 ++- frontend/src/app/main/data/workspace.cljs | 4 +++- frontend/src/app/main/data/workspace/common.cljs | 11 +++++++++++ .../src/app/main/data/workspace/thumbnails.cljs | 7 +++++++ frontend/src/app/main/ui/workspace/top_toolbar.cljs | 13 +++++++++++-- frontend/translations/en.po | 6 +++++- frontend/translations/es.po | 6 +++++- 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/backend/src/app/rpc/commands/profile.clj b/backend/src/app/rpc/commands/profile.clj index 7760c96b5..1264da81c 100644 --- a/backend/src/app/rpc/commands/profile.clj +++ b/backend/src/app/rpc/commands/profile.clj @@ -58,7 +58,8 @@ [:welcome-file-id {:optional true} [:maybe ::sm/boolean]] [:release-notes-viewed {:optional true} [::sm/text {:max 100}]] - [:notifications {:optional true} schema:props-notifications]]) + [:notifications {:optional true} schema:props-notifications] + [:workspace-visited {:optional true} ::sm/boolean]]) (def schema:profile [:map {:title "Profile"} diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index d6bffce4b..5f7331571 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -51,6 +51,7 @@ [app.main.data.workspace.collapse :as dwco] [app.main.data.workspace.colors :as dwcl] [app.main.data.workspace.comments :as dwcm] + [app.main.data.workspace.common :as dwc] [app.main.data.workspace.drawing :as dwd] [app.main.data.workspace.edition :as dwe] [app.main.data.workspace.fix-broken-shapes :as fbs] @@ -393,7 +394,7 @@ (defn finalize-workspace [file-id] - (ptk/reify ::finalize-file + (ptk/reify ::finalize-workspace ptk/UpdateEvent (update [_ state] (-> state @@ -416,6 +417,7 @@ (dpj/finalize-project project-id) (dwsl/finalize-shape-layout) (dwcl/stop-picker) + (dwc/set-workspace-visited) (modal/hide) (ntf/hide)))))) diff --git a/frontend/src/app/main/data/workspace/common.cljs b/frontend/src/app/main/data/workspace/common.cljs index 1cc6ecad0..8b9242b01 100644 --- a/frontend/src/app/main/data/workspace/common.cljs +++ b/frontend/src/app/main/data/workspace/common.cljs @@ -7,6 +7,8 @@ (ns app.main.data.workspace.common (:require [app.common.logging :as log] + [app.config :as cf] + [app.main.data.profile :as du] [app.main.data.workspace.layout :as dwl] [beicon.v2.core :as rx] [potok.v2.core :as ptk])) @@ -29,6 +31,15 @@ [e] (= e :interrupt)) +(defn set-workspace-visited + [] + (ptk/reify ::set-workspace-visited + ptk/WatchEvent + (watch [_ state _] + (let [profile (:profile state) + props (get profile :props)] + (when (and (cf/external-feature-flag "boards-03" "test") (not (:workspace-visited props))) + (rx/of (du/update-profile-props {:workspace-visited true}))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; UNDO diff --git a/frontend/src/app/main/data/workspace/thumbnails.cljs b/frontend/src/app/main/data/workspace/thumbnails.cljs index a95d47542..7041d53c1 100644 --- a/frontend/src/app/main/data/workspace/thumbnails.cljs +++ b/frontend/src/app/main/data/workspace/thumbnails.cljs @@ -14,6 +14,7 @@ [app.main.data.changes :as dch] [app.main.data.helpers :as dsh] [app.main.data.persistence :as-alias dps] + [app.main.data.workspace.common :as dwc] [app.main.data.workspace.notifications :as-alias wnt] [app.main.rasterizer :as thr] [app.main.refs :as refs] @@ -291,4 +292,10 @@ (rx/mapcat #(into #{} %)) (rx/map #(update-thumbnail file-id page-id % "frame" "watch-state-changes")))) + ;; WARNING: This is a workaround for an AB test, in case we consolidate this change we should + ;; find a better way to handle this. + (->> notifier-s + (rx/take 1) + (rx/map dwc/set-workspace-visited)) + (rx/take-until stopper-s)))))) diff --git a/frontend/src/app/main/ui/workspace/top_toolbar.cljs b/frontend/src/app/main/ui/workspace/top_toolbar.cljs index 541a15d0a..bec682c80 100644 --- a/frontend/src/app/main/ui/workspace/top_toolbar.cljs +++ b/frontend/src/app/main/ui/workspace/top_toolbar.cljs @@ -10,6 +10,7 @@ [app.common.data.macros :as dm] [app.common.geom.point :as gpt] [app.common.media :as cm] + [app.config :as cf] [app.main.data.event :as ev] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] @@ -120,7 +121,15 @@ (mf/use-fn (fn [event] (dom/blur! (dom/get-target event)) - (st/emit! (dwc/toggle-toolbar-visibility))))] + (st/emit! (dwc/toggle-toolbar-visibility)))) + + profile (mf/deref refs/profile) + props (get profile :props) + test-tooltip-board-text + (if (and (cf/external-feature-flag "boards-03" "test") + (not (:workspace-visited props))) + (tr "workspace.toolbar.frame-first-time" (sc/get-tooltip :draw-frame)) + (tr "workspace.toolbar.frame" (sc/get-tooltip :draw-frame)))] (when-not ^boolean read-only? [:aside {:class (stl/css-case :main-toolbar true @@ -140,7 +149,7 @@ [:* [:li [:button - {:title (tr "workspace.toolbar.frame" (sc/get-tooltip :draw-frame)) + {:title test-tooltip-board-text :aria-label (tr "workspace.toolbar.frame" (sc/get-tooltip :draw-frame)) :class (stl/css-case :main-toolbar-options-button true :selected (= selected-drawtool :frame)) :on-click select-drawtool diff --git a/frontend/translations/en.po b/frontend/translations/en.po index a6e1de98a..e9da61803 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -6664,10 +6664,14 @@ msgstr "Curve (%s)" msgid "workspace.toolbar.ellipse" msgstr "Ellipse (%s)" -#: src/app/main/ui/workspace/top_toolbar.cljs:143, src/app/main/ui/workspace/top_toolbar.cljs:144 +#: src/app/main/ui/workspace/top_toolbar.cljs:128, src/app/main/ui/workspace/top_toolbar.cljs:144 msgid "workspace.toolbar.frame" msgstr "Board (%s)" +#: src/app/main/ui/workspace/top_toolbar.cljs:128, src/app/main/ui/workspace/top_toolbar.cljs:144 +msgid "workspace.toolbar.frame-first-time" +msgstr "Create board. Click and drag to define its size. (%s)" + #: src/app/main/ui/workspace/top_toolbar.cljs:60, src/app/main/ui/workspace/top_toolbar.cljs:61 msgid "workspace.toolbar.image" msgstr "Image (%s)" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 6caf8f18c..3dbc3d8d0 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -6671,10 +6671,14 @@ msgstr "Curva (%s)" msgid "workspace.toolbar.ellipse" msgstr "Elipse (%s)" -#: src/app/main/ui/workspace/top_toolbar.cljs:143, src/app/main/ui/workspace/top_toolbar.cljs:144 +#: src/app/main/ui/workspace/top_toolbar.cljs:128, src/app/main/ui/workspace/top_toolbar.cljs:144 msgid "workspace.toolbar.frame" msgstr "Tablero (%s)" +#: src/app/main/ui/workspace/top_toolbar.cljs:128, src/app/main/ui/workspace/top_toolbar.cljs:144 +msgid "workspace.toolbar.frame-first-time" +msgstr "Crear tablero. Click y arrastrar para definir el tamaƱo. (%s)" + #: src/app/main/ui/workspace/top_toolbar.cljs:60, src/app/main/ui/workspace/top_toolbar.cljs:61 msgid "workspace.toolbar.image" msgstr "Imagen (%s)"