feat(input): 统一 PathChipsInput 历史记录并修复图片预览回退#185
Merged
Conversation
此前输入框只能稳定撤回文本输入,普通 Chip、图片 Chip 与部分 引用操作的增删改没有接入统一历史;同时图片 Chip 在撤回后,其 blob 预览可能已被上层释放并 revoke,导致缩略图与悬浮预览失效。 这次调整让输入框整体行为更符合编辑器的一致交互预期。 - 将 draft、普通 Chip、图片 Chip、规则 Chip 的增删改统一接入历史栈 - 记录并恢复光标/选区,接管 historyUndo/historyRedo,支持 Ctrl/Cmd+Z 与 Ctrl+Y/Cmd+Shift+Z - 让 Backspace 删除末尾 Chip、鼠标删除 Chip、@ 插入与粘贴图片都走统一撤回链路 - 在 blob 预览失效时自动回退到 Windows file URL,恢复缩略图与悬浮大图 - 合并 master 上已有的复制文件名按钮能力,并补齐组件测试覆盖复制按钮、撤回/重做与图片回退场景 验证: - npm run test - npm run i18n:check Signed-off-by: Lulu <58587930+lulu-sk@users.noreply.github.com>
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.
此前输入框只能稳定撤回文本输入,普通 Chip、图片 Chip 与部分
引用操作的增删改没有接入统一历史;同时图片 Chip 在撤回后,其
blob 预览可能已被上层释放并 revoke,导致缩略图与悬浮预览失效。
这次调整让输入框整体行为更符合编辑器的一致交互预期。
验证: