Skip to content

feat(ui): use FunctionSignature component#637

Open
avivkeller wants to merge 4 commits intomainfrom
functionsignature
Open

feat(ui): use FunctionSignature component#637
avivkeller wants to merge 4 commits intomainfrom
functionsignature

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Mar 3, 2026

cc @canerakdas


This PR changes the createPropertyTable function into a function that generates a FunctionSignature component layout

image

Copilot AI review requested due to automatic review settings March 3, 2026 14:40
@avivkeller avivkeller requested a review from a team as a code owner March 3, 2026 14:40
@vercel
Copy link

vercel bot commented Mar 3, 2026

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

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Mar 3, 2026 8:29pm

Request Review

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 98.94481% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.90%. Comparing base (69710d5) to head (36a3e30).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/generators/jsx-ast/utils/signature.mjs 70.00% 6 Missing ⚠️
src/generators/jsx-ast/utils/types.mjs 97.41% 3 Missing and 1 partial ⚠️
src/generators/jsx-ast/utils/buildContent.mjs 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #637      +/-   ##
==========================================
+ Coverage   73.78%   75.90%   +2.12%     
==========================================
  Files         145      145              
  Lines       12882    13734     +852     
  Branches      923      991      +68     
==========================================
+ Hits         9505    10425     +920     
+ Misses       3372     3303      -69     
- Partials        5        6       +1     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

legacy-html Generator

File Base Head Diff
webcrypto.html 320.48 KB 334.63 KB +14.15 KB (+4.42%)
fs.html 913.83 KB 927.66 KB +13.83 KB (+1.51%)
crypto.html 997.50 KB 1007.81 KB +10.31 KB (+1.03%)
n-api.html 758.34 KB 767.40 KB +9.07 KB (+1.20%)
os.html 75.40 KB 83.60 KB +8.20 KB (+10.87%)
errors.html 341.45 KB 349.54 KB +8.09 KB (+2.37%)
http2.html 737.61 KB 744.28 KB +6.66 KB (+0.90%)
cli.html 281.78 KB 287.98 KB +6.20 KB (+2.20%)
http.html 591.74 KB 597.93 KB +6.19 KB (+1.05%)
util.html 708.63 KB 714.49 KB +5.86 KB (+0.83%)
test.html 813.57 KB 818.99 KB +5.41 KB (+0.67%)
quic.html 137.33 KB 142.57 KB +5.24 KB (+3.82%)
stream.html 803.51 KB 808.72 KB +5.21 KB (+0.65%)
dns.html 210.79 KB 215.95 KB +5.15 KB (+2.44%)
buffer.html 1.06 MB 1.07 MB +5.00 KB (+0.46%)
sqlite.html 193.03 KB 197.83 KB +4.80 KB (+2.49%)
process.html 677.94 KB 682.72 KB +4.78 KB (+0.71%)
net.html 211.82 KB 216.24 KB +4.43 KB (+2.09%)
deprecations.html 258.92 KB 263.21 KB +4.29 KB (+1.66%)
webstreams.html 266.07 KB 270.28 KB +4.21 KB (+1.58%)
perf_hooks.html 345.33 KB 349.49 KB +4.16 KB (+1.20%)
tls.html 259.29 KB 263.42 KB +4.14 KB (+1.60%)
readline.html 200.67 KB 204.62 KB +3.95 KB (+1.97%)
esm.html 122.58 KB 126.34 KB +3.76 KB (+3.07%)
zlib.html 272.53 KB 276.26 KB +3.72 KB (+1.37%)
events.html 541.57 KB 545.20 KB +3.63 KB (+0.67%)
module.html 314.31 KB 317.90 KB +3.59 KB (+1.14%)
url.html 318.72 KB 322.27 KB +3.56 KB (+1.12%)
vm.html 420.10 KB 423.52 KB +3.42 KB (+0.81%)
worker_threads.html 382.93 KB 386.29 KB +3.36 KB (+0.88%)
child_process.html 438.97 KB 442.26 KB +3.29 KB (+0.75%)
v8.html 309.14 KB 312.33 KB +3.19 KB (+1.03%)
diagnostics_channel.html 223.19 KB 226.26 KB +3.08 KB (+1.38%)
globals.html 120.14 KB 123.14 KB +3.00 KB (+2.50%)
assert.html 464.27 KB 466.93 KB +2.66 KB (+0.57%)
inspector.html 110.75 KB 113.27 KB +2.53 KB (+2.28%)
dgram.html 153.12 KB 155.64 KB +2.52 KB (+1.64%)
modules.html 148.53 KB 151.05 KB +2.52 KB (+1.70%)
packages.html 118.87 KB 121.25 KB +2.38 KB (+2.00%)
cluster.html 195.87 KB 198.22 KB +2.35 KB (+1.20%)
intl.html 40.46 KB 42.78 KB +2.32 KB (+5.73%)
repl.html 215.19 KB 217.51 KB +2.32 KB (+1.08%)
single-executable-applications.html 86.95 KB 89.23 KB +2.28 KB (+2.62%)
timers.html 87.18 KB 89.38 KB +2.20 KB (+2.52%)
console.html 95.74 KB 97.90 KB +2.16 KB (+2.26%)
path.html 93.69 KB 95.76 KB +2.07 KB (+2.21%)
tty.html 41.57 KB 43.63 KB +2.06 KB (+4.97%)
https.html 153.59 KB 155.65 KB +2.05 KB (+1.34%)
async_context.html 198.51 KB 200.56 KB +2.05 KB (+1.03%)
async_hooks.html 217.73 KB 219.76 KB +2.03 KB (+0.93%)
index.html 15.57 KB 17.51 KB +1.94 KB (+12.45%)
addons.html 336.13 KB 338.04 KB +1.90 KB (+0.57%)
debugger.html 36.24 KB 38.11 KB +1.87 KB (+5.15%)
tracing.html 87.56 KB 89.42 KB +1.86 KB (+2.13%)
domain.html 99.32 KB 101.17 KB +1.85 KB (+1.86%)
permissions.html 35.62 KB 37.47 KB +1.85 KB (+5.19%)
typescript.html 31.60 KB 33.37 KB +1.77 KB (+5.61%)
report.html 186.09 KB 187.86 KB +1.77 KB (+0.95%)
wasi.html 43.51 KB 45.27 KB +1.76 KB (+4.05%)
environment_variables.html 22.87 KB 24.61 KB +1.74 KB (+7.61%)
querystring.html 32.04 KB 33.76 KB +1.72 KB (+5.36%)
punycode.html 32.69 KB 34.40 KB +1.71 KB (+5.24%)
string_decoder.html 38.57 KB 40.21 KB +1.65 KB (+4.27%)
documentation.html 24.09 KB 25.73 KB +1.64 KB (+6.81%)
embedding.html 48.04 KB 49.68 KB +1.64 KB (+3.41%)
synopsis.html 23.89 KB 25.47 KB +1.58 KB (+6.63%)

orama-db Generator

File Base Head Diff
orama-db.json 8.04 MB 8.04 MB -1.78 KB (-0.02%)

web Generator

File Base Head Diff
fs.js 1.33 MB 1.17 MB -165.22 KB (-12.11%)
fs.html 1.29 MB 1.39 MB +100.25 KB (+7.57%)
crypto.js 1.24 MB 1.15 MB -89.29 KB (-7.04%)
http2.js 863.38 KB 800.64 KB -62.74 KB (-7.27%)
crypto.html 987.39 KB 1.03 MB +62.25 KB (+6.30%)
stream.js 909.94 KB 852.92 KB -57.03 KB (-6.27%)
http.js 742.94 KB 688.16 KB -54.78 KB (-7.37%)
quic.js 220.25 KB 169.60 KB -50.66 KB (-23.00%)
buffer.html 855.34 KB 903.39 KB +48.05 KB (+5.62%)
test.js 902.74 KB 857.87 KB -44.88 KB (-4.97%)
util.js 797.04 KB 752.77 KB -44.27 KB (-5.55%)
webcrypto.js 464.93 KB 422.40 KB -42.53 KB (-9.15%)
buffer.js 1.13 MB 1.09 MB -42.02 KB (-3.62%)
process.js 747.62 KB 707.81 KB -39.81 KB (-5.32%)
stream.html 820.16 KB 857.91 KB +37.75 KB (+4.60%)
webstreams.js 320.77 KB 283.55 KB -37.22 KB (-11.60%)
net.js 321.67 KB 285.18 KB -36.49 KB (-11.34%)
util.html 655.08 KB 690.80 KB +35.72 KB (+5.45%)
test.html 699.33 KB 733.41 KB +34.08 KB (+4.87%)
perf_hooks.js 406.03 KB 373.20 KB -32.83 KB (-8.09%)
http2.html 741.95 KB 772.41 KB +30.46 KB (+4.11%)
tls.js 349.36 KB 320.58 KB -28.79 KB (-8.24%)
diagnostics_channel.js 255.87 KB 227.22 KB -28.64 KB (-11.19%)
http.html 712.56 KB 740.55 KB +27.99 KB (+3.93%)
events.js 575.77 KB 548.89 KB -26.88 KB (-4.67%)
dns.js 292.44 KB 266.06 KB -26.39 KB (-9.02%)
net.html 357.29 KB 383.68 KB +26.39 KB (+7.39%)
vm.js 465.46 KB 442.49 KB -22.97 KB (-4.94%)
v8.js 355.28 KB 333.26 KB -22.02 KB (-6.20%)
tls.html 353.04 KB 374.13 KB +21.10 KB (+5.98%)
worker_threads.js 420.88 KB 400.25 KB -20.64 KB (-4.90%)
vm.html 350.14 KB 370.42 KB +20.28 KB (+5.79%)
child_process.js 489.12 KB 468.93 KB -20.19 KB (-4.13%)
sqlite.js 253.14 KB 233.37 KB -19.76 KB (-7.81%)
url.js 354.93 KB 335.33 KB -19.60 KB (-5.52%)
child_process.html 362.93 KB 382.08 KB +19.15 KB (+5.28%)
module.js 343.07 KB 323.93 KB -19.14 KB (-5.58%)
zlib.js 334.44 KB 315.48 KB -18.97 KB (-5.67%)
sqlite.html 249.88 KB 267.00 KB +17.12 KB (+6.85%)
events.html 438.12 KB 455.14 KB +17.03 KB (+3.89%)
process.html 656.14 KB 672.04 KB +15.90 KB (+2.42%)
deprecations.html 510.22 KB 494.80 KB -15.41 KB (-3.02%)
webstreams.html 343.66 KB 358.56 KB +14.90 KB (+4.34%)
cli.html 502.71 KB 488.09 KB -14.62 KB (-2.91%)
readline.js 238.88 KB 224.35 KB -14.53 KB (-6.08%)
v8.html 305.75 KB 319.87 KB +14.11 KB (+4.62%)
url.html 334.53 KB 347.64 KB +13.11 KB (+3.92%)
dgram.js 185.13 KB 172.36 KB -12.76 KB (-6.90%)
assert.js 467.59 KB 454.98 KB -12.61 KB (-2.70%)
module.html 305.96 KB 318.30 KB +12.34 KB (+4.03%)
inspector.js 132.83 KB 120.50 KB -12.33 KB (-9.28%)
diagnostics_channel.html 221.16 KB 233.40 KB +12.24 KB (+5.53%)
os.html 131.86 KB 143.91 KB +12.04 KB (+9.13%)
webcrypto.html 528.27 KB 539.92 KB +11.65 KB (+2.21%)
perf_hooks.html 372.85 KB 383.86 KB +11.01 KB (+2.95%)
n-api.html 814.34 KB 803.53 KB -10.81 KB (-1.33%)
readline.html 240.74 KB 250.83 KB +10.10 KB (+4.19%)
cluster.js 206.89 KB 197.06 KB -9.83 KB (-4.75%)
worker_threads.html 355.46 KB 364.87 KB +9.40 KB (+2.65%)
os.js 116.35 KB 107.20 KB -9.15 KB (-7.86%)
console.js 114.73 KB 106.14 KB -8.59 KB (-7.49%)
styles.css 128.16 KB 136.74 KB +8.58 KB (+6.69%)
timers.js 107.83 KB 99.77 KB -8.06 KB (-7.47%)
path.js 105.32 KB 97.39 KB -7.93 KB (-7.53%)
errors.html 465.76 KB 458.39 KB -7.38 KB (-1.58%)
modules.js 158.25 KB 151.51 KB -6.74 KB (-4.26%)
dns.html 285.45 KB 291.68 KB +6.23 KB (+2.18%)
errors.js 413.90 KB 407.71 KB -6.19 KB (-1.50%)
async_context.js 194.18 KB 188.16 KB -6.02 KB (-3.10%)
timers.html 126.95 KB 132.77 KB +5.82 KB (+4.58%)
assert.html 321.12 KB 326.94 KB +5.82 KB (+1.81%)
dgram.html 186.49 KB 192.21 KB +5.72 KB (+3.07%)
globals.js 141.34 KB 135.77 KB -5.57 KB (-3.94%)
repl.js 215.37 KB 209.85 KB -5.52 KB (-2.56%)
zlib.html 279.77 KB 285.17 KB +5.39 KB (+1.93%)
https.js 166.45 KB 161.17 KB -5.28 KB (-3.17%)
quic.html 368.22 KB 373.40 KB +5.19 KB (+1.41%)
tty.js 54.22 KB 49.15 KB -5.07 KB (-9.35%)
globals.html 232.84 KB 227.87 KB -4.96 KB (-2.13%)
async_hooks.js 201.30 KB 196.98 KB -4.32 KB (-2.15%)
path.html 134.12 KB 138.10 KB +3.98 KB (+2.97%)
addons.html 259.08 KB 262.88 KB +3.80 KB (+1.47%)
async_context.html 158.61 KB 162.16 KB +3.55 KB (+2.24%)
async_hooks.html 155.43 KB 158.90 KB +3.48 KB (+2.24%)
tty.html 90.43 KB 93.90 KB +3.47 KB (+3.83%)
repl.html 176.64 KB 180.06 KB +3.42 KB (+1.94%)
https.html 145.58 KB 148.89 KB +3.30 KB (+2.27%)
cluster.html 191.83 KB 195.09 KB +3.26 KB (+1.70%)
wasi.js 44.80 KB 42.03 KB -2.77 KB (-6.18%)
querystring.js 33.03 KB 30.65 KB -2.38 KB (-7.20%)
domain.js 93.08 KB 90.82 KB -2.26 KB (-2.43%)
punycode.js 30.24 KB 28.00 KB -2.24 KB (-7.40%)
single-executable-applications.js 88.42 KB 86.35 KB -2.07 KB (-2.34%)
esm.js 139.78 KB 137.90 KB -1.88 KB (-1.34%)
domain.html 101.93 KB 103.72 KB +1.79 KB (+1.76%)
console.html 141.59 KB 143.35 KB +1.76 KB (+1.24%)
inspector.html 167.61 KB 169.32 KB +1.71 KB (+1.02%)
packages.html 155.29 KB 153.77 KB -1.53 KB (-0.98%)
tracing.js 78.85 KB 77.40 KB -1.45 KB (-1.84%)
packages.js 126.24 KB 124.80 KB -1.43 KB (-1.14%)
modules.html 177.80 KB 179.06 KB +1.27 KB (+0.71%)
single-executable-applications.html 104.64 KB 105.85 KB +1.21 KB (+1.16%)
report.html 173.50 KB 174.66 KB +1.15 KB (+0.66%)
environment_variables.html 43.84 KB 42.79 KB -1.05 KB (-2.39%)
string_decoder.js 32.33 KB 31.32 KB -1.01 KB (-3.11%)
documentation.html 37.89 KB 36.92 KB -990.00 B (-2.55%)
typescript.html 53.24 KB 52.28 KB -976.00 B (-1.79%)
punycode.html 62.64 KB 61.74 KB -930.00 B (-1.45%)
synopsis.html 42.39 KB 41.51 KB -898.00 B (-2.07%)
esm.html 152.51 KB 153.30 KB +813.00 B (+0.52%)
permissions.html 54.59 KB 53.85 KB -757.00 B (-1.35%)
debugger.html 53.89 KB 53.38 KB -527.00 B (-0.95%)
index.html 35.51 KB 35.01 KB -519.00 B (-1.43%)
intl.html 57.44 KB 56.96 KB -497.00 B (-0.84%)
embedding.html 58.70 KB 58.29 KB -415.00 B (-0.69%)
cli.js 325.74 KB 325.39 KB -353.00 B (-0.11%)
wasi.html 67.79 KB 68.07 KB +282.00 B (+0.41%)
querystring.html 62.10 KB 62.33 KB +236.00 B (+0.37%)
string_decoder.html 54.11 KB 54.18 KB +77.00 B (+0.14%)
tracing.html 83.26 KB 83.29 KB +27.00 B (+0.03%)
addons.js 299.72 KB 299.74 KB +15.00 B (+0.00%)
debugger.js 31.09 KB 31.11 KB +15.00 B (+0.05%)
deprecations.js 313.75 KB 313.77 KB +15.00 B (+0.00%)
documentation.js 9.73 KB 9.74 KB +15.00 B (+0.15%)
environment_variables.js 15.13 KB 15.15 KB +15.00 B (+0.10%)
n-api.js 721.30 KB 721.32 KB +15.00 B (+0.00%)
permissions.js 28.46 KB 28.47 KB +15.00 B (+0.05%)
report.js 188.54 KB 188.55 KB +15.00 B (+0.01%)
typescript.js 25.36 KB 25.38 KB +15.00 B (+0.06%)
embedding.js 37.28 KB 37.29 KB +10.00 B (+0.03%)
intl.js 37.07 KB 37.08 KB +10.00 B (+0.03%)
synopsis.js 15.71 KB 15.72 KB +10.00 B (+0.06%)
index.js 9.69 KB 9.69 KB -5.00 B (-0.05%)

Copy link
Contributor

Copilot AI left a comment

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 updates the JSX AST generator to render typed Markdown lists using the FunctionSignature UI component layout instead of generating a raw HTML property table, aligning the output with the shared UI component library.

Changes:

  • Adds FunctionSignature to the web generator’s JSX import map.
  • Replaces the old property-table builder with new typed-list parsing utilities (types.mjs) and a createSignatureTable renderer that emits a FunctionSignature JSX element.
  • Renames/reshapes signature insertion utilities and updates call sites; bumps @node-core/ui-components to ^1.6.1.

Reviewed changes

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

Show a summary per file
File Description
src/generators/web/constants.mjs Registers FunctionSignature for generated JSX imports.
src/generators/jsx-ast/utils/types.mjs New utilities to parse typed Markdown lists into structured items (name/type/description/children).
src/generators/jsx-ast/utils/signature.mjs Exposes insertSignatureCodeBlock and adds createSignatureTable that renders FunctionSignature.
src/generators/jsx-ast/utils/buildPropertyTable.mjs Removes the previous HTML table implementation.
src/generators/jsx-ast/utils/buildContent.mjs Switches typed-list transforms to createSignatureTable and updates signature insertion import/usage.
src/generators/jsx-ast/utils/buildBarProps.mjs Updates getFullName import to the new signature module.
package.json Bumps @node-core/ui-components to ^1.6.1.
npm-shrinkwrap.json Lockfile updates reflecting the dependency bump.
Files not reviewed (1)
  • npm-shrinkwrap.json: Language not supported

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

const items = parseListIntoProperties(node, remark);

return createJSXElement(JSX_IMPORTS.FunctionSignature.name, {
title: items.length === 1 && !items[0].name ? 'Type' : 'Attributes',
Copy link
Member

Choose a reason for hiding this comment

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

If the item only contains returns, the title shouldn’t be passed. That should resolve the border issue Claudio mentioned in Slack

Copy link
Member

@canerakdas canerakdas left a comment

Choose a reason for hiding this comment

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

Looks great, thank you Aviv! I'm testing the design across different pages, but from an implementation standpoint, everything looks good to me 🐢

import {
insertSignatureCodeBlock,
createSignatureTable,
getFullName,
Copy link
Member

Choose a reason for hiding this comment

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

getFullName should be in another file if it is not only used to build the signature

} from '../constants.mjs';
import insertSignature, { getFullName } from './buildSignature.mjs';
import {
insertSignatureCodeBlock,
Copy link
Member

Choose a reason for hiding this comment

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

name of fn is misleading, insertSignatureSection

word-break: break-word;
}

/* Don't overflow the parent */
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove this? This was intentionally added by me...

Copy link
Member

Choose a reason for hiding this comment

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

(and has nothing to do with signatures)

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.

Remodel (or remove) our parameter tables

4 participants