discourse/plugins/chat/spec
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
..
components/chat DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
fabricators DEV: Redesign chat mentions (#24752) 2024-01-17 15:24:01 +04:00
integration DEV: Automatically update groups for test users with explicit TL (#25415) 2024-01-29 17:52:02 +08:00
jobs DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
lib FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
mailers DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
models DEV: Redesign chat mentions (#24752) 2024-01-17 15:24:01 +04:00
policies/chat/channel DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
queries/chat FIX: correctly exclude muted channels from thread unreads (#25339) 2024-01-19 22:05:41 +01:00
requests FIX: Always preload admin plugin list for admin in sidebar (#25606) 2024-02-09 12:52:22 +10:00
serializer DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
services DEV: Chat hashtag test (#25638) 2024-02-12 12:32:52 +10:00
support DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
system FEATURE: Async load of category and chat hashtags (#25526) 2024-02-12 12:07:14 +02:00
validators COPY: secure media -> secure uploads (#24643) 2023-11-30 14:58:55 +10:00
plugin_helper.rb FEATURE: implements drafts for threads (#24483) 2023-11-22 11:54:23 +01:00
plugin_spec.rb COPY: secure media -> secure uploads (#24643) 2023-11-30 14:58:55 +10:00