Skip to content

chore: glue "Returns" to siblings#8934

Merged
avivkeller merged 1 commit into
mainfrom
signature-glue
Jun 8, 2026
Merged

chore: glue "Returns" to siblings#8934
avivkeller merged 1 commit into
mainfrom
signature-glue

Conversation

@avivkeller

@avivkeller avivkeller commented Jun 1, 2026

Copy link
Copy Markdown
Member
image

Copilot AI review requested due to automatic review settings June 1, 2026 19:03
@avivkeller avivkeller requested a review from a team as a code owner June 1, 2026 19:03
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jun 1, 2026 7:04pm

Request Review

@cursor

cursor Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation-only changes to Signature/FunctionSignature with no auth, data, or API impact; main risk is minor doc UI regressions if container detection (!name && !type) misclassifies edge cases.

Overview
Returns rows in function signatures now render in the same grouped Signature container as parameters instead of being split into a separate block, so CSS can treat them as a footer attached to the items above.

New SignatureItem styles apply to top-level kind="return" items (not nested under .children): full-bleed negative horizontal/bottom margins, flat top corners, and a top divider. FunctionSignature drops the loop that partitioned items into attributes vs returns and always maps all items under one titled Signature.

Signature now treats missing name and type as the grouping root (optional title), replacing the previous title-only branch. SignatureRoot only renders the title heading and wires aria-labelledby when a title is present.

Reviewed by Cursor Bugbot for commit bc10063. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.29%. Comparing base (c582f6e) to head (bc10063).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8934      +/-   ##
==========================================
+ Coverage   73.24%   73.29%   +0.05%     
==========================================
  Files         102      102              
  Lines        8640     8640              
  Branches      316      315       -1     
==========================================
+ Hits         6328     6333       +5     
+ Misses       2311     2306       -5     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bc10063. Configure here.

Comment thread packages/ui-components/src/Containers/FunctionSignature/index.tsx
Comment thread packages/ui-components/src/Common/Signature/index.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the signature rendering components so that “Returns” entries can be rendered inline with other signature items (enabling the new “full-bleed footer” styling), and improves the SignatureRoot markup so it only wires up aria-labelledby (and renders a title element) when a title is actually present.

Changes:

  • Simplify FunctionSignature to always render a single Signature group containing all items (including returns).
  • Update SignatureRoot to conditionally render the title element and only set aria-labelledby when title exists.
  • Add CSS to style a top-level return item as a full-bleed footer attached to preceding items, and adjust Signature to treat “root vs item” based on name/type rather than title.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/ui-components/src/Containers/FunctionSignature/index.tsx Simplifies rendering to a single Signature wrapper for all items.
packages/ui-components/src/Common/Signature/SignatureRoot/index.tsx Makes title and aria-labelledby conditional on title being present.
packages/ui-components/src/Common/Signature/SignatureItem/index.module.css Adds styling to visually “attach” top-level return items to preceding items.
packages/ui-components/src/Common/Signature/index.tsx Changes root-vs-item decision logic to be based on name/type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/ui-components/src/Common/Signature/index.tsx
@avivkeller

Copy link
Copy Markdown
Member Author

Bump @nodejs/nodejs-website

@mikeesto mikeesto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@avivkeller avivkeller added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit b05c48d Jun 8, 2026
16 checks passed
@avivkeller avivkeller deleted the signature-glue branch June 8, 2026 01:30
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