Skip to content

feat(web): show API kind as icon badge in TOC - #1605

Merged
f15u merged 20 commits into
mainfrom
feat/api-kind-icons
Oct 9, 2026
Merged

f15u merged 20 commits into
mainfrom
feat/api-kind-icons

Conversation

@f15u

@f15u f15u commented Oct 7, 2026

Copy link
Copy Markdown
Member

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Replace trailing (interface)/(type) hints in the API reference table of contents with monochromatic letter badges (C/I/T/f/N/V) before the label, covering all six reflection kinds. Tighten the nested TOC indent on API module pages only.

Also restyle the declaration kind badge and the Signature label to match the landing typography spec (pill badge, muted mono scaffold label).

Related

  • Related Issue #
  • Closes #

f15u added 11 commits October 7, 2026 17:00
Replace trailing (interface)/(type) hints in the API reference
table of contents with monochromatic letter badges (C/I/T/f/N/V)
before the label, covering all six reflection kinds. Tighten the
nested TOC indent on API module pages only.

Also restyle the declaration kind badge and the Signature label
to match the landing typography spec (pill badge, muted mono
scaffold label).
Keep the landing pill look (rounded-full, bordered, mono uppercase)
but match ApiStabilityBadge metrics: text-[10px] leading-none,
tighter padding, so kind + stability badges align at equal height.
Byte-identical to the landing typography spec instead of the
theme-token approximation.
Kind pill back to text-[10px]/py-0.5 with tighter px-2; stability
badge gains a transparent border so both render at 16px. Verified
via Playwright screenshot + measured bounding boxes.
Both kind and stability badges: pill radius, 10px uppercase
micro-label, px-2.5 rhythm, 16px height. Matches common badge
patterns; verified via Playwright screenshot.
Kind pill renders only for interface/type again (was showing on
every title via declaration.kind); Example header uses the same
muted-mono scaffold label as Signature.
Pre-existing logic rendered every @stability value including
'stable'. Gate on unstable; dataset values are stable/unstable.
API_JSDOC_CLASS forced text-brand (from PR #1507); the shared
prose-effect treatment already styles links foreground +
underlined across blog/docs/API. Removing the override restores
one link treatment everywhere.
The declarations wrapper is not-prose, so prose-effect link CSS
never applied and PR #1507 utilities set emerald instead. Set the
same values as global prose links: foreground, medium, underline
4px, none on hover.
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Cloudflare Preview

URL: https://effectwebsite-websiteworker-pr-1605-jvjxoyzxfc3meqbe.matechs.workers.dev

Built from commit 3ebb62f.


This comment updates automatically with each deployment.

f15u added 9 commits October 7, 2026 18:39
Signature and Example labels lock to text-[12px]; example names
drop parens/muted-mono for normal prose text.
The declarations wrapper carried not-prose, which disabled all
prose element styles (p/ul/ol/li margins, list markers) for every
JSDoc comment. Drop the guard; add mt-0 to category h2s to keep
their space-y rhythm.
Position letters from viewBox center with dy 0.35em instead of a
fixed baseline, so cap-height centers on the badge box across
fonts. Measured: glyph center within 0.2 units of box center,
badge center within 0.01px of text center.
The 16px box centered on the 16.8px line box sits ~1px below the
glyph mass (measured via canvas cap metrics in JetBrains Mono).
-1px optical nudge.
Row uses items-center; badge is a plain centered flex box. Drops
the baseline/self-center combo and the translate nudge.
@f15u
f15u merged commit fafdb6c into main Oct 9, 2026
4 checks passed
@f15u
f15u deleted the feat/api-kind-icons branch October 9, 2026 12:28
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.

1 participant