feat: add emoji factory for emoji config#3516
feat: add emoji factory for emoji config#3516SamuNatsu wants to merge 11 commits intowalinejs:mainfrom
Conversation
There was a problem hiding this comment.
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
WalineEmojiFactorytype 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.
|
Fix or explain to ai review first |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
LGTM, but maybe some small refactor. Let me enjoy the weekend and look deep into it Monday |
close #3515