Skip to content

Truncate long source names so the card footer doesn't relayout - #12

Merged
philoking merged 1 commit into
mainfrom
fix-source-name-truncation
Jun 28, 2026
Merged

philoking merged 1 commit into
mainfrom
fix-source-name-truncation

Conversation

@philoking

Copy link
Copy Markdown
Owner

Problem

A long outlet name like "Digital Photography School" wraps the source line to two lines in a card footer. That grows the footer height and pushes the Read later / Done buttons down, causing visible vertical misalignment across the Latest grid (and the same footer is shared by the hero lead and side cards).

Fix

In digest.html:

  • srcLine() — wrap the outlet name in its own .src-name span and keep the relative time (· 2h) as a separate, pinned element.
  • CSS — .src becomes a baseline flex row with min-width: 0 so it can shrink; .src-name truncates to one line with an ellipsis; .src time and .card-actions get flex-shrink: 0 so the time and action buttons never compress or wrap.

Now a long source renders as Digital Photography Sch… · 2h on a single line and the action buttons stay put. One footer fix covers all three layouts (hero lead, hero side, Latest grid) since they share srcLine() / cardActions().

Note

The separator dot now lives inside the <time> element, so it picks up the slightly lighter time color (--text3) instead of the source color (--text2) — a minor, intentional cosmetic shift.

🤖 Generated with Claude Code

A long outlet name (e.g. "Digital Photography School") wrapped the source
line to two lines, growing the footer height and shoving the Read later /
Done buttons down — visible misalignment across the Latest grid.

Make the source name truncate to one line with an ellipsis, keep the
relative time pinned and visible, and lock the action buttons against
shrinking. Applies to all three footers (hero lead, hero side, grid) since
they share srcLine()/cardActions().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@philoking
philoking merged commit 2043afd into main Jun 28, 2026
2 checks passed
@philoking
philoking deleted the fix-source-name-truncation branch June 28, 2026 03:33
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