fix: Wrap text in CodeMirror expression editor (#8665)

Fixes https://github.com/prometheus/prometheus/issues/8663

Signed-off-by: Julius Volz <julius.volz@gmail.com>
pull/8676/head
Julius Volz 4 years ago committed by GitHub
parent 49559380eb
commit 2043c60f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,8 +32,11 @@ input[type='checkbox']:checked + label {
text-transform: capitalize;
}
.expression-input {
/* Using a more specific selector here to be able to override Bootstrap's default input group styles. */
.input-group.expression-input {
margin-bottom: 10px;
/* Prevent the input group from wrapping around when the editor content is too long for a line. */
flex-wrap: nowrap;
}
.expression-input .cm-expression-input {

@ -128,6 +128,7 @@ const CMExpressionInput: FC<CMExpressionInputProps> = ({
closeBrackets(),
autocompletion(),
highlightSelectionMatches(),
EditorView.lineWrapping,
keymap.of([
...closeBracketsKeymap,
...defaultKeymap,

Loading…
Cancel
Save