Procházet zdrojové kódy

Render log entry annotations in the CodeMirror 6 gutter (#5654)

GitOrigin-RevId: e68c913a572a24c037167fe8b3418ec9ac4ce6ab
Alf Eaton před 4 roky
rodič
revize
f351a7af0a

+ 6 - 1
services/web/frontend/js/shared/context/compile-context.js

@@ -40,6 +40,7 @@ CompileContext.Provider.propTypes = {
     hasChanges: PropTypes.bool.isRequired,
     hasChanges: PropTypes.bool.isRequired,
     highlights: PropTypes.arrayOf(PropTypes.object),
     highlights: PropTypes.arrayOf(PropTypes.object),
     logEntries: PropTypes.object,
     logEntries: PropTypes.object,
+    logEntryAnnotations: PropTypes.object,
     pdfDownloadUrl: PropTypes.string,
     pdfDownloadUrl: PropTypes.string,
     pdfUrl: PropTypes.string,
     pdfUrl: PropTypes.string,
     pdfViewer: PropTypes.string,
     pdfViewer: PropTypes.string,
@@ -77,7 +78,9 @@ export function CompileProvider({ children }) {
   const [logEntries, setLogEntries] = useScopeValueSetterOnly('pdf.logEntries')
   const [logEntries, setLogEntries] = useScopeValueSetterOnly('pdf.logEntries')
 
 
   // annotations for display in the editor, built from the log entries
   // annotations for display in the editor, built from the log entries
-  const [, setLogEntryAnnotations] = useScopeValue('pdf.logEntryAnnotations')
+  const [logEntryAnnotations, setLogEntryAnnotations] = useScopeValue(
+    'pdf.logEntryAnnotations'
+  )
 
 
   // the PDF viewer
   // the PDF viewer
   const [pdfViewer] = useScopeValue('settings.pdfViewer')
   const [pdfViewer] = useScopeValue('settings.pdfViewer')
@@ -426,6 +429,7 @@ export function CompileProvider({ children }) {
       fileList,
       fileList,
       hasChanges,
       hasChanges,
       highlights,
       highlights,
+      logEntryAnnotations,
       logEntries,
       logEntries,
       pdfDownloadUrl,
       pdfDownloadUrl,
       pdfUrl,
       pdfUrl,
@@ -463,6 +467,7 @@ export function CompileProvider({ children }) {
       hasChanges,
       hasChanges,
       highlights,
       highlights,
       logEntries,
       logEntries,
+      logEntryAnnotations,
       position,
       position,
       pdfDownloadUrl,
       pdfDownloadUrl,
       pdfUrl,
       pdfUrl,