Procházet zdrojové kódy

Merge pull request #26162 from overleaf/dp-error-logs-ai-2

Update error logs AI UI

GitOrigin-RevId: 6f9783090797e6d7d2fe01178f6945aa364ff4ac
David před 1 rokem
rodič
revize
e1a3037ffa

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

@@ -1693,6 +1693,7 @@
   "suggest_a_different_fix": "",
   "suggest_a_different_fix": "",
   "suggest_fix": "",
   "suggest_fix": "",
   "suggested": "",
   "suggested": "",
+  "suggested_code": "",
   "suggested_fix_for_error_in_path": "",
   "suggested_fix_for_error_in_path": "",
   "suggestion_applied": "",
   "suggestion_applied": "",
   "suggests_code_completions_while_typing": "",
   "suggests_code_completions_while_typing": "",
@@ -2075,6 +2076,7 @@
   "were_performing_maintenance": "",
   "were_performing_maintenance": "",
   "were_redesigning_our_editor_to_make_it_easier_to_use": "",
   "were_redesigning_our_editor_to_make_it_easier_to_use": "",
   "were_reducing_compile_timeout": "",
   "were_reducing_compile_timeout": "",
+  "what_did_you_find_most_helpful": "",
   "what_do_you_need_help_with": "",
   "what_do_you_need_help_with": "",
   "what_does_this_mean": "",
   "what_does_this_mean": "",
   "what_does_this_mean_for_you": "",
   "what_does_this_mean_for_you": "",

binární
services/web/frontend/fonts/material-symbols/MaterialSymbolsRoundedUnfilledPartialSlice.woff2


+ 3 - 0
services/web/frontend/fonts/material-symbols/unfilled-symbols.mjs

@@ -8,6 +8,7 @@ export default /** @type {const} */ ([
   'book_5',
   'book_5',
   'brush',
   'brush',
   'code',
   'code',
+  'content_copy',
   'create_new_folder',
   'create_new_folder',
   'delete',
   'delete',
   'description',
   'description',
@@ -26,6 +27,8 @@ export default /** @type {const} */ ([
   'settings',
   'settings',
   'space_dashboard',
   'space_dashboard',
   'table_chart',
   'table_chart',
+  'thumb_down',
+  'thumb_up',
   'upload_file',
   'upload_file',
   'web_asset',
   'web_asset',
 ])
 ])

+ 13 - 14
services/web/frontend/js/features/ide-redesign/components/error-logs/log-entry.tsx

@@ -8,6 +8,7 @@ import {
 } from '@/features/pdf-preview/util/types'
 } from '@/features/pdf-preview/util/types'
 import LogEntryHeader from './log-entry-header'
 import LogEntryHeader from './log-entry-header'
 import PdfLogEntryContent from '@/features/pdf-preview/components/pdf-log-entry-content'
 import PdfLogEntryContent from '@/features/pdf-preview/components/pdf-log-entry-content'
+import classNames from 'classnames'
 
 
 function LogEntry({
 function LogEntry({
   ruleId,
   ruleId,
@@ -88,20 +89,18 @@ function LogEntry({
         id={id}
         id={id}
         logEntry={logEntry}
         logEntry={logEntry}
       />
       />
-
-      {!collapsed && (
-        <>
-          <div className="horizontal-divider" />
-          <PdfLogEntryContent
-            alwaysExpandRawContent={alwaysExpandRawContent}
-            rawContent={rawContent}
-            formattedContent={formattedContent}
-            extraInfoURL={extraInfoURL}
-            index={index}
-            logEntry={logEntry}
-          />
-        </>
-      )}
+      <div
+        className={classNames('horizontal-divider', { hidden: collapsed })}
+      />
+      <PdfLogEntryContent
+        className={classNames({ hidden: collapsed })}
+        alwaysExpandRawContent={alwaysExpandRawContent}
+        rawContent={rawContent}
+        formattedContent={formattedContent}
+        extraInfoURL={extraInfoURL}
+        index={index}
+        logEntry={logEntry}
+      />
     </div>
     </div>
   )
   )
 }
 }

+ 4 - 1
services/web/frontend/js/features/pdf-preview/components/pdf-log-entry-content.tsx

@@ -3,6 +3,7 @@ import PdfLogEntryRawContent from './pdf-log-entry-raw-content'
 import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
 import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
 import { LogEntry } from '../util/types'
 import { LogEntry } from '../util/types'
 import { ElementType } from 'react'
 import { ElementType } from 'react'
+import classNames from 'classnames'
 
 
 const pdfLogEntryComponents = importOverleafModules(
 const pdfLogEntryComponents = importOverleafModules(
   'pdfLogEntryComponents'
   'pdfLogEntryComponents'
@@ -18,6 +19,7 @@ export default function PdfLogEntryContent({
   index,
   index,
   logEntry,
   logEntry,
   alwaysExpandRawContent = false,
   alwaysExpandRawContent = false,
+  className,
 }: {
 }: {
   rawContent?: string
   rawContent?: string
   formattedContent?: React.ReactNode
   formattedContent?: React.ReactNode
@@ -25,11 +27,12 @@ export default function PdfLogEntryContent({
   index?: number
   index?: number
   logEntry?: LogEntry
   logEntry?: LogEntry
   alwaysExpandRawContent?: boolean
   alwaysExpandRawContent?: boolean
+  className?: string
 }) {
 }) {
   const { t } = useTranslation()
   const { t } = useTranslation()
 
 
   return (
   return (
-    <div className="log-entry-content">
+    <div className={classNames('log-entry-content', className)}>
       {formattedContent && (
       {formattedContent && (
         <div className="log-entry-formatted-content">{formattedContent}</div>
         <div className="log-entry-formatted-content">{formattedContent}</div>
       )}
       )}

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

@@ -2193,6 +2193,7 @@
   "suggest_a_different_fix": "Suggest a different fix",
   "suggest_a_different_fix": "Suggest a different fix",
   "suggest_fix": "Suggest fix",
   "suggest_fix": "Suggest fix",
   "suggested": "Suggested",
   "suggested": "Suggested",
+  "suggested_code": "Suggested code",
   "suggested_fix_for_error_in_path": "Suggested fix for error in __path__",
   "suggested_fix_for_error_in_path": "Suggested fix for error in __path__",
   "suggestion": "Suggestion",
   "suggestion": "Suggestion",
   "suggestion_applied": "Suggestion applied",
   "suggestion_applied": "Suggestion applied",
@@ -2628,6 +2629,7 @@
   "were_performing_maintenance": "We’re performing maintenance on Overleaf and you need to wait a moment. Sorry for any inconvenience. The editor will refresh automatically in __seconds__ seconds.",
   "were_performing_maintenance": "We’re performing maintenance on Overleaf and you need to wait a moment. Sorry for any inconvenience. The editor will refresh automatically in __seconds__ seconds.",
   "were_redesigning_our_editor_to_make_it_easier_to_use": "We’re redesigning our editor to make it easier to use and ensure it’s future ready. Try it out and give us your feedback to help us get this right. (Some features are still in the works, so you can switch back at any time.)",
   "were_redesigning_our_editor_to_make_it_easier_to_use": "We’re redesigning our editor to make it easier to use and ensure it’s future ready. Try it out and give us your feedback to help us get this right. (Some features are still in the works, so you can switch back at any time.)",
   "were_reducing_compile_timeout": "We’re in the process of <0>reducing the compile timeout limit</0> on our free plan, which may affect your project in future.",
   "were_reducing_compile_timeout": "We’re in the process of <0>reducing the compile timeout limit</0> on our free plan, which may affect your project in future.",
+  "what_did_you_find_most_helpful": "What did you find most helpful?",
   "what_do_you_need": "What do you need?",
   "what_do_you_need": "What do you need?",
   "what_do_you_need_help_with": "What do you need help with?",
   "what_do_you_need_help_with": "What do you need help with?",
   "what_does_this_mean": "What does this mean?",
   "what_does_this_mean": "What does this mean?",