From 96ed6ce3206b610a2f773f70f91139c47bcd4f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Werner?= <4639399+jowerner@users.noreply.github.com> Date: Mon, 12 Sep 2022 15:05:25 +0200 Subject: [PATCH] #260: Action/request menu in result browser shows no scrollbar, but overflows (#261) * #260: Action/request menu in result browser shows no scrollbar, but overflows - ensure content does not overflow (both in the left-side menu, but also in the content area) - ensure the whole load error box is hidden, not just its content, if there was no load error - ensure the splitter bar does not shrink when resizing the window - make the splitter bar wider by 1 px so it is easier to grab - ensure the View as HAR link is hidden also on network error/if not found on local disk * applied workaround to get the behavior of 'flex: 1 1 0px' despite of browser/css minifier discrepancies --- resultbrowser/src/css/default.css | 7 +++++++ resultbrowser/src/index.html | 8 ++++---- resultbrowser/src/js/resultbrowser.js | 8 +++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/resultbrowser/src/css/default.css b/resultbrowser/src/css/default.css index ccdfbcf03..1084fe7e1 100644 --- a/resultbrowser/src/css/default.css +++ b/resultbrowser/src/css/default.css @@ -298,6 +298,7 @@ body { #content { background-color: white; height: 100%; + overflow: auto; } #actioncontent { @@ -534,8 +535,14 @@ table.key-value-table td.value .csep { flex-flow: column; } +.flexItem-fill { + flex: 1 1; /* grow/shrink as needed */ + flex-basis: 0px !important; /* HACK: Parcel's CSS optimizer replaces 'flex: 1 1 0px' with 'flex: 1' and browsers interpret 'flex: 1' as 'flex: 1 1 0%' which is not what we want. */ +} + .gutter { background-color: rgb(169, 169, 169); + flex: 0 0 auto; /* don't grow/shrink the splitter */ } .gutter.gutter-horizontal { diff --git a/resultbrowser/src/index.html b/resultbrowser/src/index.html index 0a1400f1a..c4df9099d 100644 --- a/resultbrowser/src/index.html +++ b/resultbrowser/src/index.html @@ -27,7 +27,7 @@
-
+
-
-
+

Failed to load ''.

You see this message for one of the following reasons:

diff --git a/resultbrowser/src/js/resultbrowser.js b/resultbrowser/src/js/resultbrowser.js index 556b31822..65195f61b 100644 --- a/resultbrowser/src/js/resultbrowser.js +++ b/resultbrowser/src/js/resultbrowser.js @@ -160,6 +160,8 @@ if (!response.ok) { forEachElement(transaction.querySelectorAll(".har"), hide); } + }).catch((error) => { + forEachElement(transaction.querySelectorAll(".har"), hide); }); initEvents(); @@ -514,7 +516,7 @@ forEachElement(actionlist.querySelectorAll(".active"), (el) => el.classList.remove("active")); element.classList.add("active"); - hide(getElementById("errorMessage")); + hide(getElementById("loadErrorContent")); queryFirst("#jsonViewerActions .search").value = ""; @@ -579,7 +581,7 @@ errorMessageFileName.setAttribute('disabled', ''); setText(errorMessageFileName, requestData.fileName); - show(getElementById("errorMessage")); + show(getElementById("loadErrorContent")); }); } } @@ -1005,7 +1007,7 @@ Split(['#leftSideMenu', '#content'], { sizes: [15, 85], minSize: [300, 600], - gutterSize: 2 + gutterSize: 3 }) // activate first request-tab