Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: clickhouse editor cursor sync issue (#5435)

Vikrant Gupta79eef5bb9192
diff --git a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
index 849305c7c2..5b95eb4a9a 100644
--- a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
+++ b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
@@ -141,11 +141,6 @@ function ImportJSON({
colors: {
'editor.background': Color.BG_INK_300,
},
- fontFamily: 'Space Mono',
- fontSize: 20,
- fontWeight: 'normal',
- lineHeight: 18,
- letterSpacing: -0.06,
});
}
@@ -233,6 +228,11 @@ function ImportJSON({
fontFamily: 'Space Mono',
}}
theme={isDarkMode ? 'my-theme' : 'light'}
+ onMount={(_, monaco): void => {
+ document.fonts.ready.then(() => {
+ monaco.editor.remeasureFonts();
+ });
+ }}
// eslint-disable-next-line react/jsx-no-bind
beforeMount={setEditorTheme}
/>
diff --git a/frontend/src/container/LogDetailedView/Overview.tsx b/frontend/src/container/LogDetailedView/Overview.tsx
index 957aac5bf7..bd54524931 100644
--- a/frontend/src/container/LogDetailedView/Overview.tsx
+++ b/frontend/src/container/LogDetailedView/Overview.tsx
@@ -53,7 +53,6 @@ function Overview({
enabled: false,
},
fontWeight: 400,
- // fontFamily: 'SF Mono',
fontFamily: 'Space Mono',
fontSize: 13,
lineHeight: '18px',
@@ -80,12 +79,6 @@ function Overview({
colors: {
'editor.background': Color.BG_INK_400,
},
- // fontFamily: 'SF Mono',
- fontFamily: 'Space Mono',
- fontSize: 12,
- fontWeight: 'normal',
- lineHeight: 18,
- letterSpacing: -0.06,
});
}
@@ -124,6 +117,11 @@ function Overview({
onChange={(): void => {}}
height="20vh"
theme={isDarkMode ? 'my-theme' : 'light'}
+ onMount={(_, monaco): void => {
+ document.fonts.ready.then(() => {
+ monaco.editor.remeasureFonts();
+ });
+ }}
// eslint-disable-next-line react/jsx-no-bind
beforeMount={setEditorTheme}
/>
diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/query.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/query.tsx
index 7dd61595d6..bf6925fea5 100644
--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/query.tsx
+++ b/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/query.tsx
@@ -87,9 +87,6 @@ function ClickHouseQueryBuilder({
'editor.background': Color.BG_INK_300,
},
});
- document.fonts.ready.then(() => {
- monaco.editor.remeasureFonts();
- });
}
return (
@@ -105,6 +102,11 @@ function ClickHouseQueryBuilder({
height="200px"
onChange={handleUpdateEditor}
value={queryData.query}
+ onMount={(_, monaco): void => {
+ document.fonts.ready.then(() => {
+ monaco.editor.remeasureFonts();
+ });
+ }}
options={{
scrollbar: {
alwaysConsumeMouseWheel: false,