fix: FunctionSignature return type border - #9050
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 2de503a. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9050 +/- ##
==========================================
- Coverage 75.15% 75.09% -0.06%
==========================================
Files 102 102
Lines 9124 9124
Branches 374 375 +1
==========================================
- Hits 6857 6852 -5
- Misses 2263 2268 +5
Partials 4 4 ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Signature UI so that when a signature contains only a return-type item, the usual bordered/padded wrapper styling is removed—addressing the “Return Type” variant visual issue reported for FunctionSignature.
Changes:
- Add a
data-kindattribute toSignatureItemto enable cross-module styling based on item kind. - Update
SignatureRootstyles to remove border and padding when its only direct child is a return item. - Bump
@node-core/ui-componentsversion to1.7.4.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ui-components/src/Common/Signature/SignatureRoot/index.module.css | Removes border/padding from the root wrapper when it contains only a return item. |
| packages/ui-components/src/Common/Signature/SignatureItem/index.tsx | Adds data-kind hook used by SignatureRoot to detect a return-only signature. |
| packages/ui-components/package.json | Version bump for publishing the UI change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Build Size ComparisonSummary
|
Description
The bordered wrapper component should not be rendered in the
FunctionSignaturecomponent when only the return type is present.Ref: https://openjs-foundation.slack.com/archives/CVAMEJ4UV/p1785348769820369
Validation
The
FunctionSignature"Return Type" variant should now be fixed in Chromatic, and the other variants shouldn't have any regressions.