opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 896 forks source link

Fix query editor cursor alignment by removing monaco css overrides #8912

Closed d-rowe closed 9 hours ago

d-rowe commented 22 hours ago

Description

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.

Changelog

Before

before

After

after

Check List

codecov[bot] commented 22 hours ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.87%. Comparing base (c928aec) to head (82123d7). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8912 +/- ## ========================================== + Coverage 60.86% 60.87% +0.01% ========================================== Files 3802 3802 Lines 91059 91060 +1 Branches 14370 14370 ========================================== + Hits 55425 55437 +12 + Misses 32095 32084 -11 Partials 3539 3539 ``` | [Flag](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [Linux_1](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `29.01% <ø> (+<0.01%)` | :arrow_up: | | [Linux_2](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `56.39% <ø> (ø)` | | | [Linux_3](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `37.90% <ø> (+0.02%)` | :arrow_up: | | [Linux_4](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `29.00% <ø> (+<0.01%)` | :arrow_up: | | [Windows_1](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `29.03% <ø> (+<0.01%)` | :arrow_up: | | [Windows_2](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `56.34% <ø> (ø)` | | | [Windows_3](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `37.90% <ø> (+0.02%)` | :arrow_up: | | [Windows_4](https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards/pull/8912/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `29.00% <ø> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

Hailong-am commented 22 hours ago

Can you fix the lint?

d-rowe commented 22 hours ago

Can you fix the lint?

Sure thing, I've fixed the linting issue.

d-rowe commented 21 hours ago

can you post a screenshot of the before/after of padding

Yup, I've added before and after screenshots in the PR description