From 4a2db204f1e2460ce693b1453f8d199f0edb7620 Mon Sep 17 00:00:00 2001 From: elhombretecla Date: Thu, 10 Dec 2020 09:50:56 +0100 Subject: [PATCH] :tada: Add feedback link to workspace --- frontend/resources/locales.json | 13 +++++++++++-- .../styles/main/partials/dashboard-sidebar.scss | 7 +++---- .../styles/main/partials/workspace-header.scss | 4 ++++ frontend/src/app/main/ui/dashboard/sidebar.cljs | 4 ++-- frontend/src/app/main/ui/workspace/header.cljs | 4 ++++ 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/frontend/resources/locales.json b/frontend/resources/locales.json index 7bc30a867..2e7670c5a 100644 --- a/frontend/resources/locales.json +++ b/frontend/resources/locales.json @@ -2377,13 +2377,22 @@ "es" : "Desactivar alineamiento dinámico" } }, + "workspace.header.menu.feedback" : { + "used-in" : [ "src/app/main/ui/workspace/header.cljs:228" ], + "translations" : { + "en" : "Give feedback", + "fr" : "Donnez votre avis", + "ru" : "Дать обратную связь", + "es" : "Danos tu opinión" + } + }, "workspace.header.menu.disable-snap-grid" : { "used-in" : [ "src/app/main/ui/workspace/header.cljs:186" ], "translations" : { - "en" : "Disable snap to grid", + "en" : "Give feedback", "fr" : "Désactiver l'alignement sur la grille", "ru" : "Отключить привязку к сетке", - "es" : "Desactivar alinear a la rejilla" + "es" : "Danos tu opinion" } }, "workspace.header.menu.enable-dynamic-alignment" : { diff --git a/frontend/resources/styles/main/partials/dashboard-sidebar.scss b/frontend/resources/styles/main/partials/dashboard-sidebar.scss index 339b51ec0..3fdd61e57 100644 --- a/frontend/resources/styles/main/partials/dashboard-sidebar.scss +++ b/frontend/resources/styles/main/partials/dashboard-sidebar.scss @@ -370,8 +370,7 @@ display: flex; flex-grow: 1; - span, - a { + span { @include text-ellipsis; color: $color-black; margin: 10px 5px; @@ -420,11 +419,11 @@ } } -span.primary-badge { +.primary-badge { border: 1px solid $color-primary; border-radius: 2px; font-size: $fs9 !important; font-weight: bold; color: $color-primary !important; - padding: 2px 2px; + padding: 2px 4px; } diff --git a/frontend/resources/styles/main/partials/workspace-header.scss b/frontend/resources/styles/main/partials/workspace-header.scss index 5506421c5..b1def9cf0 100644 --- a/frontend/resources/styles/main/partials/workspace-header.scss +++ b/frontend/resources/styles/main/partials/workspace-header.scss @@ -171,6 +171,10 @@ &:hover { background-color: $color-primary-lighter; } + + &.feedback { + border-top: 1px solid $color-gray-10; + } } } diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index c4b12f096..343372b28 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -454,9 +454,9 @@ [:li {:on-click (partial on-click (da/logout))} [:span.icon i/exit] [:span.text (t locale "labels.logout")]] - [:li.feedback + [:li.feedback {:on-click #(.open js/window "https://github.com/penpot/penpot/discussions" "_blank")} [:span.icon i/msg-info] - [:a.text {:href "https://github.com/penpot/penpot/discussions" :target "_blank"} (t locale "labels.feedback")] + [:span.text (t locale "labels.feedback")] [:span.primary-badge "ALPHA"]]]]] (when (and team profile) diff --git a/frontend/src/app/main/ui/workspace/header.cljs b/frontend/src/app/main/ui/workspace/header.cljs index d79f42ce7..edcfd9cda 100644 --- a/frontend/src/app/main/ui/workspace/header.cljs +++ b/frontend/src/app/main/ui/workspace/header.cljs @@ -223,6 +223,10 @@ [:span (tr "dashboard.remove-shared")]] [:li {:on-click on-add-shared} [:span (tr "dashboard.add-shared")]]) + + [:li.feedback {:on-click #(.open js/window "https://github.com/penpot/penpot/discussions" "_blank")} + [:span (tr "workspace.header.menu.feedback")] + [:span.primary-badge "ALPHA"]] ]]])) ;; --- Header Component