Skip to content

Implement native MSC2545 image packs, space-level pack management, and instant preloading - #34863

Open
guillemo12 wants to merge 1 commit into
element-hq:developfrom
guillemo12:feature/space-stickers-msc2545
Open

Implement native MSC2545 image packs, space-level pack management, and instant preloading#34863
guillemo12 wants to merge 1 commit into
element-hq:developfrom
guillemo12:feature/space-stickers-msc2545

Conversation

@guillemo12

@guillemo12 guillemo12 commented Aug 30, 2026

Copy link
Copy Markdown

Checklist

  • I have read through review guidelines and
    CONTRIBUTING.md.

  • Tests written for new code (and old code if feasible).

  • New or updated public/exported symbols 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 MSC2545
    specification for emoticons and stickers. Emoticons can be inserted as shortcodes into the composer, and stickers are sent as
    native m.sticker events.

  • Space-Level Sticker Management (SpaceSettingsStickersTab.tsx): Adds a dedicated "Stickers & Emotes" tab to Space
    Settings, 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 QuestionDialog modals.

  • Backwards Compatibility: Listens and dual-publishes to both standard m.room.image_pack and legacy im.ponies. room_emotes.

    Notes: Implement native MSC2545 image packs support for stickers and emoticons, space-level management, and instant
    background preloading.

Testing Strategy

  1. Open a Space settings dialog -> Navigate to the new "Stickers & Emotes" tab.
  2. Create a new sticker pack and upload images into it.
  3. Open any child room or nested sub-space belonging to that Space.
  4. Click the stickers/emotes button in the message composer: verify that all stickers appear instantly with preloaded
    images.
  5. Click a sticker to send it as m.sticker into the chat timeline.
  6. Open "Manage Image Packs" and delete a pack, confirming that the QuestionDialog modal appears and cleans up state
    properly.
03_chat_room_view 02_chat_sticker_picker 01_manage_image_packs_dialog

@guillemo12
guillemo12 requested a review from a team as a code owner August 30, 2026 14:21
@guillemo12
guillemo12 requested review from Half-Shot and dbkr August 30, 2026 14:21
@CLAassistant

CLAassistant commented Aug 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Aug 30, 2026
@t3chguy
t3chguy requested a review from a team September 1, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Enhancement Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants