pref: refactor default editor video block upload logic
What type of PR is this?
/kind improvement /area console /area editor /milestone 2.13.x
What this PR does / why we need it:
重构默认编辑器视频组件。使其支持上传、取消上传、从附件库选择、替换等功能。
How to test it?
直接拖动、复制或选择文件上传一个视频,查看是否显示上传进度条,取消、重试功能是否正常
Which issue(s) this PR fixes:
Fixes #5240
Does this PR introduce a user-facing change?
重构编辑器视频组件的上传逻辑,增加选择文件上传、上传进度条、取消、重试等机制。
@LIlGG: The provided milestone is not valid for this repository. Milestones in this repository: [2.11.x, 2.12.0, 2.12.x, Backlog]
Use /milestone clear to clear the milestone.
In response to this:
What type of PR is this?
/kind improvement /area console /area editor /milestone 2.13.x
What this PR does / why we need it:
重构默认编辑器视频组件。使其支持上传、取消上传、从附件库选择、替换等功能。
How to test it?
直接拖动、复制或选择文件上传一个视频,查看是否显示上传进度条,取消、重试功能是否正常
Which issue(s) this PR fixes:
Fixes #5240
Does this PR introduce a user-facing change?
重构编辑器视频组件的上传逻辑,增加选择文件上传、上传进度条、取消、重试等机制。
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 56.90%. Comparing base (
5fdf6c0) to head (51b716f). Report is 25 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5302 +/- ##
============================================
- Coverage 56.91% 56.90% -0.01%
+ Complexity 3319 3315 -4
============================================
Files 587 587
Lines 18968 18953 -15
Branches 1401 1399 -2
============================================
- Hits 10795 10785 -10
+ Misses 7594 7588 -6
- Partials 579 580 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quality Gate passed
Issues
0 New issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Hi @LIlGG ,当上传完视频后,点击替换按钮之后无法再次返回到之前的视频。建议加上一个返回的按钮。
目前这块的逻辑与上传图片是一样的。而且使用 mod + z 就能返回到替换之前的视频。
实际上这块应该是点击替换时,弹出上传或附件库的按钮,正常情况不应该直接移除。此 PR 为了与上传图片保持一致,因此没做此处的修改。
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JohnNiang, ruibaby
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~ui/OWNERS~~ [JohnNiang,ruibaby]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment