fix: show clear heading after slash heading by tiensonqin · Pull Request #13818 · logseq/logseq · GitHub
Skip to content

fix: show clear heading after slash heading - #13818

Draft
tiensonqin wants to merge 1 commit into
masterfrom
logseq/dynamic-clear-heading-0cc2
Draft

tiensonqin wants to merge 1 commit into
masterfrom
logseq/dynamic-clear-heading-0cc2

Conversation

@tiensonqin

Copy link
Copy Markdown
Contributor

The slash menu decides whether to show Clear heading from the block stored when editing starts. /h1 writes :logseq.property/heading on the live block and leaves that snapshot unchanged, so the next / in the same edit still hides Clear heading.

The menu now reads the live block heading. A snapshot that is still loading falls back to the edit block. Clearing the heading in the same session hides the command again.

frontend.components.editor-test covers a heading added during the edit, a heading cleared during the edit, auto heading, and the loading fallback.

Slash menu shows Clear heading after Heading 1
Slash menu hides Clear heading on a normal block
slash-clear-heading-demo.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

The slash menu hid Clear heading from the edit snapshot taken when
editing started. /h1 writes the heading on the live block, so the next
slash menu follows that heading.

Co-authored-by: tiensonqin <tiensonqin@gmail.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants