mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Logstash Pipeline Management] Fix bottom border of Pipeline Editor (#18834)
* Change pipeline editor markup so bottom border doesn't hide text on last line. * Add constants for scroll margin size. * Add comments to editor constants. * Add PX units to constant names.
This commit is contained in:
parent
73f144f095
commit
733f625dea
8 changed files with 54 additions and 18 deletions
|
@ -9,6 +9,6 @@ export const EDITOR = {
|
|||
PATTERN_MAX_LINES: 10,
|
||||
SAMPLE_DATA_MIN_LINES: 3,
|
||||
SAMPLE_DATA_MAX_LINES: 50,
|
||||
SCROLL_MARGIN_TOP: 4,
|
||||
SCROLL_MARGIN_BOTTOM: 4,
|
||||
SCROLL_MARGIN_TOP_PX: 4,
|
||||
SCROLL_MARGIN_BOTTOM_PX: 4,
|
||||
};
|
||||
|
|
|
@ -15,8 +15,8 @@ export function applyEditorOptions(editor, minLines, maxLines) {
|
|||
* typing experience.
|
||||
*/
|
||||
editor.renderer.setScrollMargin(
|
||||
EDITOR.SCROLL_MARGIN_TOP,
|
||||
EDITOR.SCROLL_MARGIN_BOTTOM,
|
||||
EDITOR.SCROLL_MARGIN_TOP_PX,
|
||||
EDITOR.SCROLL_MARGIN_BOTTOM_PX,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
|
|
@ -39,8 +39,8 @@ describe('applyEditorOptions', () => {
|
|||
expect(setUseWrapMode.mock.calls[0][0]).toBe(true);
|
||||
|
||||
expect(setScrollMargin.mock.calls).toHaveLength(1);
|
||||
expect(setScrollMargin.mock.calls[0][0]).toEqual(EDITOR.SCROLL_MARGIN_TOP);
|
||||
expect(setScrollMargin.mock.calls[0][1]).toEqual(EDITOR.SCROLL_MARGIN_BOTTOM);
|
||||
expect(setScrollMargin.mock.calls[0][0]).toEqual(EDITOR.SCROLL_MARGIN_TOP_PX);
|
||||
expect(setScrollMargin.mock.calls[0][1]).toEqual(EDITOR.SCROLL_MARGIN_BOTTOM_PX);
|
||||
expect(setScrollMargin.mock.calls[0][2]).toEqual(0);
|
||||
expect(setScrollMargin.mock.calls[0][3]).toEqual(0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue