-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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: add gap cursor for top-level block nodes in default editor #6103
feat: add gap cursor for top-level block nodes in default editor #6103
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6103 +/- ##
============================================
- Coverage 56.91% 55.04% -1.88%
- Complexity 3319 3490 +171
============================================
Files 587 635 +48
Lines 18968 21388 +2420
Branches 1401 1496 +95
============================================
+ Hits 10795 11772 +977
- Misses 7594 9010 +1416
- Partials 579 606 +27 ☔ View full report in Codecov by Sentry. |
e48b24e
to
de84822
Compare
de84822
to
357bf34
Compare
…-node-card-placeholder
…-node-card-placeholder
…-node-card-placeholder
…-node-card-placeholder
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
/area editor
/milestone 2.17.x
What this PR does / why we need it:
目前想对块级节点进行换行是一件比较困难的事情,尤其是两个相邻的块级节点之间的想插入额外的一行时更加困难。间隙光标可以解决这一问题。
为默认编辑器的顶级块节点(pos.depth = 1)增加间隙光标的功能。当 NodeType 属性
allowGapCursor
为 true 时,将会在目标节点上启用间隙光标的功能。间隙光标将可能出现在目标节点的左上方与右下方。已知问题:
4. 首行空文本无法被删除(与 Gap Cursor 问题无关,待适配 Paragraph)5. 删除文本上方有可以添加间隙光标的块级节点时,无法触发间隙光标的 Backspace 事件(同 4,属于 Paragraph 适配问题)目前已经启用此功能的节点:
How to test it?
测试间隙光标是否能够在表格与分栏卡片上出现。
测试间隙光标出现后,输入文本、使用快捷键等操作是否符合逻辑。
测试使用方向键调整间隙光标位置。
Does this PR introduce a user-facing change?