Merge pull request #1038 from basecamp/highligh-notification-mentions

Highlight @mentions in notifications
This commit is contained in:
Jason Zimdars
2025-09-08 14:05:00 -05:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -400,6 +400,13 @@
text-transform: uppercase;
}
.card__notification-mentioner {
background-color: var(--color-highlight);
border-radius: 0.7em 0.2em 0.7em 0.2em;
display: inline-flex;
padding: 0.1em 0.3em;
}
.card__title {
font-size: var(--text-small);
font-weight: bold;
@@ -1,6 +1,6 @@
<% mention = notification.source %>
<strong class="card__title overflow-ellipsis"><%= mention.mentioner.first_name %> mentioned you</strong>
<strong class="card__title overflow-ellipsis"><mark class="card__notification-mentioner"><%= mention.mentioner.first_name %> @mentioned you</mark></strong>
<div class="card__notification-body overflow-ellipsis">
<%= mention.source.mentionable_content.truncate(200) %>
</div>