discourse/plugins/chat/spec/lib/chat
Bianca Nenciu 1403217ca4
FEATURE: Async load of category and chat hashtags (#25526)
This commit includes several changes to make hashtags work when "lazy
load categories" is enabled. The previous hashtag implementation use the
category colors CSS variables, but these are not defined when the site
setting is enabled because categories are no longer preloaded.

This commit implements two fundamental changes:

1. load colors together with the other hashtag information

2. load cooked hashtag data asynchronously

The first change is implemented by adding "colors" to the HashtagItem
model. It is a list because two colors are returned for subcategories:
the color of the parent category and subcategory.

The second change is implemented on the server-side in a new route
/hashtags/by-ids and on the client side by loading previously unseen
hashtags, generating the CSS on the fly and injecting it into the page.

There have been minimal changes outside of these two fundamental ones,
but a refactoring will be coming soon to reuse as much of the code
and maybe favor use of `style` rather than injecting CSS into the page,
which can lead to page rerenders and indefinite grow of the styles.
2024-02-12 12:07:14 +02:00
..
types DEV: Introduce an array type for Chat contracts (#22278) 2023-06-27 10:51:58 +10:00
channel_archive_service_spec.rb DEV: Remove TagGuardian#can_create_tag? fallback (#25535) 2024-02-02 13:48:53 +08:00
channel_fetcher_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
channel_hashtag_data_source_spec.rb FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
channel_membership_manager_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
duplicate_message_validator_spec.rb
guardian_extensions_spec.rb DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
message_bookmarkable_spec.rb SECURITY: Filter unread bookmark reminders the user cannot see 2023-11-09 13:39:16 +11:00
message_mover_spec.rb DEV: Redesign chat mentions (#24752) 2024-01-17 15:24:01 +04:00
message_processor_spec.rb
message_reactor_spec.rb DEV: check if user can_chat inside the can_join_chat_channel guardian (#21812) 2023-07-19 21:55:00 +04:00
messages_exporter_spec.rb FIX: Chat messages exporter (#25461) 2024-01-30 18:37:11 +04:00
notifier_spec.rb DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
onebox_handler_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
parsed_mentions_spec.rb FIX: Do not notify users for quoted mentions in chat (#24902) 2023-12-14 15:39:28 -03:00
post_notification_handler_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
pretty_text_spec.rb FIX: Allow quoting thread's original message (#24773) 2023-12-11 09:58:00 -03:00
review_queue_spec.rb DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
slack_compatibility_spec.rb
statistics_spec.rb DEV: Add new chat metrics (#23872) 2024-01-04 16:10:03 +04:00
steps_inspector_spec.rb DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
transcript_service_spec.rb FIX: Do not display chat replies as threads in transcripts (#24768) 2023-12-15 09:50:43 -03:00