discourse/plugins/chat/test/javascripts
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
..
acceptance FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
components FEATURE: display last message on mobile (#25384) 2024-01-25 15:30:21 +01:00
helpers FEATURE: implements drafts for threads (#24483) 2023-11-22 11:54:23 +01:00
integration/components/user-menu DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
unit UI: ensures emojis are correctly aligned in reactions (#24814) 2023-12-11 14:29:16 +01:00
chat-fixtures.js DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00