fix(notifications): truncate X post attachment titles in notification list#5867
Merged
AmarTrebinjac merged 3 commits intomainfrom Apr 15, 2026
Merged
fix(notifications): truncate X post attachment titles in notification list#5867AmarTrebinjac merged 3 commits intomainfrom
AmarTrebinjac merged 3 commits intomainfrom
Conversation
… list Apply CSS line-clamp-3 to notification attachment titles for SourcePostAdded, UserPostAdded, and SquadPostAdded notification types. This prevents X post content from stretching the /notifications page vertically while preserving full text in the DOM for accessibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
@claude fix build errors |
Contributor
|
Claude finished @AmarTrebinjac's task in 15m 57s —— View job Fixed build errors
What was fixedThe
|
Fix 8 strict-mode TS errors exposed by typecheck_strict_changed CI step because the file was touched by this PR: - Icon(): change return type to ReactElement | null - label: return '' instead of null when notification is missing or copy is undefined (notificationMutingCopy is Partial, so lookup can return undefined) - NotificationItem: change return type to ReactElement | null - useObjectPurify call: use `description ?? ''` so the input object satisfies Record<string, string | Node> (no undefined values) Co-authored-by: Amar Trebinjac <AmarTrebinjac@users.noreply.github.com>
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.
Summary
line-clamp-3truncation to notification attachment titles forSourcePostAdded,UserPostAdded, andSquadPostAddednotification typesnotificationTypeprop fromNotificationItemdown toNotificationItemAttachmentto enable conditional stylingmulti-truncate line-clamp-3pattern already established inInAppNotificationItemand social card componentsKey decisions
PostType, so we scope by the three notification types that can produce X post attachments. For non-X posts under these types, article titles are naturally short and won't hit the 3-line clamp.line-clamp-3: Matches the existingInAppNotificationItempattern (~3 visible lines).Test plan
NotificationItem.spec.tsxtests passCloses ENG-1258
Created by Huginn 🐦⬛
Preview domain
https://eng-1258-truncate-x-notification.preview.app.daily.dev