discourse/plugins/chat/spec/system
Martin Brennan a51ce45508
FIX: Hashtag icon for style_type=icon not showing in rich editor (#35786)
When selecting a chat channel or a category with style_type=icon
from the hashtag autocomplete in the rich editor, the icon
was not being displayed correctly.

This was happening because when we reused the cache for hashtags
in a61009284e, it exposed an earlier
issue made in d06c60ca7c where we
override the `icon` property of the hashtag in the response
with the icon HTML.

Then, in the prosemirror hashtag extension, we would call
`hashtagTypeClass.generateIconHTML(validHashtag)`, which would
then do something like `iconHTML(hashtag.icon)`. But since
`hashtag.icon` was already the HTML, it would produce invalid HTML
similar to `<span class="d-icon-<span
class="d-icon-chat"></span>"></span>`.

This issue did not happen for style_type=emoji or style_type=square
because they had their own manual rendering methods.

The fix was to avoid overriding the `icon` property, instead storing
the icon HTML in a new property `iconHTML` in the hashtag object.
2025-11-05 16:52:38 +10:00
..
admin DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
chat/composer DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
chat_channel_search DEV: Add optional clear button to FilterInput component (#35569) 2025-10-23 12:39:37 +02:00
chat_message DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
drawer DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
list_channels FIX: fully hides section if user can't send dms (#35595) 2025-10-24 14:36:56 +02:00
page_objects FIX: fully hides section if user can't send dms (#35595) 2025-10-24 14:36:56 +02: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: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
thread_list DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
thread_tracking DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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 DEV: Skip a broken spec (#34742) 2025-09-05 11:32:29 +08:00
channel_message_upload_spec.rb DEV: enable new lightbox by default (#35625) 2025-10-27 17:07:08 +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: disable chat DM threads by default (#34840) 2025-09-17 16:52:13 +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_spec.rb FIX: fix scroll more chat spec (#35543) 2025-10-22 12:50:28 +02: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 FEATURE: disable chat DM threads by default (#34840) 2025-09-17 16:52:13 +04:00
chat_message_creator_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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 DEV: Fix & tidy html/body classes in chat (#33972) 2025-07-30 12:38:27 +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 DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
last_visit_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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: disable chat DM threads by default (#34840) 2025-09-17 16:52:13 +04: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 FIX: hides redundant chat icon on mobile chat routes (#35015) 2025-10-01 22:34:15 +08: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
removing_channel_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 DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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 DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
sidebar_navigation_menu_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
sidebars_spec.rb UX: Enable 'viewport based mobile mode' by default (#35036) 2025-09-29 19:46:52 +01: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 FIX: client based chat message timestamp (#34592) 2025-08-28 10:21:19 +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 DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03: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 DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
visit_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00