From 448353174c731a35301c72a60b3d6f121b76f364 Mon Sep 17 00:00:00 2001
From: andrewwallacespeckle
<139135120+andrewwallacespeckle@users.noreply.github.com>
Date: Mon, 13 Jan 2025 17:00:45 +0000
Subject: [PATCH] refactor(fe2): Gendo pre-launch tidyup (#3794)
* Styling updates
* Gendo Icon update
* Testing updates
* updates from testing
* Small design changes
* Fix build
* Fix dialog buttons
* Testing updates
* Lightbox effect
* Fix tippy
* Lightbox changes
* Updates
* Updates from testing
* Fix import
* Updates from testing
* Add mixpanel
* Reuse prompt
* Move reuse button
* Add v-tippy to truncated text
* Container Query
* Reorder buttons
* Copy prompt. Image loading
* Changes from testing
* Alert consolodation
* Final updates
* Feedback
* Typo
* Updates form call with Benjamin
* Controls to top
* Changes from testing
* Generic Feedback
* Small changes from testing
* Changes from Fabs
* Small change
* No max width on prompt
* Add Dialog Transparent story
* Open feedback dialog on click of button
---
.../frontend-2/assets/images/gendo/logo.svg | 4 -
.../frontend-2/components/feedback/Dialog.vue | 31 ++-
.../components/global/icon/Gendo.vue | 16 ++
.../frontend-2/components/viewer/Controls.vue | 10 +-
.../components/viewer/gendo/Dialog.vue | 45 +++++
.../components/viewer/gendo/Item.vue | 148 +++++++++++---
.../components/viewer/gendo/List.vue | 10 +-
.../components/viewer/gendo/Panel.vue | 187 +++++++++++-------
.../src/components/layout/Dialog.stories.ts | 25 +++
.../src/components/layout/Dialog.vue | 7 +-
10 files changed, 375 insertions(+), 108 deletions(-)
delete mode 100644 packages/frontend-2/assets/images/gendo/logo.svg
create mode 100644 packages/frontend-2/components/global/icon/Gendo.vue
create mode 100644 packages/frontend-2/components/viewer/gendo/Dialog.vue
diff --git a/packages/frontend-2/assets/images/gendo/logo.svg b/packages/frontend-2/assets/images/gendo/logo.svg
deleted file mode 100644
index e0a6fe01cd..0000000000
--- a/packages/frontend-2/assets/images/gendo/logo.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
diff --git a/packages/frontend-2/components/feedback/Dialog.vue b/packages/frontend-2/components/feedback/Dialog.vue
index ae7dcfe814..e64a202196 100644
--- a/packages/frontend-2/components/feedback/Dialog.vue
+++ b/packages/frontend-2/components/feedback/Dialog.vue
@@ -1,15 +1,14 @@
- How can we improve Speckle? If you have a feature request, please also share how
- you would use it and why it's important to you
+ {{ dialogIntro }}
-
+
Need help? For support, head over to our
community forum
@@ -39,8 +38,21 @@ import { isRequired } from '~/lib/common/helpers/validation'
import { useActiveUser } from '~~/lib/auth/composables/activeUser'
import { defaultZapierWebhookUrl } from '~/lib/common/helpers/route'
+type FeedbackType = 'general' | 'gendo'
type FormValues = { feedback: string }
+const props = withDefaults(
+ defineProps<{
+ type?: FeedbackType
+ title?: string
+ intro?: string
+ hideSuppport?: boolean
+ }>(),
+ {
+ type: 'general'
+ }
+)
+
const isOpen = defineModel('open', { required: true })
const { activeUser: user } = useActiveUser()
@@ -60,6 +72,14 @@ const dialogButtons = computed((): LayoutDialogButton[] => [
}
])
+const dialogTitle = computed(() => props.title || 'Give us feedback')
+
+const dialogIntro = computed(
+ () =>
+ props.intro ||
+ 'How can we improve Speckle? If you have a feature request, please also share how you would use it and why its important to you'
+)
+
const onSubmit = handleSubmit(async () => {
if (!feedback.value) return
@@ -71,7 +91,8 @@ const onSubmit = handleSubmit(async () => {
})
mixpanel.track('Feedback Sent', {
- message: feedback.value
+ message: feedback.value,
+ feedbackType: props.type
})
await sendWebhook(defaultZapierWebhookUrl, {
diff --git a/packages/frontend-2/components/global/icon/Gendo.vue b/packages/frontend-2/components/global/icon/Gendo.vue
new file mode 100644
index 0000000000..d9ce43b206
--- /dev/null
+++ b/packages/frontend-2/components/global/icon/Gendo.vue
@@ -0,0 +1,16 @@
+
+
+
diff --git a/packages/frontend-2/components/viewer/Controls.vue b/packages/frontend-2/components/viewer/Controls.vue
index 46992ab65e..7ce2b32c0b 100644
--- a/packages/frontend-2/components/viewer/Controls.vue
+++ b/packages/frontend-2/components/viewer/Controls.vue
@@ -148,15 +148,13 @@
-