From 1ada4b6b87a668161873e44d31456a7e6ea0d0e4 Mon Sep 17 00:00:00 2001 From: Andrew Goldstein Date: Tue, 28 May 2019 09:55:52 -0600 Subject: [PATCH] [SIEM] Fixes timeline notes overflowing the modal (#37134) ## [SIEM] Fixes timeline notes overflowing the modal (#37134) Beginning in Chrome 74 (see elastic/eui#1902), the timeline notes modal can overflow in some browsers, per the _Before_ gif below. This fix uses `EuiModal` and other `EUI` components to address the overflow issue across all the browsers tested in the gifs below: ### Before (Chrome `74.0`) ![01-before-chrome](https://user-images.githubusercontent.com/4459398/58355997-4d7d4d00-7e33-11e9-864b-7e77d0635116.gif) ### After (Chrome `74.0`) ![02-after-chrome-74 0](https://user-images.githubusercontent.com/4459398/58356028-6128b380-7e33-11e9-8c7d-3022e45b1f41.gif) ### After (Firefox `67.0`) ![03-after-firefox-67 0](https://user-images.githubusercontent.com/4459398/58356056-6ede3900-7e33-11e9-92ca-a6dd8e0b804b.gif) ### After (Safari `12.1.1`) ![04-after-safari-12 1 1](https://user-images.githubusercontent.com/4459398/58356123-a947d600-7e33-11e9-80ab-d6b3d3c601c0.gif) ### After (IE`11.0.9600`) ![05-after-ie-11](https://user-images.githubusercontent.com/4459398/58356131-aea52080-7e33-11e9-989e-51aab7c4e9da.gif) https://github.com/elastic/ingest-dev/issues/442 --- .../notes/add_note/new_note.test.tsx | 2 +- .../components/notes/add_note/new_note.tsx | 4 +- .../siem/public/components/notes/columns.tsx | 2 +- .../siem/public/components/notes/helpers.tsx | 23 +++++++++-- .../siem/public/components/notes/index.tsx | 38 ++++++++----------- .../notes/note_card/note_card_body.tsx | 2 +- .../public/components/notes/translations.ts | 12 +++--- .../timeline/properties/notes_size.ts | 2 +- .../translations/translations/ja-JP.json | 1 - 9 files changed, 48 insertions(+), 38 deletions(-) diff --git a/x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx b/x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx index 3047a5e8a8a1bc..3ab556a4e5dc4c 100644 --- a/x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx +++ b/x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx @@ -30,7 +30,7 @@ describe('NewNote', () => { .find('button[role="tab"]') .first() .text() - ).toEqual(i18n.NOTE(1)); + ).toEqual(i18n.NOTE); }); test('it renders a tab labeled "Preview (Markdown)"', () => { diff --git a/x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx b/x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx index ad0945d5ac176c..ae71601f05c314 100644 --- a/x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx +++ b/x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx @@ -36,11 +36,11 @@ export const NewNote = pure<{ const tabs = [ { id: 'note', - name: i18n.NOTE(1), + name: i18n.NOTE, content: (