-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* configure showReset * renaming * Request Details tabs title and layout rework * style adjustments and clean up * decrease footer font-size * reorganize request details files * add useIsVisible hook for table height * setup IntersectionObserver config for jest
- Loading branch information
Showing
50 changed files
with
597 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
global.IntersectionObserver = class IntersectionObserver { | ||
disconnect() { | ||
return null; | ||
} | ||
|
||
observe() { | ||
return null; | ||
} | ||
|
||
takeRecords() { | ||
return null; | ||
} | ||
|
||
unobserve() { | ||
return null; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
@import "./../../styles/variables"; | ||
|
||
.section-container { | ||
width: 100%; | ||
} | ||
|
||
.section-title-row { | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
padding: $size-xs $size-s; | ||
background: $bg-gray-90; | ||
border-top: $border; | ||
border-bottom: $border; | ||
font-weight: 500; | ||
font-size: 13px; | ||
color: $brand-primary-dark-gray; | ||
width: 100%; | ||
|
||
&:first-child { | ||
border-top: 0; | ||
} | ||
|
||
.section-title { | ||
display: flex; | ||
align-content: center; | ||
|
||
.caret-icon { | ||
fill: $brand-primary-gray; | ||
height: $size-m; | ||
width: $size-m; | ||
margin-right: $size-xs; | ||
} | ||
} | ||
|
||
.encode-url { | ||
margin-left: $size-s; | ||
font-size: $font-size-small; | ||
} | ||
|
||
&:focus, span:focus { | ||
outline: none; | ||
} | ||
} | ||
|
||
.section-detail { | ||
padding: $size-xs-s $size-s; | ||
|
||
.info-row { | ||
margin: 0; | ||
font-size: $font-size-small; | ||
padding-bottom: $size-xs; | ||
|
||
&:last-child { | ||
padding-bottom: 0; | ||
} | ||
} | ||
|
||
.info-caption { | ||
font-weight: bold; | ||
padding-right: $size-xs-s; | ||
} | ||
|
||
.info-value { | ||
word-break: break-all; | ||
} | ||
} | ||
|
||
.no-payload { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: $font-size-h4; | ||
width: 100%; | ||
color: $brand-primary-dark-gray; | ||
} | ||
|
||
.response-content { | ||
font-size: $font-size-small; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
.copy-button { | ||
align-self: end; | ||
} | ||
|
||
.payload-body { | ||
font-family: monospace; | ||
white-space: pre-wrap; | ||
word-break: break-all; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import QueryString from './request/QueryString'; | ||
import FormData from './request/FormData'; | ||
import SectionInfo from './SectionInfo'; | ||
import Styles from './ReqDetail.styles.scss'; | ||
import RequestPayload from './request/RequestPayload'; | ||
|
||
const Request = ({ data }) => { | ||
if (!data.headers.postData?.text && | ||
!data.headers.postData?.params && | ||
!data.headers.queryString?.length | ||
) { | ||
return (<h4 className={Styles['no-payload']}>This request has no request data available.</h4>); | ||
} | ||
|
||
return (!data ? null : ( | ||
<section className={Styles['section-container']}> | ||
{data.headers.postData && data.headers.postData.text && ( | ||
<SectionInfo | ||
component={RequestPayload} | ||
data={data} | ||
eventKey="requestPayload" | ||
isParseEnabled | ||
isVisible | ||
/> | ||
)} | ||
{data.headers.queryString && !!data.headers.queryString.length && ( | ||
<SectionInfo | ||
component={QueryString} | ||
data={data} | ||
eventKey="queryString" | ||
isEncodeEnabled | ||
/> | ||
)} | ||
{data.headers.postData && data.headers.postData.params && ( | ||
<SectionInfo | ||
component={FormData} | ||
data={data} | ||
eventKey="formData" | ||
isEncodeEnabled | ||
/> | ||
)} | ||
</section> | ||
)); | ||
}; | ||
|
||
Request.propTypes = { | ||
data: PropTypes.object, | ||
}; | ||
|
||
Request.defaultProps = { | ||
data: null, | ||
}; | ||
|
||
export default Request; |
Oops, something went wrong.