Skip to content

feat: add emoji factory for emoji config#3516

Open
SamuNatsu wants to merge 11 commits intowalinejs:mainfrom
SamuNatsu:main
Open

feat: add emoji factory for emoji config#3516
SamuNatsu wants to merge 11 commits intowalinejs:mainfrom
SamuNatsu:main

Conversation

@SamuNatsu
Copy link
Copy Markdown
Contributor

close #3515

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an “emoji factory” capability to the client emoji configuration pipeline, enabling emoji configs to be provided as functions (sync/async) that can return either a single WalineEmojiInfo or a prebuilt { tabs, map } structure—supporting more flexible/custom emoji package setups (per #3515).

Changes:

  • Extend getEmojisInfo() to accept emoji factories and merge returned { tabs, map } into the final emoji config.
  • Introduce the WalineEmojiFactory type and propagate it through public option/prop typings.
  • Minor formatting adjustment in word limit normalization.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/client/src/utils/emoji.ts Accept emoji factories in getEmojisInfo() and merge factory-provided emoji configs.
packages/client/src/utils/config.ts Update WalineConfig.emoji typing to include emoji factories; reformat getWordLimit.
packages/client/src/typings/waline.ts Extend WalineProps.emoji typing to include emoji factories.
packages/client/src/typings/options.ts Extend WalineInitOptions.emoji typing to include emoji factories.
packages/client/src/typings/base.ts Add the WalineEmojiFactory type definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mister-Hope
Copy link
Copy Markdown
Member

Fix or explain to ai review first

SamuNatsu and others added 4 commits March 28, 2026 10:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Mister-Hope and others added 2 commits March 28, 2026 20:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Mister-Hope
Copy link
Copy Markdown
Member

LGTM, but maybe some small refactor. Let me enjoy the weekend and look deep into it Monday

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.

[Feature]: 改进表情包系统 || [Feature]: Improve the emoticon package system

3 participants