Skip to content

fix(website): keep diagnostic count next to rule name on narrow widths#181

Merged
aidenybai merged 1 commit into
mainfrom
cursor/fix-floating-numbers-b17e
May 9, 2026
Merged

fix(website): keep diagnostic count next to rule name on narrow widths#181
aidenybai merged 1 commit into
mainfrom
cursor/fix-floating-numbers-b17e

Conversation

@aidenybai
Copy link
Copy Markdown
Member

Problem

On the website's terminal demo, the per-rule occurrence counts (×5, ×12, etc.) appear to "float" on their own row, far away from the rule name they belong to, on narrow viewports (mobile).

The cause: rule names were padded to a fixed 42-char column with non-breaking spaces so the counts visually right-aligned into a column. When the rule name itself wrapped on a narrow screen, that long run of non-breaking spaces pushed the count to the right edge of a new line, creating the floating effect.

Fix

  • Drop the fixed-width column padding (padRuleName / RULE_NAME_COLUMN_WIDTH).
  • Place the count immediately after the rule name, joined by a single non-breaking space so they always wrap together as one unit.

The desktop terminal aesthetic is preserved (count still flows inline after the rule name), and on mobile the count now stays glued to the rule name instead of being shoved to the right edge.

Open in Web Open in Cursor 

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

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

Project Deployment Actions Updated (UTC)
react-doctor-website Ready Ready Preview, Comment May 8, 2026 11:48pm

@aidenybai aidenybai marked this pull request as ready for review May 9, 2026 02:39
@aidenybai aidenybai merged commit 4e55426 into main May 9, 2026
5 of 6 checks passed
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.

2 participants