From 7b88d7a9329f8f69d24f70d147dff09596b0320d Mon Sep 17 00:00:00 2001 From: Angela Chuang Date: Tue, 4 Aug 2020 17:34:01 +0100 Subject: [PATCH 1/4] styling for notes' pannel --- .../public/timelines/components/notes/index.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx index 957b37a0bd1c27..127b613678e552 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx @@ -35,6 +35,7 @@ interface Props { const NotesPanel = styled(EuiPanel)` height: ${NOTES_PANEL_HEIGHT}px; width: ${NOTES_PANEL_WIDTH}px; + overflow-y: auto; & thead { display: none; @@ -43,16 +44,6 @@ const NotesPanel = styled(EuiPanel)` NotesPanel.displayName = 'NotesPanel'; -const InMemoryTable: typeof EuiInMemoryTable & { displayName: string } = styled( - EuiInMemoryTable as React.ComponentType> -)` - overflow-x: hidden; - overflow-y: auto; - height: 220px; -` as any; // eslint-disable-line @typescript-eslint/no-explicit-any - -InMemoryTable.displayName = 'InMemoryTable'; - /** A view for entering and reviewing notes */ export const Notes = React.memo( ({ associateNote, getNotesByIds, getNewNoteId, noteIds, status, updateNote }) => { @@ -76,7 +67,7 @@ export const Notes = React.memo( /> )} - Date: Tue, 4 Aug 2020 18:43:41 +0100 Subject: [PATCH 2/4] styling --- .../public/timelines/components/notes/index.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx index 127b613678e552..0abf13589d973e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx @@ -4,14 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { - EuiInMemoryTable, - EuiInMemoryTableProps, - EuiModalBody, - EuiModalHeader, - EuiPanel, - EuiSpacer, -} from '@elastic/eui'; +import { EuiInMemoryTable, EuiModalBody, EuiModalHeader, EuiSpacer } from '@elastic/eui'; import React, { useState } from 'react'; import styled from 'styled-components'; @@ -20,7 +13,6 @@ import { Note } from '../../../common/lib/note'; import { AddNote } from './add_note'; import { columns } from './columns'; import { AssociateNote, GetNewNoteId, NotesCount, search, UpdateNote } from './helpers'; -import { NOTES_PANEL_WIDTH, NOTES_PANEL_HEIGHT } from '../timeline/properties/notes_size'; import { TimelineStatusLiteral, TimelineStatus } from '../../../../common/types/timeline'; interface Props { @@ -32,11 +24,7 @@ interface Props { updateNote: UpdateNote; } -const NotesPanel = styled(EuiPanel)` - height: ${NOTES_PANEL_HEIGHT}px; - width: ${NOTES_PANEL_WIDTH}px; - overflow-y: auto; - +const NotesPanel = styled.div` & thead { display: none; } From cd05b5ed3524d8d3d946edd210349cbf6af8095a Mon Sep 17 00:00:00 2001 From: Angela Chuang Date: Tue, 4 Aug 2020 18:46:16 +0100 Subject: [PATCH 3/4] remove additional const --- .../timelines/components/timeline/properties/notes_size.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts index 3a01df8f48a3f8..cc979816f01414 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts @@ -5,4 +5,3 @@ */ export const NOTES_PANEL_WIDTH = 1024; -export const NOTES_PANEL_HEIGHT = 750; From f4831e2b1707ce6fe49844240be6f73cbae28884 Mon Sep 17 00:00:00 2001 From: Angela Chuang Date: Tue, 4 Aug 2020 19:05:15 +0100 Subject: [PATCH 4/4] styling --- .../timelines/components/notes/index.tsx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx index 0abf13589d973e..7d083735e6c718 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx @@ -4,7 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { EuiInMemoryTable, EuiModalBody, EuiModalHeader, EuiSpacer } from '@elastic/eui'; +import { + EuiInMemoryTable, + EuiInMemoryTableProps, + EuiModalBody, + EuiModalHeader, + EuiSpacer, +} from '@elastic/eui'; import React, { useState } from 'react'; import styled from 'styled-components'; @@ -24,13 +30,15 @@ interface Props { updateNote: UpdateNote; } -const NotesPanel = styled.div` +const InMemoryTable: typeof EuiInMemoryTable & { displayName: string } = styled( + EuiInMemoryTable as React.ComponentType> +)` & thead { display: none; } -`; +` as any; // eslint-disable-line @typescript-eslint/no-explicit-any -NotesPanel.displayName = 'NotesPanel'; +InMemoryTable.displayName = 'InMemoryTable'; /** A view for entering and reviewing notes */ export const Notes = React.memo( @@ -39,7 +47,7 @@ export const Notes = React.memo( const isImmutable = status === TimelineStatus.immutable; return ( - + <> @@ -55,7 +63,7 @@ export const Notes = React.memo( /> )} - ( sorting={true} /> - + ); } );