-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(trace-viewer): Improve spacing and layout in and between network details sections #35425
base: main
Are you sure you want to change the base?
Conversation
… details sections
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"2 flaky39017 passed, 805 skipped Merge workflow run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! I have a few design comments.
const keyLength = Object.keys(data).length; | ||
|
||
return ( | ||
<details className='network-details' open={isOpen} aria-label={title}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.preventDefault(); | ||
setIsOpen(!isOpen); | ||
}}> | ||
{title} {!isOpen && showCountWhenCollapsed && `(${keyLength})`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be more spacing between the title and the chevron.
event.preventDefault(); | ||
setIsOpen(!isOpen); | ||
}}> | ||
{title} {!isOpen && showCountWhenCollapsed && `(${keyLength})`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just leave the count onscreen at all times.
|
||
{requestBody && <div className='network-request-details-header'>Request Body</div>} | ||
{requestBody && <CodeMirrorWrapper text={requestBody.text} mimeType={requestBody.mimeType} readOnly lineNumbers={true}/>} | ||
<DetailsSection title='General' data={Object.entries({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memo this entries
object.
- 'row "param1: value2"' | ||
- 'row "param2: value2"' | ||
` | ||
); | ||
|
||
await page.getByText('endpoint').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add at least one test dealing with expansion and collapse of the new DetailsSection
s.
overflow: hidden; | ||
margin-left: 10px; | ||
} | ||
.network-details { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should scope this class name better, as it's more generic than we typically have.
event.preventDefault(); | ||
setIsOpen(!isOpen); | ||
}}> | ||
{title} {!isOpen && showCountWhenCollapsed && `(${keyLength})`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable text selection on these headers.
References: #35214