-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES|QL] Theme updates for text based languages editor (#186345)
## Summary This is a design pass at the editor. Functionality and layout have not been changed. ### What has changed? - Color settings in the `esql_theme.ts` - Added additional rule groups for color treatment (e.g. more operators and values) - Replaced hardcoded style values with EUI variables - As a result, one set of theme colors now works across light and dark mode - Made a few small Monaco configuration (i.e. options) changes that affect the UI/visual output (e.g. active line styles, line height, font... the font size is the same, but I believe these other changes will make it feel larger/more readable) - Re-ordered the options set to more easily find what is/is not enabled - Shortened the height of the top bar; tightened up the padding; more closely matches the footer design ### How does it look? *Light mode* ![CleanShot 2024-06-17 at 16 13 46@2x](https://github.com/elastic/kibana/assets/446285/5e78c2ac-5be8-4138-b1bf-616373c98bf1) *Dark mode* ![CleanShot 2024-06-17 at 16 15 49@2x](https://github.com/elastic/kibana/assets/446285/f739742e-92d8-46d0-a4d2-26f8f2669044) *Compact* ![CleanShot 2024-06-17 at 16 15 26@2x](https://github.com/elastic/kibana/assets/446285/a0f2b129-5973-4742-b428-16ef4f8b1eca) ### What about the other things we saw in the Slack screenshots... I have some other ideas cookin', but I would like to iterate on those concepts in Figma and get additional feedback. These entail the edge-to-edge design, less borders, consolidated header and footer, smaller CTA buttons, full-height field list, etc. Something like this... <details> <summary>Additional design considerations not in this PR</summary> ![CleanShot 2024-06-14 at 22 38 34@2x](https://github.com/elastic/kibana/assets/446285/dd5e0f12-1c9a-4ade-ad80-22376f841a41) </details> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information
1 parent
2194f85
commit 1c7b595
Showing
7 changed files
with
130 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,63 @@ | ||
.TextBasedLangEditor .monaco-editor { | ||
border-top-left-radius: 6px; | ||
border-bottom-left-radius: 6px; | ||
/* Editor styles for any layout mode */ | ||
/* NOTE: Much of this is overriding Monaco styles so the specificity is intentional */ | ||
|
||
// Radius for both the main container and the margin (container for line numbers) | ||
.TextBasedLangEditor .monaco-editor, .TextBasedLangEditor .monaco-editor .margin, .TextBasedLangEditor .monaco-editor .overflow-guard { | ||
border-top-left-radius: $euiBorderRadius; | ||
border-bottom-left-radius: $euiBorderRadius; | ||
} | ||
|
||
.TextBasedLangEditor .monaco-editor .monaco-hover { | ||
display: none !important; | ||
} | ||
|
||
.TextBasedLangEditor--expanded .monaco-editor .monaco-hover { | ||
display: block !important; | ||
.TextBasedLangEditor .monaco-editor .margin-view-overlays .line-numbers { | ||
color: $euiColorDisabledText; | ||
} | ||
|
||
.TextBasedLangEditor .monaco-editor .margin { | ||
border-top-left-radius: 6px; | ||
border-bottom-left-radius: 6px; | ||
// Currently focused line(s) | ||
.TextBasedLangEditor .monaco-editor .current-line ~ .line-numbers { | ||
color: $euiTextSubduedColor; | ||
} | ||
|
||
.TextBasedLangEditor--compact .monaco-editor { | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
// Suggest (autocomplete) menu | ||
.TextBasedLangEditor .monaco-editor .suggest-widget, .TextBasedLangEditor .monaco-editor .suggest-details-container { | ||
@include euiBottomShadow; | ||
border-radius: $euiBorderRadius; | ||
} | ||
|
||
.TextBasedLangEditor--compact .monaco-editor .margin { | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
background-color: $euiColorLightestShade; | ||
color: $euiColorDisabledText; | ||
.TextBasedLangEditor .monaco-editor .suggest-details-container { | ||
background-color: $euiColorEmptyShade; | ||
line-height: 1.5rem; | ||
} | ||
|
||
.TextBasedLangEditor .monaco-editor .margin-view-overlays .line-numbers { | ||
color: $euiColorDisabledText; | ||
.TextBasedLangEditor_errorMessage { | ||
@include euiTextBreakWord; | ||
} | ||
|
||
.TextBasedLangEditor .monaco-editor .current-line ~ .line-numbers { | ||
color: $euiTextSubduedColor; | ||
} | ||
/* For compact mode */ | ||
|
||
// All scrollable containers (e.g. main container and suggest menu) | ||
.TextBasedLangEditor--compact .monaco-editor .monaco-scrollable-element { | ||
margin-left: 4px; | ||
margin-left: $euiSizeS; | ||
} | ||
|
||
.TextBasedLangEditor_errorMessage { | ||
@include euiTextBreakWord; | ||
// Suggest menu in compact mode | ||
.TextBasedLangEditor--compact .monaco-editor .monaco-list .monaco-scrollable-element { | ||
margin-left: 0; | ||
|
||
.monaco-list-row.focused { | ||
border-radius: $euiBorderRadius; | ||
} | ||
} | ||
|
||
/* For expanded mode */ | ||
|
||
.TextBasedLangEditor--expanded .monaco-editor .monaco-hover { | ||
display: block !important; | ||
} | ||
|
||
.TextBasedLangEditor--expanded .monaco-editor, .TextBasedLangEditor--expanded .monaco-editor .margin, .TextBasedLangEditor--expanded .monaco-editor .overflow-guard { | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters