Skip to content

Conversation

@cpAdm
Copy link
Contributor

@cpAdm cpAdm commented Mar 31, 2025

  • Sections inside a tab can now be collapsed (and is remember in storage)
    • Shows number of items when collapsed for request/response headers
  • key-values can now easier be distinguished by the new spacing
  • (keeps the current order intact, will re-order in next PR)

image

References: #35214

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Test results for "tests 1"

2 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:424:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

39017 passed, 805 skipped
✔️✔️✔️

Merge workflow run.

@Skn0tt Skn0tt requested a review from agg23 April 1, 2025 09:44
Copy link
Contributor

@agg23 agg23 left a 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}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chevron is misaligned. It should be aligned with the close button in the top bar.
Screenshot 2025-04-02 at 7 56 53 AM

event.preventDefault();
setIsOpen(!isOpen);
}}>
{title} {!isOpen && showCountWhenCollapsed && `(${keyLength})`}
Copy link
Contributor

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})`}
Copy link
Contributor

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({
Copy link
Contributor

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();
Copy link
Contributor

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 {
Copy link
Contributor

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})`}
Copy link
Contributor

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.

@pavelfeldman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants