feat(tweets): 推文发布框与正文支持表情选择与内联渲染 - #249
Merged
Merged
Conversation
- TweetDTO 与 QuotedTweetDTO 增加 Emote 映射字段 - toDTOs 批量提取正文 [name] 占位符并通过 EmojiLookup 查表填充 - 补齐推文与引用推文 emote 富化的单测覆盖
- TweetComposer 增加 EmojiPicker 工具栏按钮,支持光标处插入表情占位符 - TweetContent 与 TweetCard 接入 emote 映射,支持内联表情图片与话题标签共存渲染 - 补齐 TweetComposer 与 TweetContent 表情渲染的单测覆盖
| created_at: string; | ||
| } | ||
|
|
||
| /** TweetEmoteRef - 推文表情映射值别名 */ |
There was a problem hiding this comment.
[轻微] 导出类型别名 TweetEmoteRef 上方的 JSDoc "TweetEmoteRef - 推文表情映射值别名" 仅是类型名语义复述,未补充代码自表达之外的信息(如 key 格式、与 TweetCommentEmoteRef 的关系、来源字段等)。
💡 修复计划 (Coding Plan)
删除该 JSDoc;如需保留说明,建议补充代码无法自表达的信息,例如它对应 TweetDTO.emote / QuotedTweetDTO.emote 的 value 类型,key 为 [name] 形式的占位符。
| const HASHTAG_REGEX = /#([^#\r\n]{1,50})#/g; | ||
|
|
||
| export interface TweetContentProps { | ||
| /** 推文正文 */ |
There was a problem hiding this comment.
[轻微] TweetContentProps 中 content: string 字段上的 /** 推文正文 */ 仅是字段名语义复述(父组件名 TweetContent 已暗示这是正文内容),不携带任何额外约束或来源说明。
💡 修复计划 (Coding Plan)
删除该 JSDoc;若仍有保留必要,写出代码无法自表达的内容(如"长度上限 500 rune,原样透传 TweetDTO.content")而非字段名直译。
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.
变更内容
TweetDTO与QuotedTweetDTO增加 Emote 表情富化支持,批量提取正文[name]占位符并通过 EmojiLookup 查表填充TweetComposer增加表情选择器入口,支持在光标位置插入表情占位符TweetContent与TweetCard接入 emote 映射,支持正文内联表情图片与话题标签共存渲染