-
Notifications
You must be signed in to change notification settings - Fork 5k
feat(trace-viewer): Improve spacing and layout in and between network details sections #35425
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
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. |
agg23
left a comment
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.
| ` | ||
| ); | ||
|
|
||
| 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 DetailsSections.
| 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.
|
It is a little hard to review this PR since it introduces new ways of styling and changes fair amount of code. You have not yet achieved enough trust / ownership of this component for us to do a quick review and reviewing it thoroughly requires time. Try to take it easy and start with the small changes. |
References: #35214