From 59509c00336a2472bee8245ee09b28a3fc329e1c Mon Sep 17 00:00:00 2001 From: majakomel Date: Tue, 12 Nov 2024 13:38:33 +0100 Subject: [PATCH] Add more styling fixes --- components/NavBar.js | 2 +- components/measurement/DetailsHeader.js | 26 +- components/measurement/Hero.js | 2 +- components/measurement/StatusInfo.js | 12 +- .../measurement/nettests/WebConnectivity.js | 241 ++++++++---------- 5 files changed, 134 insertions(+), 149 deletions(-) diff --git a/components/NavBar.js b/components/NavBar.js index a459e0f8..20cda3fb 100644 --- a/components/NavBar.js +++ b/components/NavBar.js @@ -182,7 +182,7 @@ export const NavBar = ({ color }) => { )}
a]:border-black [&>a]:hover:border-black [&>*]:opacity-100 [&>*]:text-black [&>*]:hover:text-black'}`} + className={`flex gap-4 lg:gap-8 text-sm ${showMenu && 'pt-2 flex-col items-start [&>a]:border-black [&>a]:hover:border-black [&>*]:opacity-100 [&>*]:text-black [&>*]:hover:text-black'}`} > } diff --git a/components/measurement/DetailsHeader.js b/components/measurement/DetailsHeader.js index d0c934fc..7b54094f 100644 --- a/components/measurement/DetailsHeader.js +++ b/components/measurement/DetailsHeader.js @@ -23,18 +23,20 @@ const DetailsHeader = ({ testName, runtime, notice, url }) => {
- + {!isEmbeddedView && ( + + )}
{notice}
{runtime && ( diff --git a/components/measurement/Hero.js b/components/measurement/Hero.js index 172bd431..629d8dcc 100644 --- a/components/measurement/Hero.js +++ b/components/measurement/Hero.js @@ -40,7 +40,7 @@ const Hero = ({ status, icon, label, info }) => { } return ( -
+
{icon}
{label}
diff --git a/components/measurement/StatusInfo.js b/components/measurement/StatusInfo.js index c7040faa..2553377b 100644 --- a/components/measurement/StatusInfo.js +++ b/components/measurement/StatusInfo.js @@ -2,14 +2,16 @@ import PropTypes from 'prop-types' const StatusInfo = ({ title, message }) => (
-
+
{' '} {title}{' '}
-
- {' '} - {message}{' '} -
+ {message && ( +
+ {' '} + {message}{' '} +
+ )}
) diff --git a/components/measurement/nettests/WebConnectivity.js b/components/measurement/nettests/WebConnectivity.js index d0a696c0..04fad500 100644 --- a/components/measurement/nettests/WebConnectivity.js +++ b/components/measurement/nettests/WebConnectivity.js @@ -335,10 +335,7 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.Failed" values={{ date, - WebsiteURL: ( - - // {input} - ), + WebsiteURL: , network: probe_asn, country, }} @@ -351,10 +348,7 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.ConfirmedBlocked" values={{ date, - WebsiteURL: ( - - // {input} - ), + WebsiteURL: , network: probe_asn, country, }} @@ -382,15 +376,15 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.Anomaly" values={{ date, - WebsiteURL: ( - - // {input} - ), - 'link-to-docs': (string) => ( - - {string} - - ), + WebsiteURL: , + 'link-to-docs': (string) => + isEmbeddedView ? ( + string + ) : ( + + {string} + + ), network: probe_asn, country, reason, @@ -416,10 +410,7 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.Accessible" values={{ date, - WebsiteURL: ( - - // {input} - ), + WebsiteURL: , network: probe_asn, country, }} @@ -444,10 +435,7 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.Down" values={{ date, - WebsiteURL: ( - - // {input} - ), + WebsiteURL: , network: probe_asn, country, }} @@ -473,10 +461,7 @@ const WebConnectivityDetails = ({ id="Measurement.SummaryText.Websites.Failed" values={{ date, - WebsiteURL: ( - - // {input} - ), + WebsiteURL: , network: probe_asn, country, }} @@ -533,115 +518,111 @@ const WebConnectivityDetails = ({ details: ( <> {/* Failures */} -
- - } - content={ -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
+ + + } + content={ +
+
+
- } - /> -
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ } + /> + {/* DNS Queries */} -
- - } - content={ - Array.isArray(queries) ? ( - <> -
-
- - - : - -
-
{client_resolver || '(unknown)'}
-
-
- {queries.map((query, index) => ( - - ))} + + + } + content={ + Array.isArray(queries) ? ( + <> +
+
+ + + : +
- - ) : ( - - ) - } - /> -
+
{client_resolver || '(unknown)'}
+
+
+ {queries.map((query, index) => ( + + ))} +
+ + ) : ( + + ) + } + /> + {/* TCP COnnections */} -
- - } - content={ - tcpConnections.length > 0 ? ( - tcpConnections.map((connection, index) => ( -
-
- {connection.destination}:{' '} - {connection.failure - ? `${intl.formatMessage({ id: 'Measurement.Details.Websites.TCP.ConnectionTo.Failed' })} (${connection.failure})` - : intl.formatMessage({ - id: 'Measurement.Details.Websites.TCP.ConnectionTo.Success', - })} -
+ + + } + content={ + tcpConnections.length > 0 ? ( + tcpConnections.map((connection, index) => ( +
+
+ {connection.destination}:{' '} + {connection.failure + ? `${intl.formatMessage({ id: 'Measurement.Details.Websites.TCP.ConnectionTo.Failed' })} (${connection.failure})` + : intl.formatMessage({ + id: 'Measurement.Details.Websites.TCP.ConnectionTo.Success', + })}
- )) - ) : ( - - ) - } - /> -
+
+ )) + ) : ( + + ) + } + /> + {/* I would like us to enrich the HTTP response body section with information about every request and response as this is a very common thing we look at when investigating a case. */} -
- - } - content={ - Array.isArray(requests) ? ( -
- {requests.map((request, index) => ( - - ))} -
- ) : ( - - ) - } - /> -
+ + + } + content={ + Array.isArray(requests) ? ( +
+ {requests.map((request, index) => ( + + ))} +
+ ) : ( + + ) + } + /> ), })}