Implement native MSC2545 image packs, space-level pack management, and instant preloading - #34863
Open
guillemo12 wants to merge 1 commit into
Open
Implement native MSC2545 image packs, space-level pack management, and instant preloading#34863guillemo12 wants to merge 1 commit into
guillemo12 wants to merge 1 commit into
Conversation
…nt, and instant preloading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
I have read through review guidelines and
CONTRIBUTING.md.
Tests written for new code (and old code if feasible).
New or updated
public/exportedsymbols have accurate TSDoc documentation.Linter and other CI checks pass.
I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.
io/element-hq/element-web)
Summary
Replaces the legacy widget-based sticker picker with a native Matrix implementation of MSC2545 (Image Packs for Emoticons
and Stickers), adding space-level sticker pack management, hierarchical inheritance across nested spaces, background
preloading for instant sticker display, and reliable pack deletion.
What & Why
Native MSC2545 Image Packs (
ImagePackStore.ts,ImagePacksPicker.tsx): Full implementation of the MSC2545specification for emoticons and stickers. Emoticons can be inserted as shortcodes into the composer, and stickers are sent as
native
m.stickerevents.Space-Level Sticker Management (
SpaceSettingsStickersTab.tsx): Adds a dedicated "Stickers & Emotes" tab to SpaceSettings, allowing space administrators to create, edit, upload, and delete sticker/emoticon packs directly in spaces.
Hierarchical Space Inheritance: As recommended in MSC2545, child rooms and sub-spaces recursively inherit sticker
packs from parent spaces and ancestors in the space tree.
Background Preloading: Sticker images and avatar thumbnails are prefetched asynchronously into the browser cache on
room change and on button hover, completely eliminating image pop-in/lag when opening the picker.
Reliable Pack Deletion & Room Targeting: Deletion targets the pack's originating space/room rather than the active
chat room, preventing accidental sibling deletions. Replaced native dialogs with standard
QuestionDialogmodals.Backwards Compatibility: Listens and dual-publishes to both standard
m.room.image_packand legacyim.ponies. room_emotes.Notes: Implement native MSC2545 image packs support for stickers and emoticons, space-level management, and instant
background preloading.
Testing Strategy
images.
m.stickerinto the chat timeline.QuestionDialogmodal appears and cleans up stateproperly.