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

数据库支持实时筛选和排序 #11349

Closed
Tracked by #12103
TCOTC opened this issue May 11, 2024 · 12 comments
Closed
Tracked by #12103

数据库支持实时筛选和排序 #11349

TCOTC opened this issue May 11, 2024 · 12 comments
Assignees

Comments

@TCOTC
Copy link
Contributor

TCOTC commented May 11, 2024

参考 Notion 的实时筛选和排序:

default.mp4
default.webm

下面是「创建时间排序后新建行跳动」的问题,移动到 #11100 解决:

使用右上角的加号添加条目的时候,输入框应该出现在开头才对

_Originally posted by @TCOTC in https://github.com/siyuan-note/siyuan/issues/11100#issuecomment-2105908576_
            
这种情况,如果数据库很长,创建新条目的时候会跳转到数据库末尾,然后还要回到开头去编辑,很麻烦:

[123.webm](https://github.com/siyuan-note/siyuan/assets/78434827/fad6cf13-6daa-4c4c-b822-5f6610f27b21)
@Vanessa219
Copy link
Member

这个属于排序问题 @88250

@88250
Copy link
Member

88250 commented May 12, 2024

这个问题有点复杂,目前的逻辑是“编辑过的”行才参与排序,新建的行是不参与排序的,但是 创建时间 是自动填充的,所以默认就算作是编辑过的,一旦创建就会参与排序。

要改进的话有两个方案:

Notion 创建时就计算好插入位置,比如降序时创建就直接在第一行:

image

wolai 创建时在最后一行:

image

创建结束后排序并定位到第一行:

image

@88250 88250 changed the title 使用右上角的加号添加条目的时候,输入框应该出现在开头才对 创建时间排序后新建行跳动 May 12, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented May 12, 2024

创建结束后排序并定位

赞同这个

  • 使用右上角的添加按钮:在首行创建,创建结束后排序
  • 使用左下角的添加按钮:定位到末行 & 在末行创建,创建结束后排序

@TCOTC
Copy link
Contributor Author

TCOTC commented May 12, 2024

创建时就计算好插入位置,比如降序时创建就直接在第一行

如果思源能定位到数据库中间的某个位置(定位到数据库具体条目),这个方案其实也没啥问题

@TCOTC
Copy link
Contributor Author

TCOTC commented May 12, 2024

创建时就计算好插入位置,比如降序时创建就直接在第一行

如果思源能定位到数据库中间的某个位置(定位到数据库具体条目),这个方案其实也没啥问题

如果能实现定位的话,应该就能做 #10916 了吧

@88250
Copy link
Member

88250 commented May 12, 2024

可能是的,有一定关联。

@TCOTC

This comment was marked as outdated.

@TCOTC

This comment was marked as duplicate.

@TCOTC

This comment was marked as duplicate.

@TCOTC

This comment was marked as outdated.

@TCOTC TCOTC changed the title 创建时间排序后新建行跳动 实时筛选和排序 / 创建时间排序后新建行跳动 Jul 11, 2024
@TCOTC TCOTC changed the title 实时筛选和排序 / 创建时间排序后新建行跳动 实时筛选和排序 Jul 26, 2024
@TCOTC TCOTC changed the title 实时筛选和排序 数据库支持实时筛选和排序 Jul 26, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented Jul 26, 2024

@88250
Copy link
Member

88250 commented Aug 5, 2024

技术困难,并且工作量太大了,除非在前端再实现一套计算逻辑。

@88250 88250 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants