mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #26470 from overleaf/dp-labs-survey
Launch new editor redesign labs survey GitOrigin-RevId: a39b319aecde7fa9a00fb0f7f77814f6a277ab6c
This commit is contained in:
@@ -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 (
|
||||
<DropdownMenu>
|
||||
<DropdownItem onClick={openKeyboardShortcutsModal}>
|
||||
@@ -430,7 +433,7 @@ const RailHelpDropdown = () => {
|
||||
</DropdownItem>
|
||||
)}
|
||||
<DropdownItem
|
||||
href="https://forms.gle/soyVStc5qDx9na1Z6"
|
||||
href={surveyURL}
|
||||
role="menuitem"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -15,6 +15,7 @@ import Notification from '@/shared/components/notification'
|
||||
import { useSwitchEnableNewEditorState } from '../../hooks/use-switch-enable-new-editor-state'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
|
||||
import { useSurveyUrl } from '../../hooks/use-survey-url'
|
||||
|
||||
export const IdeRedesignSwitcherModal = () => {
|
||||
const { t } = useTranslation()
|
||||
@@ -79,6 +80,9 @@ const SwitcherModalContentEnabled: FC<ModalContentProps> = ({
|
||||
// do nothing, we're already showing the error
|
||||
})
|
||||
}, [setEditorRedesignStatus, hide, sendEvent])
|
||||
|
||||
const surveyURL = useSurveyUrl()
|
||||
|
||||
return (
|
||||
<>
|
||||
<OLModalBody>
|
||||
@@ -104,7 +108,7 @@ const SwitcherModalContentEnabled: FC<ModalContentProps> = ({
|
||||
{t('cancel')}
|
||||
</OLButton>
|
||||
<OLButton
|
||||
href="https://forms.gle/soyVStc5qDx9na1Z6"
|
||||
href={surveyURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
variant="primary"
|
||||
|
||||
@@ -4,6 +4,7 @@ import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSurveyUrl } from '../../hooks/use-survey-url'
|
||||
|
||||
export const LabsActions = () => {
|
||||
const { t } = useTranslation()
|
||||
@@ -11,6 +12,7 @@ export const LabsActions = () => {
|
||||
const openEditorRedesignSwitcherModal = useCallback(() => {
|
||||
setShowSwitcherModal(true)
|
||||
}, [setShowSwitcherModal])
|
||||
const surveyURL = useSurveyUrl()
|
||||
return (
|
||||
<>
|
||||
<div className="ide-redesign-toolbar-button-container">
|
||||
@@ -34,7 +36,7 @@ export const LabsActions = () => {
|
||||
</div>
|
||||
<div className="ide-redesign-toolbar-button-container">
|
||||
<a
|
||||
href="https://forms.gle/soyVStc5qDx9na1Z6"
|
||||
href={surveyURL}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
className="ide-redesign-toolbar-labs-feedback-link"
|
||||
|
||||
@@ -26,6 +26,7 @@ import { isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||
import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
|
||||
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
|
||||
import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
|
||||
import { useSurveyUrl } from '../../hooks/use-survey-url'
|
||||
|
||||
export const ToolbarMenuBar = () => {
|
||||
const { t } = useTranslation()
|
||||
@@ -188,6 +189,9 @@ export const ToolbarMenuBar = () => {
|
||||
const openContactUsModal = useCallback(() => {
|
||||
setActiveModal('contact-us')
|
||||
}, [setActiveModal])
|
||||
|
||||
const surveyURL = useSurveyUrl()
|
||||
|
||||
return (
|
||||
<>
|
||||
<MenuBar
|
||||
@@ -259,7 +263,7 @@ export const ToolbarMenuBar = () => {
|
||||
<MenuBarOption
|
||||
eventKey="give_feedback"
|
||||
title={t('give_feedback')}
|
||||
href="https://forms.gle/soyVStc5qDx9na1Z6"
|
||||
href={surveyURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
/>
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
Reference in New Issue
Block a user