From fb469faa1de7103414eccbe5e9c045888ebb2bbf Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Tue, 1 Aug 2023 06:59:08 -0700 Subject: [PATCH] Details styling Summary: STDOUT and STDERR can overflow the panel. This change creates a container for these two panels which should keep content within their boundaries. Reviewed By: antonk52 Differential Revision: D47952711 fbshipit-source-id: 394390ae6b6a12329fe0eea1fc9948a7261b11bf --- .../src/chrome/ConnectivityLogs.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx b/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx index fc93f82e0..64ef30716 100644 --- a/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx +++ b/desktop/flipper-ui-core/src/chrome/ConnectivityLogs.tsx @@ -26,6 +26,8 @@ import { } from 'flipper-common'; import {Button} from 'antd'; +const SIDEBAR_WIDTH = 400; + const rows = createDataSource([], { limit: 200000, persist: 'connectivity-logs', @@ -135,6 +137,12 @@ const Placeholder = styled(Layout.Container)({ fontSize: 18, }); +const PanelContainer = styled.div({ + width: SIDEBAR_WIDTH - 2 * 32, + whiteSpace: 'pre-wrap', + overflow: 'scroll', +}); + function isShellCommand( entry: ConnectionRecordEntry, ): entry is CommandRecordEntry { @@ -154,10 +162,10 @@ function Sidebar({selection}: {selection: undefined | ConnectionRecordEntry}) { {selection.description} , - {selection.stdout} + {selection.stdout} , - {selection.stderr} + {selection.stderr} , {selection.troubleshoot} @@ -212,7 +220,7 @@ export const ConnectivityLogs = () => { ); return ( - + dataSource={rows} columns={columns}