From f351a7af0ab163a7fab2fb9616113ccac65b88b7 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Mon, 15 Nov 2021 12:50:42 +0000 Subject: [PATCH] Render log entry annotations in the CodeMirror 6 gutter (#5654) GitOrigin-RevId: e68c913a572a24c037167fe8b3418ec9ac4ce6ab --- services/web/frontend/js/shared/context/compile-context.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/shared/context/compile-context.js b/services/web/frontend/js/shared/context/compile-context.js index 4e68dab585..12631ab07a 100644 --- a/services/web/frontend/js/shared/context/compile-context.js +++ b/services/web/frontend/js/shared/context/compile-context.js @@ -40,6 +40,7 @@ CompileContext.Provider.propTypes = { hasChanges: PropTypes.bool.isRequired, highlights: PropTypes.arrayOf(PropTypes.object), logEntries: PropTypes.object, + logEntryAnnotations: PropTypes.object, pdfDownloadUrl: PropTypes.string, pdfUrl: PropTypes.string, pdfViewer: PropTypes.string, @@ -77,7 +78,9 @@ export function CompileProvider({ children }) { const [logEntries, setLogEntries] = useScopeValueSetterOnly('pdf.logEntries') // 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 const [pdfViewer] = useScopeValue('settings.pdfViewer') @@ -426,6 +429,7 @@ export function CompileProvider({ children }) { fileList, hasChanges, highlights, + logEntryAnnotations, logEntries, pdfDownloadUrl, pdfUrl, @@ -463,6 +467,7 @@ export function CompileProvider({ children }) { hasChanges, highlights, logEntries, + logEntryAnnotations, position, pdfDownloadUrl, pdfUrl,