Skip to content
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

Unable to input after deleting columns in the table under the list item #11085

Closed
3 tasks done
LoneFireBlossom opened this issue Apr 18, 2024 · 23 comments
Closed
3 tasks done
Assignees
Labels
Milestone

Comments

@LoneFireBlossom
Copy link

LoneFireBlossom commented Apr 18, 2024

列表嵌套表格块,对表格块进行删除操作后无法在此行进行输入,与理想情况不符

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

删除表格的操作:反复使用右键菜单的「删除列」。
CleanShot 2024-04-19 at 01 15 15

Expected result

理想情况是把表格全删掉后这一行立刻变回没有任何东西插入时的宽度,然后可以输入文字。
现实与理想情况不符。

建议是在列表上至少显示表格块块标,这样用块标来删除表格(如 建议在多个块发生嵌套时将所有类型的块标都显示出来 - wxtgood 的回帖 - 链滴
不对,这样还是会删掉整个列表

又或者是可以选中表格的一部分/全部后使用Delete键就可以删除,不需要通过右键菜单;全部删除后直接变成非嵌套块

Screenshot or screen recording presentation

No response

Version environment

- Version: 3.0.10
- Operating System: macOS
- Browser (if used): 13.6.6

Log file

.

More information

No response

@88250
Copy link
Member

88250 commented Apr 21, 2024

  • 使用 Esc 可以选中当前块,然后 Del/Backspace 就能删除了
  • 在列表项下如果只有一个子块,则删除该子块后父块(列表项)也会被一并删除;如果有多个子块,则仅删除选中的子块
issue.webm
issue1.webm

@88250 88250 closed this as completed Apr 21, 2024
@88250
Copy link
Member

88250 commented Apr 21, 2024

对了,多次删除列不可输入的情况 @Vanessa219 看一下。

@88250 88250 reopened this Apr 21, 2024
@88250 88250 added the Bug label Apr 21, 2024
@88250 88250 added this to the 3.0.11 milestone Apr 21, 2024
@88250 88250 changed the title 列表嵌套表格块,对表格块进行删除操作后无法在此行进行输入,与理想情况不符 Unable to input after deleting columns in the table under the list item Apr 21, 2024
@LoneFireBlossom
Copy link
Author

  • 使用 Esc 可以选中当前块,然后 Del/Backspace 就能删除了

我知道这个操作理论上可行,但是现实里这么删掉的话这一个列表项就没了,那么这个列表项块的ID就没了。如果这个列表项块有引用呢?我如果用这个方法删的话,我所有的引用就都失效了啊,所以得需要一个只删掉表格,但是这个列表项块还存在的方法

@88250
Copy link
Member

88250 commented Apr 21, 2024

删除前可以通过引用计数判断是否有引用。

是否能保留父块列表项得 @Vanessa219 看看。

@LoneFireBlossom
Copy link
Author

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Apr 21, 2024

是否能保留父块列表项得 @Vanessa219 看看。

我发现这个问题不止是对表格块,对其它情况也是如此:
对列表里的标题块、代码项块、嵌入块进行删除操作,这个列表也会随之消失。
CleanShot 2024-04-21 at 19 57 23

这符合用户直觉吗?我认为不符合。
不知道这是否符合开发者的设计意图?

@88250
Copy link
Member

88250 commented Apr 21, 2024

得考虑一下,这个可能已经有用户习惯这样用了。

@LoneFireBlossom
Copy link
Author

没看懂,用户要删列表块的话,点列表项的块标右键菜单啊,不会点这个菜单的,怎么会有用户习惯这么用呢

@88250
Copy link
Member

88250 commented Apr 21, 2024

我指的是删除列表项下唯一子块的时候连同列表项一并删除。

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Apr 21, 2024

要是这样的话,那我考虑提一个更复杂但是(在某种程度上)更合乎直觉的实现方案

对下面这个列表项块,光标在段落块2
image

按ESC效果与以前一样,选中范围为:
image
此时按删除键就删除这个段落块。
这更符合直觉,因为在视觉上只有段落块被选中了,前面的编号并没有被选中。(这句话是核心)

再按一次ESC,选中范围为列表项块,也就是这个列表项块底色变了,变成强调色了:
(注意此时列表项的编号也被选中了,这样更符合直觉)
image
此时按删除键就删除这个列表项块。

再按一次ESC,选中范围为整个列表块,也就是这个列表块底色变了,变成强调色了:
image
此时按删除键就删除这个列表块。

这个逻辑就像onenote里选中表格的逻辑,反复按ctrl+A,选中的区域回从当前文本-当前格子-当前行-整个表格逐渐扩展:

CleanShot.2024-04-21.at.21.59.31.mp4

@88250
Copy link
Member

88250 commented Apr 21, 2024

现在有这个逻辑,不过用的不是多次 Esc,而是 Shift+↑,这个快捷键的作用就是往上级扩选,从子块逐层扩选父块。

@LoneFireBlossom
Copy link
Author

哦哦,才知道。
那提案:

  1. 让ESC键实现上述“从子块逐层扩选父块”的功能。
    理由:目前ESC键的作用是“按一下选中光标所在的叶子(?)块,再按一下取消选中”。这个「再按一下取消选中」我觉得没有任何用处,因为有同样十分简易的方式来取消选中:随便打个字就行了。
  2. 使用ESC选中一个块后,如果使用方向键也会取消选中。
    理由:第一,将这也作为一个“取消选中”的方式。第二,「使用ESC键选中块时候再使用方向键」这种操作没什么实际使用场景吧?完全可以不要这个功能。

Vanessa219 added a commit that referenced this issue Apr 21, 2024
@88250
Copy link
Member

88250 commented Apr 21, 2024

@Vanessa219

@Vanessa219
Copy link
Member

这个是参照 notion 的,实际用下来也觉得很方便的。

@LoneFireBlossom
Copy link
Author

得考虑一下,这个可能已经有用户习惯这样用了。

只要ESC键有“从子块逐层扩选父块”的功能,那么有原有使用习惯的用户只需要从「按一次ESC键」变为「按两次ESC键」。我觉得这是非常好改的习惯——快速按两次ESC键非常容易,而且还有附带的体验优化:
第一,可以只删除子块了。
第二,按ESC键选中的区域更清晰、直观、容易理解了(按一下子块区域被高亮;按两下列表块区域被高亮),根据被高亮的区域范围,可以明确知道「自己按ESC键的话,哪一块区域会被删掉」。

@LoneFireBlossom
Copy link
Author

这个是参照 notion 的,实际用下来也觉得很方便的。

notion的列表完全比不上思源的,思源能嵌套,notion的只能写纯文本、不能一个编号后面跟多个段落块。
因为更高级更强大,所以要完善的方面、要配套的措施也更多、更复杂😂

@88250
Copy link
Member

88250 commented Apr 21, 2024

Esc 取消选块的逻辑也有人在用,这个不可能改了,该用 Shift+↑ 就用吧。

@LoneFireBlossom
Copy link
Author

Esc 取消选块的逻辑也有人在用,这个不可能改了,该用 Shift+↑ 就用吧。

ESC取消选块有什么使用场景吗……?我想象不出来

@88250
Copy link
Member

88250 commented Apr 21, 2024

……我举个例子,选择了一个块时,如果没有 Esc 取消选中,假设用你说的方向键,那么如何在多个块之间切换?

@LoneFireBlossom
Copy link
Author

"在多个块之间切换"是何意?

@88250
Copy link
Member

88250 commented Apr 21, 2024

issue.webm

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Apr 21, 2024

issue.webm

想了一下理解了,这是给别人演示用的吧?一边讲解一边切换高亮的区域,自己用的话没有这种场景

@88250
Copy link
Member

88250 commented Apr 21, 2024

演示的话可能也需要,但主要还是用于取消选中后切换光标位置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants