Skip to content

feat(web): make headings more distinct#655

Open
avivkeller wants to merge 1 commit intomainfrom
distinct-headings
Open

feat(web): make headings more distinct#655
avivkeller wants to merge 1 commit intomainfrom
distinct-headings

Conversation

@avivkeller
Copy link
Member

This PR prevents duplicate headings by:

  1. Placing the function signature in the heading itself
  2. Using the full function in the ToC

Closes: #354
Closes: #653

image

Copilot AI review requested due to automatic review settings March 7, 2026 20:53
@avivkeller avivkeller requested a review from a team as a code owner March 7, 2026 20:53
@vercel
Copy link

vercel bot commented Mar 7, 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 7, 2026 8:53pm

Request Review

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 64.28571% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.92%. Comparing base (1aef493) to head (250b58e).

Files with missing lines Patch % Lines
src/generators/jsx-ast/utils/signature.mjs 20.00% 8 Missing ⚠️
src/generators/jsx-ast/utils/buildBarProps.mjs 90.00% 1 Missing ⚠️
src/generators/jsx-ast/utils/buildContent.mjs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #655      +/-   ##
==========================================
+ Coverage   75.90%   75.92%   +0.01%     
==========================================
  Files         145      145              
  Lines       13735    13700      -35     
  Branches      992      991       -1     
==========================================
- Hits        10426    10402      -24     
+ Misses       3303     3292      -11     
  Partials        6        6              

☔ 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 7, 2026

orama-db Generator

File Base Head Diff
orama-db.json 8.05 MB 8.05 MB +3.00 B (+0.00%)

web Generator

File Base Head Diff
fs.js 1.18 MB 1.15 MB -27.46 KB (-2.27%)
fs.html 1.39 MB 1.37 MB -19.23 KB (-1.35%)
crypto.js 1.15 MB 1.14 MB -16.06 KB (-1.36%)
util.js 754.46 KB 741.47 KB -12.99 KB (-1.72%)
http.js 690.45 KB 677.59 KB -12.86 KB (-1.86%)
buffer.js 1.09 MB 1.08 MB -12.64 KB (-1.13%)
http2.js 803.22 KB 791.35 KB -11.86 KB (-1.48%)
stream.js 854.92 KB 843.79 KB -11.13 KB (-1.30%)
crypto.html 1.02 MB 1.01 MB -10.75 KB (-1.03%)
v8.js 335.57 KB 325.42 KB -10.14 KB (-3.02%)
util.html 689.83 KB 680.15 KB -9.67 KB (-1.40%)
net.js 286.16 KB 277.00 KB -9.17 KB (-3.20%)
http.html 733.33 KB 724.33 KB -9.00 KB (-1.23%)
buffer.html 901.86 KB 892.96 KB -8.90 KB (-0.99%)
webstreams.js 285.65 KB 276.87 KB -8.78 KB (-3.07%)
stream.html 855.61 KB 847.26 KB -8.35 KB (-0.98%)
zlib.js 319.44 KB 311.25 KB -8.19 KB (-2.56%)
http2.html 767.21 KB 759.09 KB -8.13 KB (-1.06%)
test.js 862.58 KB 854.51 KB -8.07 KB (-0.94%)
v8.html 319.65 KB 311.87 KB -7.78 KB (-2.43%)
process.js 716.85 KB 709.12 KB -7.72 KB (-1.08%)
events.js 550.02 KB 542.88 KB -7.15 KB (-1.30%)
webstreams.html 355.64 KB 348.77 KB -6.88 KB (-1.93%)
perf_hooks.js 374.36 KB 367.75 KB -6.61 KB (-1.76%)
net.html 379.49 KB 372.93 KB -6.56 KB (-1.73%)
dns.js 269.27 KB 262.81 KB -6.46 KB (-2.40%)
tls.js 321.41 KB 314.94 KB -6.46 KB (-2.01%)
url.js 336.89 KB 330.59 KB -6.30 KB (-1.87%)
process.html 671.92 KB 666.17 KB -5.74 KB (-0.85%)
worker_threads.js 401.48 KB 395.85 KB -5.63 KB (-1.40%)
test.html 735.66 KB 730.11 KB -5.55 KB (-0.75%)
zlib.html 288.02 KB 282.85 KB -5.17 KB (-1.80%)
events.html 453.14 KB 447.99 KB -5.15 KB (-1.14%)
readline.js 225.20 KB 220.17 KB -5.03 KB (-2.23%)
url.html 346.47 KB 341.70 KB -4.78 KB (-1.38%)
sqlite.js 234.57 KB 229.85 KB -4.73 KB (-2.01%)
dns.html 293.89 KB 289.22 KB -4.67 KB (-1.59%)
tls.html 371.57 KB 366.95 KB -4.63 KB (-1.24%)
perf_hooks.html 378.19 KB 373.71 KB -4.48 KB (-1.18%)
inspector.js 122.14 KB 117.67 KB -4.47 KB (-3.66%)
dgram.js 173.86 KB 169.70 KB -4.16 KB (-2.39%)
worker_threads.html 363.30 KB 359.24 KB -4.06 KB (-1.12%)
vm.js 442.98 KB 438.96 KB -4.03 KB (-0.91%)
diagnostics_channel.js 228.45 KB 224.95 KB -3.50 KB (-1.53%)
readline.html 250.49 KB 247.04 KB -3.45 KB (-1.38%)
sqlite.html 266.44 KB 263.05 KB -3.39 KB (-1.27%)
console.js 108.50 KB 105.23 KB -3.26 KB (-3.01%)
inspector.html 169.80 KB 166.58 KB -3.23 KB (-1.90%)
timers.js 100.34 KB 97.16 KB -3.18 KB (-3.17%)
os.js 107.17 KB 104.13 KB -3.04 KB (-2.83%)
assert.js 457.00 KB 454.00 KB -3.00 KB (-0.66%)
dgram.html 192.35 KB 189.44 KB -2.91 KB (-1.51%)
vm.html 368.91 KB 366.15 KB -2.76 KB (-0.75%)
diagnostics_channel.html 234.19 KB 231.49 KB -2.70 KB (-1.15%)
tty.js 49.24 KB 46.64 KB -2.60 KB (-5.27%)
module.js 337.48 KB 334.90 KB -2.58 KB (-0.76%)
errors.js 407.81 KB 405.34 KB -2.47 KB (-0.61%)
globals.js 136.72 KB 134.33 KB -2.39 KB (-1.75%)
console.html 145.12 KB 142.77 KB -2.35 KB (-1.62%)
timers.html 131.96 KB 129.62 KB -2.34 KB (-1.77%)
async_context.js 189.00 KB 186.72 KB -2.28 KB (-1.21%)
os.html 141.39 KB 139.12 KB -2.27 KB (-1.61%)
child_process.js 469.27 KB 467.03 KB -2.24 KB (-0.48%)
quic.js 169.25 KB 167.14 KB -2.12 KB (-1.25%)
https.js 161.70 KB 159.60 KB -2.10 KB (-1.30%)
assert.html 328.46 KB 326.47 KB -1.99 KB (-0.60%)
module.html 325.19 KB 323.26 KB -1.93 KB (-0.59%)
async_hooks.js 197.25 KB 195.49 KB -1.76 KB (-0.89%)
tty.html 93.87 KB 92.12 KB -1.75 KB (-1.86%)
webcrypto.js 421.98 KB 420.24 KB -1.74 KB (-0.41%)
async_context.html 162.04 KB 160.33 KB -1.71 KB (-1.05%)
path.js 97.48 KB 95.78 KB -1.70 KB (-1.75%)
globals.html 226.83 KB 225.20 KB -1.63 KB (-0.72%)
quic.html 356.78 KB 355.20 KB -1.58 KB (-0.44%)
child_process.html 380.83 KB 379.32 KB -1.51 KB (-0.40%)
cluster.js 197.63 KB 196.15 KB -1.48 KB (-0.75%)
https.html 148.67 KB 147.24 KB -1.43 KB (-0.96%)
domain.js 91.16 KB 89.73 KB -1.43 KB (-1.57%)
async_hooks.html 158.37 KB 157.03 KB -1.34 KB (-0.85%)
errors.html 456.71 KB 455.44 KB -1.28 KB (-0.28%)
path.html 137.70 KB 136.45 KB -1.25 KB (-0.90%)
cluster.html 194.42 KB 193.44 KB -999.00 B (-0.50%)
webcrypto.html 527.96 KB 526.99 KB -997.00 B (-0.18%)
domain.html 103.74 KB 102.77 KB -988.00 B (-0.93%)
punycode.js 28.37 KB 27.48 KB -906.00 B (-3.12%)
querystring.js 31.10 KB 30.25 KB -874.00 B (-2.74%)
wasi.js 42.42 KB 41.69 KB -745.00 B (-1.72%)
single-executable-applications.js 86.36 KB 85.63 KB -741.00 B (-0.84%)
punycode.html 61.90 KB 61.24 KB -672.00 B (-1.06%)
tracing.js 77.49 KB 76.84 KB -670.00 B (-0.84%)
modules.js 151.40 KB 150.77 KB -645.00 B (-0.42%)
querystring.html 62.67 KB 62.05 KB -640.00 B (-1.00%)
repl.js 210.16 KB 209.58 KB -588.00 B (-0.27%)
wasi.html 68.24 KB 67.70 KB -550.00 B (-0.79%)
single-executable-applications.html 105.61 KB 105.08 KB -546.00 B (-0.50%)
tracing.html 82.98 KB 82.48 KB -514.00 B (-0.60%)
modules.html 176.86 KB 176.38 KB -489.00 B (-0.27%)
string_decoder.js 31.45 KB 30.99 KB -470.00 B (-1.46%)
string_decoder.html 54.28 KB 53.94 KB -353.00 B (-0.64%)
permissions.js 28.57 KB 28.41 KB -165.00 B (-0.56%)
esm.js 137.88 KB 137.73 KB -148.00 B (-0.10%)
styles.css 137.01 KB 136.87 KB -147.00 B (-0.10%)
permissions.html 53.92 KB 53.80 KB -126.00 B (-0.23%)
esm.html 152.66 KB 152.56 KB -109.00 B (-0.07%)
repl.html 180.18 KB 180.12 KB -64.00 B (-0.03%)

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 web (JSX AST) generator to make API headings and Table of Contents entries distinguish overloads by incorporating full signatures, reducing duplicate-looking headings/ToC items.

Changes:

  • Move method/ctor/classMethod signature rendering into the heading content (instead of a separate signature block).
  • Update ToC heading text extraction to use full heading text (e.g., including (urlObject)).
  • Remove now-obsolete .signature CSS and adjust the signature utilities/constants accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/generators/web/ui/index.css Removes styling for the old standalone signature block wrapper.
src/generators/jsx-ast/utils/signature.mjs Refactors signature rendering to produce heading content (shiki-highlighted) rather than an injected block.
src/generators/jsx-ast/utils/buildContent.mjs Uses signature heading content for method-like headings and removes the old insertion step.
src/generators/jsx-ast/utils/buildBarProps.mjs Updates ToC extraction to prefer full heading text (for overload distinction).
src/generators/jsx-ast/constants.mjs Adjusts which heading types are treated as having method signatures.

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

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Whilst I like the intent I utterly dislike the result design. And I believe this PR cannot proceed before w eproperly reassess and design this properly. That one liner code snippet always made sense to me, even if felt as it was duplicating the heading. Now, we need to redesign method headings, because this just looks ugly.

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.

Show full function in ToC Deduplicate Re-used Headers

3 participants