feat: Allow replacing custom emoji image#11998
Merged
Merged
Conversation
Reduce dropzone placeholder text size, fix i18n colon issue with Trans component, and change submit button to "Save". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for replacing an existing custom emoji’s image (server API + client UI), including cache-busting to ensure updated images display immediately.
Changes:
- Add
emojis.updateAPI endpoint + validation schema and policy support for updating emojis. - Introduce new client dialogs/components for emoji creation and image replacement, and wire “Replace” into emoji action menus.
- Add
cacheKeysupport toCustomEmojiand passupdatedAtto refresh the preview after replacement.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/i18n/locales/en_US/translation.json | Adds new UI strings for replace/upload flows and a new success message. |
| shared/components/CustomEmoji.tsx | Adds optional cacheKey query param to bust cached emoji redirects. |
| server/routes/api/emojis/schema.ts | Adds EmojisUpdateSchema + request type. |
| server/routes/api/emojis/emojis.ts | Implements emojis.update to swap the attachment and delete the old one. |
| server/routes/api/emojis/emojis.test.ts | Adds API tests covering auth and authorization scenarios for updates. |
| server/policies/emoji.ts | Extends emoji policy to include update alongside delete. |
| app/stores/EmojiStore.ts | Enables RPCAction.Update for emojis store. |
| app/scenes/Settings/components/EmojisTable.tsx | Passes updatedAt as cacheKey so emoji previews refresh after updates. |
| app/hooks/useEmojiMenuActions.tsx | Adds a “Replace…” action (when permitted) that opens the replace dialog. |
| app/components/IconPicker/components/EmojiPanel.tsx | Updates import path for emoji create dialog after refactor. |
| app/components/EmojiDialog/EmojiReplaceDialog.tsx | New dialog to upload a new image and call emojis.update. |
| app/components/EmojiDialog/EmojiCreateDialog.tsx | Refactored create dialog using shared upload/dropzone utilities. |
| app/components/EmojiDialog/Components.tsx | New shared hook + dropzone UI for emoji file selection/validation. |
| app/components/EmojiCreateDialog.tsx | Removes the old create dialog implementation (moved/refactored). |
| app/actions/definitions/emojis.tsx | Updates action definition to use the new create dialog path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NoWauu
pushed a commit
to NoWauu/outline
that referenced
this pull request
May 12, 2026
* feat: Allow replacing custom emoji image
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.
ref #11995