0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/chat/spec/system
David Battersby 9335e71f81
FIX: dynamic highlighting of self mentions (#37321)
## Issue

When we open a chat channel we can see that any mentions of our own
username is highlighted, but any new mentions of our username after that
point is not highlighted.

This is due to how user mentions are upserted as part of a background
job when a message is sent, but we return the message bus response
straight away, meaning that we don't have the mentioned user info to
apply the `--current-user` class for styling for self mentions.

## The Solution

This change adds dynamic styling of the current user mentions by adding
the style rules to the page header based on their username. So the
dynamic style will look like:

```js
.mention[href="/u/johndoe"] { background: var(--tertiary-400); }
```

This works for both mentions in posts/topics and chat. Now we no longer
rely on applying a `--current-user` class.

Internal ref - /t/173085
2026-01-28 14:59:48 +04:00
..
admin DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
chat/composer FIX: emoji autocomplete should not trigger if a whitespace is added at cursor (#36131) 2025-11-21 10:37:04 +08:00
chat_channel_search UX: show search button on DMs and Threads tabs (#36133) 2025-11-20 11:39:28 +01:00
chat_message FIX: remove chat action buttons for non channel members (#37060) 2026-01-12 16:42:19 +04:00
drawer UX: Hide "My Threads" when user has no threads (#36931) 2026-01-21 10:56:24 +01:00
list_channels UX: Hide "My Threads" when user has no threads (#36931) 2026-01-21 10:56:24 +01:00
page_objects FIX: remove chat action buttons for non channel members (#37060) 2026-01-12 16:42:19 +04:00
reply_to_message DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
select_message DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
shortcuts FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
thread_list DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
thread_tracking FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
user_menu_notifications DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_status DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
about_page_site_acitivity_spec.rb FEATURE: Enable the new /about page for everyone (#29390) 2024-10-29 18:40:11 +03:00
admin_search_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_sidebar_navigation_spec.rb FIX: remove admin_sidebar_enabled_groups setting (#31693) 2025-03-11 11:41:38 +11:00
anonymous_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
archive_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
bookmark_message_spec.rb FIX: notification reminder is deleted with bookmark (#35141) 2025-10-03 08:34:19 +02:00
browse_page_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
channel_members_page_spec.rb FIX: hide group chat buttons when not supported (#37084) 2026-01-14 09:43:57 +04:00
channel_message_upload_spec.rb DEV: remove magnific lightbox (#36375) 2025-12-03 09:57:53 +04:00
channel_notice_spec.rb FIX: use group name in unreachable mention warning (#34174) 2025-08-14 09:33:51 +04:00
channel_settings_page_spec.rb FEATURE: chat channel emojis (#36288) 2025-11-28 10:09:08 +04:00
channel_thread_message_echoing_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
chat_channel_sidebar_context_menu_spec.rb FIX: Unfollow not leave DM/group DM channels in chat sidebar menu (#37165) 2026-01-16 10:07:17 +01:00
chat_channel_spec.rb FIX: dynamic highlighting of self mentions (#37321) 2026-01-28 14:59:48 +04:00
chat_composer_draft_spec.rb DEV: Skip flaky system test (#34895) 2025-09-22 14:00:59 +08:00
chat_composer_spec.rb DEV: remove toggles for switching between jquery & floatkit autocomplete (#34867) 2025-09-19 14:50:04 +08:00
chat_footer_spec.rb UX: Hide "My Threads" when user has no threads (#36931) 2026-01-21 10:56:24 +01:00
chat_message_creator_spec.rb FIX: hide group chat buttons when not supported (#37084) 2026-01-14 09:43:57 +04:00
chat_message_interaction_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
chat_message_onebox_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
chat_new_message_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
chat_search_spec.rb DEV: Add optional clear button to FilterInput component (#35569) 2025-10-23 12:39:37 +02:00
closed_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
create_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
dates_separators_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
deleted_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
deleted_message_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
document_title_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
drawer_spec.rb UX: Hide "My Threads" when user has no threads (#36931) 2026-01-21 10:56:24 +01:00
edited_message_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
flag_message_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
hashtag_autocomplete_spec.rb FIX: Hashtag icon for style_type=icon not showing in rich editor (#35786) 2025-11-05 16:52:38 +10:00
invite_users_to_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
kick_user_from_channel_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
last_visit_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
mention_warnings_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
message_errors_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
message_notifications_mobile_spec.rb FIX: hides redundant chat icon on mobile chat routes (#35015) 2025-10-01 22:34:15 +08:00
message_notifications_with_sidebar_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
message_thread_indicator_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
message_user_info_spec.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
move_message_to_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
navigation_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
react_to_message_spec.rb FIX: ensures quick reactions usage shows in frequently (#34798) 2025-09-15 07:48:22 +02:00
read_only_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
restore_message_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
reviewables_spec.rb UX: enable refreshed review page (#36711) 2025-12-16 13:51:48 +08:00
rich_editor_extension_transcript_spec.rb SECURITY: Rich editor chat transcript XSS 2025-09-30 10:09:43 +08:00
send_message_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
separate_sidebar_mode_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
sidebar_navigation_menu_spec.rb FIX: Convert emoji codes in group DM channel titles (#37244) 2026-01-21 20:59:43 +01:00
sidebars_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
silenced_user_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
single_thread_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
starred_channels_spec.rb FIX: redirect to channels list when no starred channels exist (#36575) 2025-12-10 08:20:31 +01:00
thread_preview_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
transcript_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
unfollow_dm_channel_spec.rb FEATURE: Hover menu for all chat channels in sidebar (#34727) 2026-01-05 10:59:00 +10:00
update_last_read_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
uploads_spec.rb DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
user_card_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_chat_preferences_spec.rb DEV: Migrate u/preferences/chat to formkit (#36583) 2025-12-19 12:25:32 -06:00
user_profile_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_threads_spec.rb UX: Hide "My Threads" when user has no threads (#36931) 2026-01-21 10:56:24 +01:00
visit_channel_spec.rb FIX: Convert emoji codes in group DM channel titles (#37244) 2026-01-21 20:59:43 +01:00