web: truncate overlong location text (search rows + detail headers)#26
Merged
Conversation
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>
Code Metrics Report
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some exchanges store a comma-separated list of cities in the upstream
cityfield. IX 3958 ("1-IX EU") lists eleven cities (~95 chars). That unconstrained value:shrink-0metadata block on the same line as the name, so it expanded and squashed the truncatable name out of the row.Fix
max-w-[12rem]) with ellipsistruncate.min-w-0 truncateso the flex item shrinks and ellipsizes to the available width.Both carry the full value in a
titleattribute (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 runpass;go generate ./...drift-clean (only the two edited templates).🤖 Generated with Claude Code