Skip to content

Improve processing when a database-bound block changes its type #12152

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
alexjp opened this issue Jul 31, 2024 · 7 comments
Closed
3 tasks done

Improve processing when a database-bound block changes its type #12152

alexjp opened this issue Jul 31, 2024 · 7 comments
Assignees
Milestone

Comments

@alexjp
Copy link

alexjp commented Jul 31, 2024

Block binding to a database, loses its binding when changing its type (paragraph to list)

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

Hi,

When a block has a binding to a database, changing its type will make it lose its binding.
Say a Paragraph has a binding to a database. If I change that Paragraph into a List, and then to a Paragraph again, the binding gets lost. (it seems that it happens when turning a List into a Paragraph).

Rebinding it again to the same database, makes it reappear, and with the data previously entered.

Hope this is not a duplicate, thanks!

Expected result

Changing a block with a database bind from a List to a Paragraph, to not lose its binding.

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.1.2
- Operating System: Linux
- Browser (if used):

Log file

siyuan.log

More information

EDIT: Forgot to mention. When the block loses it's binding, it will still display the name of the database that it was supposed to be bind to. But clicking on the name of the database (to the right just above the block), shows an empty dialog window, and closing that window, the binding name of the database on the block disappears.

@88250 88250 self-assigned this Aug 2, 2024
@TCOTC
Copy link
Contributor

TCOTC commented Aug 2, 2024

我觉得可以这样:段落块转换为列表块时,保持段落块的 ID 不变,新增列表块和列表项块的 ID

@88250
Copy link
Member

88250 commented Aug 3, 2024

@alexjp Thanks for the feedback, we'll see if we can improve it later.

@TCOTC 目前就是这样的。

@88250 88250 changed the title Block binding to a database, loses its binding when changing its type (paragraph to list) Improve processing when database-bound block changes its type Aug 3, 2024
@88250 88250 changed the title Improve processing when database-bound block changes its type Improve processing when a database-bound block changes its type Aug 3, 2024
@88250 88250 added this to the 3.1.3 milestone Aug 3, 2024
88250 added a commit that referenced this issue Aug 3, 2024

Unverified

This user has not yet uploaded their public signing key.
@88250 88250 closed this as completed Aug 3, 2024
@TCOTC
Copy link
Contributor

TCOTC commented Aug 3, 2024

我觉得可以这样:段落块转换为列表块时,保持段落块的 ID 不变,新增列表块和列表项块的 ID

目前就是这样的。

我观察到不是这样的,段落块的 ID 会改变:

default.webm

@88250
Copy link
Member

88250 commented Aug 3, 2024

用转换功能才不会变

@TCOTC
Copy link
Contributor

TCOTC commented Aug 3, 2024

用转换功能才不会变

那我觉得这个就是问题了

@88250
Copy link
Member

88250 commented Aug 3, 2024

这个没法搞,楼主说的是使用 转换 时的问题,已经解决了。

@alexjp
Copy link
Author

alexjp commented Aug 3, 2024

Just quick tested, seems fixed! :) Thank you very much!

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