Skip to content

Commit

Permalink
Fix (styles): Make ace code editor themes consistent (opensearch-proj…
Browse files Browse the repository at this point in the history
…ect#4609)

* Fix (styles): Make ace code editor themes consistent

Use "textmate" theme everywhere
Update override selector to apply to root, to style portaled components, too (such as filter editor)

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr authored Jul 24, 2023
1 parent c06b298 commit f8ad83f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Update main menu to display 'Dashboards' for consistency ([#4453](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4453))
- [Multiple DataSource] Retain the original sample data API ([#4526](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4526))
- Fix Node.js download link ([#4556](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4556))
- [TSVB, Dashboards] Fix inconsistent dark mode code editor themes ([#4609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4609))

### 🚞 Infrastructure

Expand Down
2 changes: 1 addition & 1 deletion src/core/public/styles/_ace_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// In order to override the TM (Textmate) theme of Ace/Brace, everywhere,
// it is being scoped by a known outer selector
.application {
.coreSystemRootDomElement {
.ace-tm {
$aceBackground: tintOrShade($euiColorLightShade, 50%, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function RawJsonParamEditor({
<>
<EuiCodeEditor
mode="json"
theme="github"
theme="textmate"
width="100%"
height="250px"
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class MarkdownEditor extends Component {
<EuiCodeEditor
onLoad={this.handleOnLoad}
mode="markdown"
theme="github"
theme="textmate"
width="100%"
height="100%"
name={`ace-${model.id}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class MarkdownPanelConfigUi extends Component {
<EuiSpacer size="s" />
<EuiCodeEditor
mode="less"
theme="github"
theme="textmate"
width="100%"
name={`ace-css-${model.id}`}
setOptions={{ fontSize: '14px' }}
Expand Down

0 comments on commit f8ad83f

Please sign in to comment.