-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: undo/redo Middleware #74
Conversation
🎊 PR Preview ff18649 has been successfully built and deployed to https://ant-design-pro-editor-preview-pr-74.surge.sh 🕐 Build time: 130.636s 🤖 By surge-preview |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #74 +/- ##
==========================================
+ Coverage 87.66% 87.69% +0.03%
==========================================
Files 338 349 +11
Lines 21815 22451 +636
Branches 977 1022 +45
==========================================
+ Hits 19124 19689 +565
- Misses 2691 2762 +71
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
## [Version 0.19.0-alpha.1](v0.18.1...v0.19.0-alpha.1) <sup>Released on **2023-09-05**</sup> #### ✨ 新特性 - Undo/redo Middleware. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * Undo/redo Middleware, closes [#74](#74) ([7699738](7699738)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.19.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [Version 0.21.0-alpha.1](v0.20.2...v0.21.0-alpha.1) <sup>Released on **2023-09-14**</sup> #### ✨ 新特性 - Undo/redo Middleware. #### 🐛 修复 - Fix compatible with subscribeWithSelector middleware. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * Undo/redo Middleware, closes [#74](#74) ([7699738](7699738)) #### What's fixed * Fix compatible with subscribeWithSelector middleware, closes [#89](#89) ([24ffb15](24ffb15)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.21.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* 🚧 wip: undo ing * ✨ feat: 初步实现 undo redo 方法 * ✨ feat: 支持多个 Store 共存的能力 * ✨ feat: 支持历史记录的操作明细 * ♻️ refactor: refactor the ProEditorProvider * ✅ test: fix test * 📝 docs: 更新 redo undo 文档 * 🏷️ feat: 兼容 internal type * ✅ test: update test * 📸 test: update snapshot * ✅ test: 补充测试 * 📝 docs: 补充使用文档 * 🚨 chore: fix lint * 📝 docs: 更新文档 * ⏪ chore: revert ProBuilder 的变更
## [Version 0.28.0-alpha.1](v0.27.0...v0.28.0-alpha.1) <sup>Released on **2023-11-24**</sup> #### ✨ 新特性 - Undo/redo Middleware. #### 🐛 修复 - Fix compatible with subscribeWithSelector middleware. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * Undo/redo Middleware, closes [#74](#74) ([44551aa](44551aa)) #### What's fixed * Fix compatible with subscribeWithSelector middleware, closes [#89](#89) ([b11cb36](b11cb36)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
## [Version 0.28.0](v0.27.0...v0.28.0) <sup>Released on **2023-11-24**</sup> #### ✨ 新特性 - Undo/redo Middleware. #### 🐛 修复 - Fix compatible with subscribeWithSelector middleware. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * Undo/redo Middleware, closes [#74](#74) ([44551aa](44551aa)) #### What's fixed * Fix compatible with subscribeWithSelector middleware, closes [#89](#89) ([b11cb36](b11cb36)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
背景
撤销重做是编辑器场景保障用户体验的一个重要特性。ProEditor作为编辑器框架需要提供原子化的能力支持。
现状
ProTableEditor 的撤销重做能力已经实现,但当前需要通过 ProBuilder 特定的使用方式才可以获取,缺少独立使用的方法。
因此需要将该能力抽取成独立使用的模式。
使用方式
初始化
多个 Store 使用的方式:
多 Store 撤销重做互相隔离
设定历史记录
实现效果