Skip to content

feat: Allow replacing custom emoji image#11998

Merged
tommoor merged 5 commits into
mainfrom
tommoor/replace-emoji-upload
Apr 10, 2026
Merged

feat: Allow replacing custom emoji image#11998
tommoor merged 5 commits into
mainfrom
tommoor/replace-emoji-upload

Conversation

@tommoor

@tommoor tommoor commented Apr 10, 2026

Copy link
Copy Markdown
Member

ref #11995

tommoor and others added 3 commits April 10, 2026 11:20
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>
@tommoor tommoor marked this pull request as ready for review April 10, 2026 22:23
Copilot AI review requested due to automatic review settings April 10, 2026 22:23
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.update API 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 cacheKey support to CustomEmoji and pass updatedAt to 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.

Comment thread server/routes/api/emojis/emojis.ts Outdated
Comment thread server/routes/api/emojis/emojis.ts Outdated
Comment thread app/components/EmojiDialog/Components.tsx
Comment thread app/components/EmojiDialog/Components.tsx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tommoor tommoor merged commit fb9f4bb into main Apr 10, 2026
16 checks passed
@tommoor tommoor deleted the tommoor/replace-emoji-upload branch April 10, 2026 22:52
NoWauu pushed a commit to NoWauu/outline that referenced this pull request May 12, 2026
* feat: Allow replacing custom emoji image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants