Skip to content

Improve traditional indentation when list items contain multiple blocks #9226

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

Closed
3 tasks done
LoneFireBlossom opened this issue Sep 19, 2023 · 13 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@LoneFireBlossom
Copy link

LoneFireBlossom commented Sep 19, 2023

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

一般情况下shift+tab一行列表,内容就是往左平移一级。
但是有的时候这一行内容(下面的c这一行)会直接跑到列表最下面去。
这可能是feature,也可能是bug,算是哪一种?

CleanShot 2023-09-20 at 01 03 46

Expected result

我希望应该和一般情况的操作逻辑保持统一。

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.10.6
- Operating System: macOS 13.5.2
- Browser (if used):

Log file

More information

No response

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Sep 19, 2023

再比如这个,上面这一行我忘了是怎么鼓捣出来的。
下面一行是直接在这里敲的没有调整就没问题。

CleanShot 2023-09-19 at 23 28 20

@LoneFireBlossom
Copy link
Author

经过群里讨论,我看懂思源这样设置的逻辑了。

但是我认为这样的操作结果
第一,不符合实际场景,
这样一段话自然是要顺着读下来的,意思一句接着一句,我想shift+tab不意味着我想把中间一句话给挪到最下面去。
如果1楼gif中的efghig部分不是只有4行而是有100行,那我在c处按shift+tab,c和d就直接跑到屏幕外面去了,我都不知道它们去哪了,如果不是整个页面上查找,就好像c和d被我删了一样。能cmd+z一步撤回不代表这个体验是好的。
我就是遇到了这样的场景,所以才花了好几个小时在测试到底什么原因。

第二,是一种特殊的设置。
「对1楼中的c shift+tab,c和d左移一级」是普通的、易于大众理解的设置。OneNote, Word都是这样的。
而思源的这种设置虽然有其原因(按我的理解,就是「块」的设计导致的),但这个逻辑是软件层面易用的,不是大众易于理解的。
按照块的逻辑,既然「列表项a」包含efghig,那么对c shift+tab就不应该导致「列表项a」的内容被截断。确实,我并不打算要截断。但我这样操作是在修改整块内容的表达逻辑,不需要软件帮我做决定。

@LoneFireBlossom
Copy link
Author

而且思源现在这种设计还会搞出2楼gif的情况。

希望能改动

@88250
Copy link
Member

88250 commented Sep 20, 2023

是不是开启了 设置 - 编辑器 - 列表大纲反向缩进 ?

@LoneFireBlossom
Copy link
Author

开启关闭都是这样,可以照着1楼的gif测试一下

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Sep 20, 2023

群里有人发的
我支持图中的禁用或者wolai的实现方式(如果是禁用的话,一定要抛出提示让用户知道为什么按快捷键没反应)

216b5ccbea71aa47a2cb944efa4312ea

@Vanessa219
Copy link
Member

一个列表块包含一个列表项块,而列表项块又包含了段落块。对c反向缩进导致其从列表块变为列表项块时,引用的列表块必然找不到,如果引用的是列表项块就没有问题。

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Sep 20, 2023

一个列表块包含一个列表项块,而列表项块又包含了段落块。对c反向缩进导致其从列表块变为列表项块时,引用的列表块必然找不到,如果引用的是列表项块就没有问题。

嗯,明白
上图只是转发,我个人不觉得这是个bug

@LoneFireBlossom
Copy link
Author

LoneFireBlossom commented Sep 20, 2023

一个列表块包含一个列表项块,而列表项块又包含了段落块。对c反向缩进导致其从列表块变为列表项块时,引用的列表块必然找不到,如果引用的是列表项块就没有问题。

不过这种情况的话,思源如果检测到列表块c有反链的话,能否弹出一个提示,提示用户此操作导致某些反链失效,具体请撤销操作到反链面板中查看?

@88250
Copy link
Member

88250 commented Sep 20, 2023

大概是不行的,我若杠一下的话可以认为这可能是有意的操作 😂

@LoneFireBlossom
Copy link
Author

大概是不行的,我若杠一下的话可以认为这可能是有意的操作 😂

这个有意的操作指的是什么有意呢,有意让双链失效的操作吗?
我个人是不希望某天看笔记时发现一些双链失效了的,因为那个时候会相对难找原本想链接的内容在哪里

@Vanessa219
Copy link
Member

传统反向缩进中,从1改为3。大纲缩进保持不变,依旧为1 -> 2
image

Vanessa219 added a commit that referenced this issue Sep 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Vanessa219 Vanessa219 self-assigned this Sep 20, 2023
@Vanessa219 Vanessa219 added this to the 2.10.7 milestone Sep 20, 2023
@Vanessa219 Vanessa219 changed the title Shift+Tab操作列表时的问题 Improve traditional indentation when list items contain multiple blocks Sep 20, 2023
@LoneFireBlossom
Copy link
Author

没看懂,发新版后试试

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

No branches or pull requests

3 participants