Skip to content

web: truncate overlong location text (search rows + detail headers)#26

Merged
dotwaffle merged 2 commits into
mainfrom
truncate-overlong-location
Jun 8, 2026
Merged

web: truncate overlong location text (search rows + detail headers)#26
dotwaffle merged 2 commits into
mainfrom
truncate-overlong-location

Conversation

@dotwaffle

Copy link
Copy Markdown
Owner

Problem

Some exchanges store a comma-separated list of cities in the upstream city field. IX 3958 ("1-IX EU") lists eleven cities (~95 chars). That unconstrained value:

  • In search results, sat in the shrink-0 metadata block on the same line as the name, so it expanded and squashed the truncatable name out of the row.
  • On the detail page, was the header subtitle, which had no width constraint and overflowed.

Fix

  • Search-row city: width-capped (max-w-[12rem]) with ellipsis truncate.
  • Detail-header subtitle: min-w-0 truncate so the flex item shrinks and ellipsizes to the available width.

Both carry the full value in a title attribute (hover to see it in full). Normal short locations are unaffected. Rolls v1.20.3.

Verification

go build, go test -race ./... (web), go vet, golangci-lint run pass; go generate ./... drift-clean (only the two edited templates).

🤖 Generated with Claude Code

dotwaffle and others added 2 commits June 8, 2026 12:57
Some exchanges store a comma-separated list of cities in the upstream
`city` field rather than a single city. IX 3958 ("1-IX EU") lists eleven
cities (~95 characters). That value flowed into two places unconstrained:

  - In a search result row, the city sits in a shrink-0 metadata block on
    the same line as the entity name, so the long city expanded and
    squashed the truncatable name out of the row.
  - On a detail page, the same value is the header subtitle, which had no
    width constraint and overflowed.

Cap the search-row city at a fixed max width with ellipsis truncation,
and let the detail-header subtitle truncate to the available width
(min-w-0 so the flex item can shrink). Both carry the full value in a
`title` attribute so it remains available on hover. Normal short
locations are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Capture the overlong-location truncation fix for search rows and detail
headers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Code Metrics Report

Coverage Test Execution Time
80.9% 2m25s

Reported by octocov

@dotwaffle dotwaffle merged commit 1080cfb into main Jun 8, 2026
2 checks passed
@dotwaffle dotwaffle deleted the truncate-overlong-location branch June 8, 2026 13:02
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