From a737c125d5a49724d933d817fc656e3cf4a7b488 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 10:46:38 +0200 Subject: [PATCH 1/9] :bug: Fix unpublish more than one library at the same time --- CHANGES.md | 1 + .../src/app/main/ui/dashboard/file_menu.cljs | 40 ++++++++++--------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 88a5ef670..ad3a2f569 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ - Fix files can be opened from multiple urls [Taiga #5310](https://tree.taiga.io/project/penpot/issue/5310) - Fix asset color item was created from the selected layer [Taiga #5180](https://tree.taiga.io/project/penpot/issue/5180) +- Fix unpublish more than one library at the same time [Taiga #5532](https://tree.taiga.io/project/penpot/issue/5532) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index cea4baf06..23726875e 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -142,7 +142,11 @@ #(st/emit! (dd/set-file-shared (assoc file :is-shared true))) del-shared - #(st/emit! (dd/set-file-shared (assoc file :is-shared false))) + (mf/use-fn + (mf/deps files) + (fn [_] + (run! #(st/emit! (dd/set-file-shared (assoc % :is-shared false))) files))) + on-add-shared (fn [event] @@ -216,23 +220,23 @@ (when current-team (let [sub-options (concat (vec (for [project current-projects] - {:option-name (get-project-name project) - :id (get-project-id project) - :option-handler (on-move (:id current-team) - (:id project))})) - (when (seq other-teams) - [{:option-name (tr "dashboard.move-to-other-team") - :id "move-to-other-team" - :sub-options - (for [team other-teams] - {:option-name (get-team-name team) - :id (get-project-id team) - :sub-options - (for [sub-project (:projects team)] - {:option-name (get-project-name sub-project) - :id (get-project-id sub-project) - :option-handler (on-move (:id team) - (:id sub-project))})})}])) + {:option-name (get-project-name project) + :id (get-project-id project) + :option-handler (on-move (:id current-team) + (:id project))})) + (when (seq other-teams) + [{:option-name (tr "dashboard.move-to-other-team") + :id "move-to-other-team" + :sub-options + (for [team other-teams] + {:option-name (get-team-name team) + :id (get-project-id team) + :sub-options + (for [sub-project (:projects team)] + {:option-name (get-project-name sub-project) + :id (get-project-id sub-project) + :option-handler (on-move (:id team) + (:id sub-project))})})}])) options (if multi? [{:option-name (tr "dashboard.duplicate-multi" file-count) From 4d4e9703ccf26eae911c3af6ac04edd79f8347da Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:50:08 +0200 Subject: [PATCH 2/9] :bug: Fix drag projects on dahsboard --- CHANGES.md | 2 ++ .../resources/styles/main/partials/dashboard.scss | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ad3a2f569..5004cfe72 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,8 @@ - Fix files can be opened from multiple urls [Taiga #5310](https://tree.taiga.io/project/penpot/issue/5310) - Fix asset color item was created from the selected layer [Taiga #5180](https://tree.taiga.io/project/penpot/issue/5180) - Fix unpublish more than one library at the same time [Taiga #5532](https://tree.taiga.io/project/penpot/issue/5532) +- Fix drag projects on dahsboard [Taiga #5531](https://tree.taiga.io/project/penpot/issue/5531) + ### :arrow_up: Deps updates diff --git a/frontend/resources/styles/main/partials/dashboard.scss b/frontend/resources/styles/main/partials/dashboard.scss index 5efa8efb3..f48e89e57 100644 --- a/frontend/resources/styles/main/partials/dashboard.scss +++ b/frontend/resources/styles/main/partials/dashboard.scss @@ -466,20 +466,27 @@ .dashboard-templates-section { position: absolute; + display: flex; + flex-direction: column; + justify-content: flex-end; bottom: 0; width: 100%; - height: 285px; + height: 228px; transition: bottom 300ms; - + pointer-events: none; &.collapsed { bottom: -228px; transition: bottom 300ms; } .title { - width: 100%; + pointer-events: all; + width: fit-content; + top: -56px; + right: -28px; text-align: right; height: 56px; + position: absolute; button { border: none; cursor: pointer; @@ -529,6 +536,7 @@ display: flex; align-items: center; justify-content: center; + pointer-events: all; svg { width: 12px; height: 12px; @@ -550,6 +558,7 @@ } .content { + pointer-events: all; background-color: $color-white; width: 200%; height: 229px; From 02466d603c4ae0912e02ae9be8dde6e123afc306 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:51:34 +0200 Subject: [PATCH 3/9] :bug: Fix allow team name to be all blank --- CHANGES.md | 2 +- frontend/src/app/main/ui/dashboard/team_form.cljs | 11 ++++++++++- frontend/translations/en.po | 8 ++++++++ frontend/translations/es.po | 8 ++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5004cfe72..c2c4f1f4d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,7 +26,7 @@ - Fix asset color item was created from the selected layer [Taiga #5180](https://tree.taiga.io/project/penpot/issue/5180) - Fix unpublish more than one library at the same time [Taiga #5532](https://tree.taiga.io/project/penpot/issue/5532) - Fix drag projects on dahsboard [Taiga #5531](https://tree.taiga.io/project/penpot/issue/5531) - +- Fix allow team name to be all blank [Taiga #5527](https://tree.taiga.io/project/penpot/issue/5527) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/dashboard/team_form.cljs b/frontend/src/app/main/ui/dashboard/team_form.cljs index 673343fcf..81579044c 100644 --- a/frontend/src/app/main/ui/dashboard/team_form.cljs +++ b/frontend/src/app/main/ui/dashboard/team_form.cljs @@ -17,12 +17,20 @@ [app.util.router :as rt] [beicon.core :as rx] [cljs.spec.alpha :as s] + [cuerdas.core :as str] [rumext.v2 :as mf])) (s/def ::name ::us/not-empty-string) (s/def ::team-form (s/keys :req-un [::name])) +(defn- validate-name + [errors data] + (let [name (-> data :name str/trim)] + (cond-> errors + (str/empty? name) + (assoc :name {:message (tr "dashboard.team-name.not-empty-name")})))) + (defn- on-create-success [_form response] (let [msg "Team created successfully"] @@ -66,10 +74,11 @@ (on-create-submit form)))) (mf/defc team-form-modal {::mf/register modal/components - ::mf/register-as :team-form} + ::mf/register-as :team-form} [{:keys [team] :as props}] (let [initial (mf/use-memo (fn [] (or team {}))) form (fm/use-form :spec ::team-form + :validators [validate-name] :initial initial)] [:div.modal-overlay [:div.modal-container.team-form-modal diff --git a/frontend/translations/en.po b/frontend/translations/en.po index e8dd59406..d1c88fc3b 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -113,6 +113,10 @@ msgstr "Password" msgid "auth.password-length-hint" msgstr "At least 8 characters" +#: src/app/main/ui/auth/register.cljs +msgid "auth.password-not-empty" +msgstr "Password must contain some character other than space." + msgid "auth.privacy-policy" msgstr "Privacy policy" @@ -371,6 +375,10 @@ msgstr "180 days" msgid "dashboard.access-tokens.errors-required-name" msgstr "The name is required" +#: src/app/main/ui/settings/team-form.cljs +msgid "dashboard.team-name.not-empty-name" +msgstr "The name must contain some character other than space." + #: src/app/main/ui/settings/access-tokens.cljs msgid "dashboard.access-tokens.token-will-expire" msgstr "The token will expire on %s" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 42f40e5fc..9cadae14d 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -118,6 +118,10 @@ msgstr "Contraseña" msgid "auth.password-length-hint" msgstr "8 caracteres como mínimo" +#: src/app/main/ui/auth/register.cljs +msgid "auth.password-not-empty" +msgstr "La contraseña debe contener algún caracter diferente de espacio" + msgid "auth.privacy-policy" msgstr "Política de privacidad" @@ -378,6 +382,10 @@ msgstr "180 días" msgid "dashboard.access-tokens.errors-required-name" msgstr "El nombre es obligatorio" +#: src/app/main/ui/settings/team-form.cljs +msgid "dashboard.team-name.not-empty-name" +msgstr "El nombre debe contener algún carácter diferente de espacio" + #: src/app/main/ui/settings/access-tokens.cljs msgid "dashboard.access-tokens.token-will-expire" msgstr "El token expirará el %s" From 9a880f007c96b59553adfe31e91d694c37c77669 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:52:08 +0200 Subject: [PATCH 4/9] :bug: Fix focus title on layers sidebar --- .../styles/main/partials/sidebar-layers.scss | 67 ++++++++++++++++++- .../styles/main/partials/sidebar.scss | 47 +------------ 2 files changed, 66 insertions(+), 48 deletions(-) diff --git a/frontend/resources/styles/main/partials/sidebar-layers.scss b/frontend/resources/styles/main/partials/sidebar-layers.scss index 79ad3b4af..e9d3256b5 100644 --- a/frontend/resources/styles/main/partials/sidebar-layers.scss +++ b/frontend/resources/styles/main/partials/sidebar-layers.scss @@ -355,10 +355,12 @@ span.element-name { .pages-tool-bar { display: flex; justify-content: space-between; - height: 32px; - margin-top: 8px; + height: 40px; + padding: 0; &.search { + margin-top: 8px; + padding: 8px; .search-box { border: 1px solid $color-gray-20; border-radius: $br4; @@ -403,6 +405,67 @@ span.element-name { margin: 0 2px 0 5px; cursor: pointer; } + .page-name { + padding: 8px; + margin-top: 8px; + } + .icon-search { + margin-top: 8px; + } + .focus-title { + width: 100%; + height: 100%; + display: grid; + align-items: center; + grid-template-columns: 16px 1fr auto; + grid-column-gap: 8px; + cursor: pointer; + + .back-button { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + background: none; + border: none; + padding: 0; + margin: 0; + + svg { + width: 12px; + height: 12px; + fill: $color-gray-20; + transform: rotate(180deg); + } + + &:hover { + svg { + fill: $color-primary; + } + } + } + + .focus-name { + height: 100%; + display: flex; + justify-content: flex-start; + align-items: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .focus-mode { + color: $color-primary; + border: 1px solid $color-primary; + border-radius: $br3; + font-size: $fs10; + text-transform: uppercase; + padding: 0px 4px; + display: flex; + align-items: center; + } + } } } .active-filters { diff --git a/frontend/resources/styles/main/partials/sidebar.scss b/frontend/resources/styles/main/partials/sidebar.scss index 09ac24e24..d8498fa7b 100644 --- a/frontend/resources/styles/main/partials/sidebar.scss +++ b/frontend/resources/styles/main/partials/sidebar.scss @@ -40,6 +40,7 @@ flex-shrink: 0; padding: $size-2; overflow: hidden; + margin: 0; svg { fill: $color-gray-20; @@ -136,52 +137,6 @@ padding: 0.25rem; } } - - & .focus-title { - width: 100%; - height: 100%; - display: grid; - align-items: center; - grid-template-columns: auto 1fr auto; - grid-column-gap: 8px; - cursor: pointer; - - & .back-button { - background: none; - border: none; - padding: 0; - margin: 0; - - & svg { - fill: $color-white; - transform: rotate(180deg); - margin-top: 3px; - } - - &:hover { - svg { - fill: $color-primary; - } - } - } - - & .focus-name { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - & .focus-mode { - color: $color-primary; - border: 1px solid $color-primary; - border-radius: $br3; - font-size: $fs10; - text-transform: uppercase; - padding: 0px 4px; - display: flex; - align-items: center; - } - } } .assets-bar .tool-window { From e75b53ff8d0fc7fd10d068e54b906dc30ca9de52 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:53:14 +0200 Subject: [PATCH 5/9] :bug: Fix search font visualitation --- CHANGES.md | 2 ++ frontend/resources/styles/main/partials/dashboard-fonts.scss | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c2c4f1f4d..a584c9000 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,8 @@ - Fix unpublish more than one library at the same time [Taiga #5532](https://tree.taiga.io/project/penpot/issue/5532) - Fix drag projects on dahsboard [Taiga #5531](https://tree.taiga.io/project/penpot/issue/5531) - Fix allow team name to be all blank [Taiga #5527](https://tree.taiga.io/project/penpot/issue/5527) +- Fix search font visualitation [Taiga #5523](https://tree.taiga.io/project/penpot/issue/5523) + ### :arrow_up: Deps updates diff --git a/frontend/resources/styles/main/partials/dashboard-fonts.scss b/frontend/resources/styles/main/partials/dashboard-fonts.scss index bd93dca5f..544e50341 100644 --- a/frontend/resources/styles/main/partials/dashboard-fonts.scss +++ b/frontend/resources/styles/main/partials/dashboard-fonts.scss @@ -60,7 +60,7 @@ font-size: $fs14; background-color: $color-white; display: flex; - min-width: 1000px; + max-width: 1000px; width: 100%; min-height: 97px; align-items: center; From 82183ec71a4298688344253c11e18297ff7e3c28 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:54:40 +0200 Subject: [PATCH 6/9] :bug: Fix create and account only with spaces --- CHANGES.md | 2 +- frontend/src/app/main/ui/auth/register.cljs | 10 +++++++++- .../src/app/main/ui/settings/password.cljs | 20 +++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a584c9000..d3eefa8cb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,7 +28,7 @@ - Fix drag projects on dahsboard [Taiga #5531](https://tree.taiga.io/project/penpot/issue/5531) - Fix allow team name to be all blank [Taiga #5527](https://tree.taiga.io/project/penpot/issue/5527) - Fix search font visualitation [Taiga #5523](https://tree.taiga.io/project/penpot/issue/5523) - +- Fix create and account only with spaces [Taiga #5518](https://tree.taiga.io/project/penpot/issue/5518) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/auth/register.cljs b/frontend/src/app/main/ui/auth/register.cljs index 76ce3a1ac..37314093b 100644 --- a/frontend/src/app/main/ui/auth/register.cljs +++ b/frontend/src/app/main/ui/auth/register.cljs @@ -22,6 +22,7 @@ [app.util.router :as rt] [beicon.core :as rx] [cljs.spec.alpha :as s] + [cuerdas.core :as str] [rumext.v2 :as mf])) (mf/defc demo-warning @@ -45,6 +46,13 @@ (= code ::us/email) (assoc :message (tr "errors.email-invalid")))))))) +(defn- validate-password + [errors data] + (let [password (-> data :password str/trim)] + (cond-> errors + (str/empty? password) + (assoc :password {:message (tr "auth.password-not-empty")})))) + (s/def ::fullname ::us/not-empty-string) (s/def ::password ::us/not-empty-string) (s/def ::email ::us/email) @@ -87,7 +95,7 @@ [{:keys [params on-success-callback] :as props}] (let [initial (mf/use-memo (mf/deps params) (constantly params)) form (fm/use-form :spec ::register-form - :validators [validate] + :validators [validate validate-password] :initial initial) submitted? (mf/use-state false) diff --git a/frontend/src/app/main/ui/settings/password.cljs b/frontend/src/app/main/ui/settings/password.cljs index 9e792d545..f9ab2a915 100644 --- a/frontend/src/app/main/ui/settings/password.cljs +++ b/frontend/src/app/main/ui/settings/password.cljs @@ -14,6 +14,7 @@ [app.util.dom :as dom] [app.util.i18n :as i18n :refer [t tr]] [cljs.spec.alpha :as s] + [cuerdas.core :as str] [rumext.v2 :as mf])) (defn- on-error @@ -24,7 +25,7 @@ {:message (tr "errors.wrong-old-password")}) :email-as-password (swap! form assoc-in [:errors :password-1] - {:message (tr "errors.email-as-password")}) + {:message (tr "errors.email-as-password")}) (let [msg (tr "generic.error")] (st/emit! (dm/error msg))))) @@ -62,6 +63,17 @@ (and password-1 (> 8 (count password-1))) (assoc :password-1 {:message (tr "errors.password-too-short")})))) +(defn- validate-password + [errors data] + (let [password-1 (-> data :password-1 str/trim) + password-2 (-> data :password-2 str/trim)] + (cond-> errors + (str/empty? password-1) + (assoc :password-1 {:message (tr "auth.password-not-empty")}) + + (str/empty? password-2) + (assoc :password-2 {:message (tr "auth.password-not-empty")})))) + (s/def ::password-form (s/keys :req-un [::password-1 ::password-2 @@ -71,8 +83,8 @@ [{:keys [locale] :as props}] (let [initial (mf/use-memo (constantly {:password-old nil})) form (fm/use-form :spec ::password-form - :validators [password-equality] - :initial initial)] + :validators [validate-password password-equality] + :initial initial)] [:& fm/form {:class "password-form" :on-submit on-submit :form form} @@ -105,7 +117,7 @@ (mf/defc password-page [{:keys [locale]}] (mf/use-effect - #(dom/set-html-title (tr "title.settings.password"))) + #(dom/set-html-title (tr "title.settings.password"))) [:section.dashboard-settings.form-container [:div.form-container From 94b5c980429e845c9bf1c4da1be3f8534b902bae Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:56:35 +0200 Subject: [PATCH 7/9] :bug: Fix context menu outside screen --- CHANGES.md | 1 + frontend/resources/styles/main/partials/dashboard-team.scss | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d3eefa8cb..c978bec22 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,7 @@ - Fix allow team name to be all blank [Taiga #5527](https://tree.taiga.io/project/penpot/issue/5527) - Fix search font visualitation [Taiga #5523](https://tree.taiga.io/project/penpot/issue/5523) - Fix create and account only with spaces [Taiga #5518](https://tree.taiga.io/project/penpot/issue/5518) +- Fix context menu outside screen [Taiga #5524](https://tree.taiga.io/project/penpot/issue/5524) ### :arrow_up: Deps updates diff --git a/frontend/resources/styles/main/partials/dashboard-team.scss b/frontend/resources/styles/main/partials/dashboard-team.scss index 384b748ed..45ee9d6ec 100644 --- a/frontend/resources/styles/main/partials/dashboard-team.scss +++ b/frontend/resources/styles/main/partials/dashboard-team.scss @@ -324,7 +324,7 @@ box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25); z-index: 12; top: 30px; - left: 6px; + left: -151px; width: 155px; hr { From 8955f87d5afb1c372cee8fc6fbbaebc3322bf403 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:57:45 +0200 Subject: [PATCH 8/9] :bug: Fix z-index nillable input when static position --- .../ui/workspace/sidebar/options/menus/layout_item.cljs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs index af92826ee..e4885697a 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs @@ -192,6 +192,8 @@ (if (= align-self value) (st/emit! (dwsl/update-layout-child ids {:layout-item-align-self nil})) (st/emit! (dwsl/update-layout-child ids {:layout-item-align-self value})))) + + is-absolute? (:layout-item-absolute values) is-col? (every? ctl/col? selection-parents) @@ -219,6 +221,8 @@ on-change-position (fn [value] + (when (= value :static) + (st/emit! (dwsl/update-layout-child ids {:layout-item-z-index nil}))) (st/emit! (dwsl/update-layout-child ids {:layout-item-absolute (= value :absolute)}))) on-change-z-index @@ -254,6 +258,8 @@ {:placeholder "--" :on-focus #(dom/select-target %) :on-change #(on-change-z-index %) + :nillable true + :disabled (not is-absolute?) :value (:layout-item-z-index values)}]]]]) (when (not (:layout-item-absolute values)) From ef3fedee59e71398214a8d52811c5ab615415954 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 3 Jul 2023 12:57:59 +0200 Subject: [PATCH 9/9] :bug: Fix some warnings and format some files --- .../app/main/ui/components/dropdown_menu.cljs | 2 +- .../src/app/main/ui/dashboard/sidebar.cljs | 35 ++++++++++--------- .../options/menus/layout_container.cljs | 32 ++++++++--------- 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/frontend/src/app/main/ui/components/dropdown_menu.cljs b/frontend/src/app/main/ui/components/dropdown_menu.cljs index c397b5c26..75e32b60b 100644 --- a/frontend/src/app/main/ui/components/dropdown_menu.cljs +++ b/frontend/src/app/main/ui/components/dropdown_menu.cljs @@ -25,7 +25,7 @@ on-key-down (gobj/get props "on-key-down") id (gobj/get props "id") klass (gobj/get props "klass") - key (gobj/get props "key") + key (gobj/get props "unique-key") data-test (gobj/get props "data-test")] [:li {:id id :class klass diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index a494b1b36..571b97fca 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -243,6 +243,7 @@ (when (kbd/enter? event) (team-selected (:default-team-id profile) event))) :id "teams-selector-default-team" + :unique-key "default-team" :klass "team-name"} [:span.team-icon i/logo-icon] [:span.team-text (tr "dashboard.your-penpot")] @@ -256,7 +257,7 @@ (team-selected (:id team-item) event))) :id (str "teams-selector-" (:id team-item)) :klass "team-name" - :key (dm/str (:id team-item))} + :unique-key (dm/str (:id team-item))} [:span.team-icon [:img {:src (cf/resolve-team-photo-url team-item) :alt (:name team-item)}]] @@ -270,7 +271,7 @@ (on-create-clicked event))) :id "teams-selector-create-team" :klass "team-name action" - :key "teams-selector-create-team"} + :unique-key "teams-selector-create-team"} [:span.team-icon.new-team i/close] [:span.team-text (tr "dashboard.create-new-team")]]])) @@ -364,16 +365,16 @@ (when (kbd/enter? event) (go-members))) :id "teams-options-members" - :key "teams-options-members" - :data-test "team-members"} + :unique-key "teams-options-members" + :data-test "team-members"} (tr "labels.members")] [:& dropdown-menu-item {:on-click go-invitations :on-key-down (fn [event] (when (kbd/enter? event) (go-invitations))) :id "teams-options-invitations" - :key "teams-options-invitations" - :data-test "team-invitations"} + :unique-key "teams-options-invitations" + :data-test "team-invitations"} (tr "labels.invitations")] (when (contains? cf/flags :webhooks) @@ -382,7 +383,7 @@ (when (kbd/enter? event) (go-webhooks))) :id "teams-options-webhooks" - :key "teams-options-webhooks"} + :unique-key "teams-options-webhooks"} (tr "labels.webhooks")]) [:& dropdown-menu-item {:on-click go-settings @@ -390,8 +391,8 @@ (when (kbd/enter? event) (go-settings))) :id "teams-options-settings" - :key "teams-options-settings" - :data-test "team-settings"} + :unique-key "teams-options-settings" + :data-test "team-settings"} (tr "labels.settings")] [:hr] @@ -401,8 +402,8 @@ (when (kbd/enter? event) (on-rename-clicked))) :id "teams-options-rename" - :key "teams-options-rename" - :data-test "rename-team"} + :unique-key "teams-options-rename" + :data-test "rename-team"} (tr "labels.rename")]) (cond @@ -412,7 +413,7 @@ (when (kbd/enter? event) (leave-and-close))) :id "teams-options-leave-team" - :key "teams-options-leave-team"} + :unique-key "teams-options-leave-team"} (tr "dashboard.leave-team")] @@ -422,8 +423,8 @@ (when (kbd/enter? event) (on-leave-as-owner-clicked))) :id "teams-options-leave-team" - :key "teams-options-leave-team" - :data-test "leave-team"} + :unique-key "teams-options-leave-team" + :data-test "leave-team"} (tr "dashboard.leave-team")] (> (count members) 1) @@ -432,7 +433,7 @@ (when (kbd/enter? event) (on-leave-clicked))) :id "teams-options-leave-team" - :key "teams-options-leave-team"} + :unique-key "teams-options-leave-team"} (tr "dashboard.leave-team")]) @@ -442,9 +443,9 @@ (when (kbd/enter? event) (on-delete-clicked))) :id "teams-options-delete-team" - :key "teams-options-delete-team" + :unique-key "teams-options-delete-team" :klass "warning" - :data-test "delete-team"} + :data-test "delete-team"} (tr "dashboard.delete-team")])])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs index a3a388393..1e987b488 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs @@ -93,13 +93,13 @@ :space-between i/align-content-row-between :stretch nil)) - (case val - :start i/align-content-row-start - :end i/align-content-row-end - :center i/align-content-row-center - :space-around i/align-content-row-around - :space-between i/align-content-row-between - :stretch nil) + (case val + :start i/align-content-row-start + :end i/align-content-row-end + :center i/align-content-row-center + :space-around i/align-content-row-around + :space-between i/align-content-row-between + :stretch nil) :align-self (if is-col? @@ -275,8 +275,8 @@ {:placeholder "--" :on-change (partial on-change :simple :p1) :on-focus #(do - (dom/select-target %) - (select-paddings true false true false)) + (dom/select-target %) + (select-paddings true false true false)) :value p1}]] [:div.padding-item.tooltip.tooltip-bottom-left @@ -354,7 +354,7 @@ i/auto-gap] [:> numeric-input {:no-validate true :placeholder "--" - :on-focus (fn [event] + :on-focus (fn [event] (select-gap :row-gap) (reset! gap-selected? :row-gap) (dom/select-target event)) @@ -638,12 +638,12 @@ (if (and (not multiple) (:layout values)) [:div.title-actions #_[:div.layout-btns - [:button {:on-click set-flex - :class (dom/classnames - :active (= :flex layout-type))} "Flex"] - [:button {:on-click set-grid - :class (dom/classnames - :active (= :grid layout-type))} "Grid"]] + [:button {:on-click set-flex + :class (dom/classnames + :active (= :flex layout-type))} "Flex"] + [:button {:on-click set-grid + :class (dom/classnames + :active (= :grid layout-type))} "Grid"]] [:button.remove-layout {:on-click on-remove-layout} i/minus]] [:button.add-page {:on-click #(on-add-layout :flex)} i/close])]]