From 3eeee3b98396e8e2042e1ff6cfae4cde182e97f6 Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Tue, 17 Jun 2025 12:48:24 +0100 Subject: [PATCH] Merge pull request #26470 from overleaf/dp-labs-survey Launch new editor redesign labs survey GitOrigin-RevId: a39b319aecde7fa9a00fb0f7f77814f6a277ab6c --- .../js/features/ide-redesign/components/rail.tsx | 5 ++++- .../ide-redesign/components/switcher-modal/modal.tsx | 6 +++++- .../ide-redesign/components/toolbar/labs-actions.tsx | 4 +++- .../ide-redesign/components/toolbar/menu-bar.tsx | 6 +++++- .../js/features/ide-redesign/hooks/use-survey-url.tsx | 9 +++++++++ 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 services/web/frontend/js/features/ide-redesign/hooks/use-survey-url.tsx diff --git a/services/web/frontend/js/features/ide-redesign/components/rail.tsx b/services/web/frontend/js/features/ide-redesign/components/rail.tsx index 795c9adc38..bda56a5f59 100644 --- a/services/web/frontend/js/features/ide-redesign/components/rail.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/rail.tsx @@ -43,6 +43,7 @@ import ErrorLogsPanel from './error-logs/error-logs-panel' import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context' import OldErrorPane from './error-logs/old-error-pane' import { useFeatureFlag } from '@/shared/context/split-test-context' +import { useSurveyUrl } from '../hooks/use-survey-url' type RailElement = { icon: AvailableUnfilledIcon @@ -410,6 +411,8 @@ const RailHelpDropdown = () => { const openContactUsModal = useCallback(() => { setActiveModal('contact-us') }, [setActiveModal]) + const surveyURL = useSurveyUrl() + return ( @@ -430,7 +433,7 @@ const RailHelpDropdown = () => { )} { const { t } = useTranslation() @@ -79,6 +80,9 @@ const SwitcherModalContentEnabled: FC = ({ // do nothing, we're already showing the error }) }, [setEditorRedesignStatus, hide, sendEvent]) + + const surveyURL = useSurveyUrl() + return ( <> @@ -104,7 +108,7 @@ const SwitcherModalContentEnabled: FC = ({ {t('cancel')} { const { t } = useTranslation() @@ -11,6 +12,7 @@ export const LabsActions = () => { const openEditorRedesignSwitcherModal = useCallback(() => { setShowSwitcherModal(true) }, [setShowSwitcherModal]) + const surveyURL = useSurveyUrl() return ( <>
@@ -34,7 +36,7 @@ export const LabsActions = () => {
{ const { t } = useTranslation() @@ -188,6 +189,9 @@ export const ToolbarMenuBar = () => { const openContactUsModal = useCallback(() => { setActiveModal('contact-us') }, [setActiveModal]) + + const surveyURL = useSurveyUrl() + return ( <> { diff --git a/services/web/frontend/js/features/ide-redesign/hooks/use-survey-url.tsx b/services/web/frontend/js/features/ide-redesign/hooks/use-survey-url.tsx new file mode 100644 index 0000000000..fadc077b70 --- /dev/null +++ b/services/web/frontend/js/features/ide-redesign/hooks/use-survey-url.tsx @@ -0,0 +1,9 @@ +import { useFeatureFlag } from '@/shared/context/split-test-context' + +export const useSurveyUrl = () => { + const newErrorlogs = useFeatureFlag('new-editor-error-logs-redesign') + if (newErrorlogs) { + return 'https://forms.gle/83QJ9ALJkiugxTZf8' + } + return 'https://forms.gle/soyVStc5qDx9na1Z6' +}