Skip to content

fix(badge): dynamic width from title length, drop 32-char ellipsis - #382

Merged
Flotapponnier merged 1 commit into
devfrom
feat/per-chain-bench-pages
Jun 10, 2026
Merged

fix(badge): dynamic width from title length, drop 32-char ellipsis#382
Flotapponnier merged 1 commit into
devfrom
feat/per-chain-bench-pages

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Badge canvas width is computed per request from the longest line (monospace advance is predictable), so full bench titles render without the trailing ellipsis
  • Bounded to 300..760px; titles that would exceed the cap still get an ellipsis at the computed budget instead of a fixed 32 chars

Test plan

  • Rendered the longest live title (rpc-capabilities, 74 chars) in headless Chrome: fits with margin before the OCB wordmark
  • tsc + bun test pass

@Flotapponnier
Flotapponnier merged commit 46ffa62 into dev Jun 10, 2026
1 check failed
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