From 6a48bf15ef33d92cd56a15e148bfbb19017a1885 Mon Sep 17 00:00:00 2001 From: Daniel Rowe Date: Thu, 21 Nov 2024 23:48:21 +0000 Subject: [PATCH 1/3] Fix query editor cursor alignment by removing monaco css overrides Monaco editor computes the cursor position internally and does not account for any css overrides that change the position of the line (padding, margin, etc). This change removes the css override while we implement these styles with the monaco api directly. Signed-off-by: Daniel Rowe --- .../editors/default_editor/_default_editor.scss | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss b/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss index 2516c32ec27c..99a616b5c7f3 100644 --- a/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss +++ b/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss @@ -16,10 +16,6 @@ padding: 0 $euiSizeXS; } - .view-lines { - padding: 0 $euiSizeXS; - } - .monaco-scrollable-element { border-radius: 0 $euiSizeXS 0 0; } @@ -35,4 +31,4 @@ .defaultEditor__footerRow { gap: $euiSizeM; -} +} \ No newline at end of file From 1b0a7cb2f15dda4ed83a5cdcefab9a8d1184926e Mon Sep 17 00:00:00 2001 From: "opensearch-changeset-bot[bot]" <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 23:54:54 +0000 Subject: [PATCH 2/3] Changeset file for PR #8912 created/updated --- changelogs/fragments/8912.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/8912.yml diff --git a/changelogs/fragments/8912.yml b/changelogs/fragments/8912.yml new file mode 100644 index 000000000000..4f465fe54aaa --- /dev/null +++ b/changelogs/fragments/8912.yml @@ -0,0 +1,2 @@ +fix: +- Ensure query editor cursor is aligned with text ([#8912](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8912)) \ No newline at end of file From 82123d7d8e08be9bb990a43ca6f5d3c034208aa1 Mon Sep 17 00:00:00 2001 From: Daniel Rowe <51932404+d-rowe@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:22:37 -0800 Subject: [PATCH 3/3] fix linting Signed-off-by: Daniel Rowe <51932404+d-rowe@users.noreply.github.com> --- .../ui/query_editor/editors/default_editor/_default_editor.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss b/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss index 99a616b5c7f3..8a626dbe36e3 100644 --- a/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss +++ b/src/plugins/data/public/ui/query_editor/editors/default_editor/_default_editor.scss @@ -31,4 +31,4 @@ .defaultEditor__footerRow { gap: $euiSizeM; -} \ No newline at end of file +}