Skip to content

Commit

Permalink
[BUG][Console] Fix updating of play and wrench button
Browse files Browse the repository at this point in the history
Fix UI bug that did not update the console with the correct
values.

offsetTop was always 0 and the value needed the pixel.

Issue:
#3916

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
  • Loading branch information
kavilla committed Apr 21, 2023
1 parent 86d42bc commit 8dfd67e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Console] Fix dev tool console autocomplete not loading issue ([#3775](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3775))
- [Console] Fix dev tool console run command with query parameter error ([#3813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3813))
- Add clarifying tooltips to header navigation ([#3573](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3573))
- [Console] Fix dev tool console not updating action bar ([#3920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3920))

### 🚞 Infrastructure

Expand Down
1 change: 1 addition & 0 deletions release-notes/opensearch-dashboards.release-notes-2.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- [Console] Fix/update documentation links in Dev Tools console ([#3724](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3724))
- [Console] Fix dev tool console autocomplete not loading issue ([#3775](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3775))
- [Console] Fix dev tool console run command with query parameter error ([#3813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3813))
- [Console] Fix dev tool console not updating action bar ([#3920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3920))
- [Table Visualization] Fix table rendering empty unused space ([#3797](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3797))
- [Table Visualization] Fix data table not adjusting height on the initial load ([#3816](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3816))
- [Timeline] Fix y-axis label color in dark mode ([#3698](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3698))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ export class LegacyCoreEditor implements CoreEditor {
} else {
if (topOrBottom === 'top') {
this.actions.style.bottom = 'auto';
this.actions.style.top = value;
this.actions.style.top = `${value}px`;
this.actions.style.visibility = 'visible';
} else {
this.actions.style.top = 'auto';
this.actions.style.bottom = value;
this.actions.style.bottom = `${value}px`;
this.actions.style.visibility = 'visible';
}
}
Expand Down Expand Up @@ -320,7 +320,7 @@ export class LegacyCoreEditor implements CoreEditor {
// elements are positioned relative to the editor's container
// pageY is relative to page, so subtract the offset
// from pageY to get the new top value
const offsetFromPage = this.editor.container.offsetTop;
const { top: offsetFromPage } = this.editor.container.getBoundingClientRect();
const startLine = range.start.lineNumber;
const startColumn = range.start.column;
const firstLine = this.getLineValue(startLine);
Expand Down

0 comments on commit 8dfd67e

Please sign in to comment.