Просмотр исходного кода

Merge pull request #19504 from overleaf/jdt-ai-error-feedback-notif

AI Error Assistant Feedback Notification

GitOrigin-RevId: 340427cdca2db75b80f36a0b281af5403faa6f20
Jimmy Domagala-Tang 2 лет назад
Родитель
Сommit
a4992f6970

+ 2 - 0
services/web/frontend/extracted-translations.json

@@ -434,6 +434,7 @@
   "file_size": "",
   "files_cannot_include_invalid_characters": "",
   "files_selected": "",
+  "fill_in_our_quick_survey": "",
   "find_out_more": "",
   "find_out_more_about_institution_login": "",
   "find_out_more_about_the_file_outline": "",
@@ -1621,6 +1622,7 @@
   "weve_recently_reduced_the_compile_timeout_limit_which_may_have_affected_this_project": "",
   "weve_recently_reduced_the_compile_timeout_limit_which_may_have_affected_your_project": "",
   "what_do_you_need_help_with": "",
+  "what_do_you_think_of_the_ai_error_assistant": "",
   "what_does_this_mean": "",
   "what_does_this_mean_for_you": "",
   "what_happens_when_sso_is_enabled": "",

+ 8 - 0
services/web/frontend/js/features/pdf-preview/components/pdf-preview-pane.jsx

@@ -8,6 +8,9 @@ import { useDetachCompileContext as useCompileContext } from '../../../shared/co
 import { PdfPreviewMessages } from './pdf-preview-messages'
 import CompileTimeWarningUpgradePrompt from './compile-time-warning-upgrade-prompt'
 import { PdfPreviewProvider } from './pdf-preview-provider'
+import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
+
+const pdfPreviewPromotions = importOverleafModules('pdfPreviewPromotions')
 
 function PdfPreviewPane() {
   const { pdfUrl, hasShortCompileTimeout } = useCompileContext()
@@ -19,6 +22,11 @@ function PdfPreviewPane() {
       <PdfPreviewProvider>
         <PdfHybridPreviewToolbar />
         <PdfPreviewMessages>
+          {pdfPreviewPromotions.map(
+            ({ import: { default: Component }, path }) => (
+              <Component key={path} />
+            )
+          )}
           {hasShortCompileTimeout && <CompileTimeWarningUpgradePrompt />}
         </PdfPreviewMessages>
         <Suspense fallback={<FullSizeLoadingSpinner delay={500} />}>

+ 2 - 0
services/web/locales/en.json

@@ -642,6 +642,7 @@
   "file_too_large": "File too large",
   "files_cannot_include_invalid_characters": "File name is empty or contains invalid characters",
   "files_selected": "files selected.",
+  "fill_in_our_quick_survey": "Fill in our quick survey.",
   "filters": "Filters",
   "find_out_more": "Find out More",
   "find_out_more_about_institution_login": "Find out more about institutional login",
@@ -2279,6 +2280,7 @@
   "weve_recently_reduced_the_compile_timeout_limit_which_may_have_affected_your_project": "We’ve recently <0>reduced the compile timeout limit</0> on our free plan, which may have affected your project.",
   "what_do_you_need": "What do you need?",
   "what_do_you_need_help_with": "What do you need help with?",
+  "what_do_you_think_of_the_ai_error_assistant": "What do you think of the AI error assistant?",
   "what_does_this_mean": "What does this mean?",
   "what_does_this_mean_for_you": "This means:",
   "what_happens_when_sso_is_enabled": "What happens when SSO is enabled?",