From 7869e40c9443583849a808f79d125e6423ee919f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Wed, 20 Mar 2024 16:54:35 -0700 Subject: [PATCH 1/8] Add feedback button --- src/components/app.vue | 4 +- src/components/feedback-button.vue | 70 ++++++++++++++++++++++++++++++ transifex/strings_en.json | 6 +++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 src/components/feedback-button.vue diff --git a/src/components/app.vue b/src/components/app.vue index 47224287b..e9ff0be1a 100644 --- a/src/components/app.vue +++ b/src/components/app.vue @@ -15,6 +15,7 @@ except according to the terms contained in the LICENSE file. will affect how the navbar is rendered. --> + @@ -30,6 +31,7 @@ import { START_LOCATION } from 'vue-router'; import Alert from './alert.vue'; import Navbar from './navbar.vue'; +import FeedbackButton from './feedback-button.vue'; import useCallWait from '../composables/call-wait'; import useDisabled from '../composables/disabled'; @@ -38,7 +40,7 @@ import { useSessions } from '../util/session'; export default { name: 'App', - components: { Alert, Navbar }, + components: { Alert, Navbar, FeedbackButton }, inject: ['alert'], setup() { useSessions(); diff --git a/src/components/feedback-button.vue b/src/components/feedback-button.vue new file mode 100644 index 000000000..700223e2a --- /dev/null +++ b/src/components/feedback-button.vue @@ -0,0 +1,70 @@ + + + + + + + + + { + "en": { + // Text for a hovering feedback button shown anchored to right of screen. If your language doesn't have a single word or short + // phrase for "feedback", consider something like "comments" or "reactions". + "feedback": "Feedback" + } + } + diff --git a/transifex/strings_en.json b/transifex/strings_en.json index aa178ea15..5c5308c7b 100644 --- a/transifex/strings_en.json +++ b/transifex/strings_en.json @@ -2011,6 +2011,12 @@ "developer_comment": "This refers to creation of an Entity. {filename} is the name of an uploaded file containing the Entity. {name} is the name of a Web User." } }, + "FeedbackButton": { + "feedback": { + "string": "Feedback", + "developer_comment": "Text for a hovering feedback button shown anchored to right of screen. If your language doesn't have a single word or short phrase for \"feedback\", consider something like \"comments\" or \"reactions\"." + } + }, "FieldKeyList": { "action": { "create": { From f229b261b7ad83bc7060354625bef043e9d57a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Wed, 20 Mar 2024 17:12:44 -0700 Subject: [PATCH 2/8] Don't show feedback button on login screen --- src/components/app.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/app.vue b/src/components/app.vue index e9ff0be1a..1a614acd2 100644 --- a/src/components/app.vue +++ b/src/components/app.vue @@ -15,7 +15,7 @@ except according to the terms contained in the LICENSE file. will affect how the navbar is rendered. --> - + @@ -53,6 +53,10 @@ export default { computed: { routerReady() { return this.$route !== START_LOCATION; + }, + + loggedIn() { + return useRequestData().currentUser.dataExists && this.$route.path !== '/login'; } }, created() { From 5dc81c590c879212dd49efcb3ac967f754091a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Wed, 17 Apr 2024 16:24:38 -0700 Subject: [PATCH 3/8] Respond to review feedback --- src/components/app.vue | 19 ++++++++++-------- src/components/feedback-button.vue | 17 +++++++++++++--- src/config.js | 3 ++- src/util/load-async.js | 4 ++++ test/components/app.spec.js | 32 ++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 12 deletions(-) diff --git a/src/components/app.vue b/src/components/app.vue index 1a614acd2..7e4b5dbcb 100644 --- a/src/components/app.vue +++ b/src/components/app.vue @@ -15,7 +15,7 @@ except according to the terms contained in the LICENSE file. will affect how the navbar is rendered. --> - + @@ -27,6 +27,8 @@ except according to the terms contained in the LICENSE file.