From 1a93eabf0163b6b276bad827f8c022d0d572e705 Mon Sep 17 00:00:00 2001 From: lohit Date: Thu, 3 Jul 2025 13:35:05 +0530 Subject: [PATCH] request/response pane styling fixes (#5025) --- .../bruno-app/src/components/RequestTabPanel/index.js | 2 +- .../Timeline/TimelineItem/Common/Body/index.js | 3 +-- .../ResponsePane/Timeline/TimelineItem/Request/index.js | 4 ++-- .../ResponsePane/Timeline/TimelineItem/Response/index.js | 4 ++-- .../ResponsePane/Timeline/TimelineItem/index.js | 8 ++++---- .../src/components/ResponsePane/Timeline/index.js | 5 +---- packages/bruno-app/src/components/ResponsePane/index.js | 2 +- .../src/ui/HeightBoundContainer/StyledWrapper.js | 6 +++--- packages/bruno-app/src/ui/HeightBoundContainer/index.js | 2 +- 9 files changed, 16 insertions(+), 20 deletions(-) diff --git a/packages/bruno-app/src/components/RequestTabPanel/index.js b/packages/bruno-app/src/components/RequestTabPanel/index.js index 19e52ae0f..6863b30b2 100644 --- a/packages/bruno-app/src/components/RequestTabPanel/index.js +++ b/packages/bruno-app/src/components/RequestTabPanel/index.js @@ -267,7 +267,7 @@ const RequestTabPanel = () => {
-
+
diff --git a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Body/index.js b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Body/index.js index 6f9d2f832..683c82bba 100644 --- a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Body/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Body/index.js @@ -1,7 +1,7 @@ import QueryResult from "components/ResponsePane/QueryResult/index"; import { useState } from "react"; -const BodyBlock = ({ collection, data, dataBuffer, headers, error, item, width }) => { +const BodyBlock = ({ collection, data, dataBuffer, headers, error, item }) => { const [isBodyCollapsed, toggleBody] = useState(true); return (
@@ -17,7 +17,6 @@ const BodyBlock = ({ collection, data, dataBuffer, headers, error, item, width } { }; -const Request = ({ collection, request, item, width }) => { +const Request = ({ collection, request, item }) => { let { url, headers, data, dataBuffer, error } = request || {}; if (!dataBuffer) { dataBuffer = Buffer.from(safeStringifyJSONIfNotString(data))?.toString('base64'); @@ -33,7 +33,7 @@ const Request = ({ collection, request, item, width }) => { {/* Body */} - +
) } diff --git a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Response/index.js b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Response/index.js index c70825eb9..9a72c8856 100644 --- a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Response/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Response/index.js @@ -16,7 +16,7 @@ const safeStringifyJSONIfNotString = (obj) => { } }; -const Response = ({ collection, response, item, width }) => { +const Response = ({ collection, response, item }) => { let { status, statusCode, statusText, dataBuffer, headers, data, error } = response || {}; if (!dataBuffer) { dataBuffer = Buffer.from(safeStringifyJSONIfNotString(data))?.toString('base64'); @@ -35,7 +35,7 @@ const Response = ({ collection, response, item, width }) => { {/* Body */} - + ) } diff --git a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js index 92e5db8ec..46a5efad5 100644 --- a/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js @@ -6,7 +6,7 @@ import Method from "./Common/Method/index"; import Status from "./Common/Status/index"; import { RelativeTime } from "./Common/Time/index"; -const TimelineItem = ({ timestamp, request, response, item, collection, width, isOauth2 }) => { +const TimelineItem = ({ timestamp, request, response, item, collection, isOauth2 }) => { const [isCollapsed, _toggleCollapse] = useState(false); const [activeTab, setActiveTab] = useState('request'); const toggleCollapse = () => _toggleCollapse(prev => !prev); @@ -57,15 +57,15 @@ const TimelineItem = ({ timestamp, request, response, item, collection, width, i {/* Tab Content */} -
+
{/* Request Tab */} {activeTab === 'request' && ( - + )} {/* Response Tab */} {activeTab === 'response' && ( - + )} {/* Network Logs Tab */} diff --git a/packages/bruno-app/src/components/ResponsePane/Timeline/index.js b/packages/bruno-app/src/components/ResponsePane/Timeline/index.js index 40fccf969..98fe1479a 100644 --- a/packages/bruno-app/src/components/ResponsePane/Timeline/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Timeline/index.js @@ -41,7 +41,7 @@ const getEffectiveAuthSource = (collection, item) => { return effectiveSource; }; -const Timeline = ({ collection, item, width }) => { +const Timeline = ({ collection, item }) => { // Get the effective auth source if auth mode is inherit const authSource = getEffectiveAuthSource(collection, item); @@ -62,7 +62,6 @@ const Timeline = ({ collection, item, width }) => { return ( {combinedTimeline.map((event, index) => { if (event.type === 'request') { @@ -76,7 +75,6 @@ const Timeline = ({ collection, item, width }) => { response={response} item={item} collection={collection} - width={width} />
); @@ -101,7 +99,6 @@ const Timeline = ({ collection, item, width }) => { response={data?.response} item={item} collection={collection} - width={width - 50} isOauth2={true} />
diff --git a/packages/bruno-app/src/components/ResponsePane/index.js b/packages/bruno-app/src/components/ResponsePane/index.js index 447eab43b..33668fa36 100644 --- a/packages/bruno-app/src/components/ResponsePane/index.js +++ b/packages/bruno-app/src/components/ResponsePane/index.js @@ -189,7 +189,7 @@ const ResponsePane = ({ item, collection }) => { onClose={() => setShowScriptErrorCard(false)} /> )} -
+
{!item?.response ? ( focusedTab?.responsePaneTab === "timeline" && requestTimeline?.length ? ( { return (
-
+
{children}