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

Enhance context menu #8930

Merged
merged 17 commits into from Apr 3, 2023
Merged

Enhance context menu #8930

merged 17 commits into from Apr 3, 2023

Conversation

megayu
Copy link
Collaborator

@megayu megayu commented Mar 28, 2023

Add some functions to custom context menu, including

  • set background of block
  • set heading of block
  • collapse or expand block
  • make block to flashcard

only select current block during open "bullet" context menu, that fix #7689

fix undo heading needs multiple steps

@tiensonqin tiensonqin added the :type/hold Hold this PR. won't merge for now label Mar 28, 2023
@tiensonqin tiensonqin changed the title enhance context menu [WIP] enhance context menu Mar 28, 2023
@tiensonqin tiensonqin changed the title [WIP] enhance context menu Enhance context menu Mar 29, 2023
@tiensonqin tiensonqin removed the :type/hold Hold this PR. won't merge for now label Mar 29, 2023
@sprocketc sprocketc self-requested a review March 29, 2023 15:32
Copy link
Collaborator

@sprocketc sprocketc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@megayu Impressive work! I appreciate the additional fixes and refactoring ❤️.

There is an issue with the way set-heading-aux! behaves. When we set a fixed heading in markdown mode, we just need to modify the content of the block, to add the corresponding number of #. If we already have a heading set, the new heading is now set as a block property (e.g. heading:: 4). The only case that we need to do that, is when the heading is set to auto, because there is no auto heading in markdown mode.

@megayu
Copy link
Collaborator Author

megayu commented Mar 30, 2023

@sprocketc yes, it's a silly mistake, fixed in 8e081f5

@sprocketc sprocketc self-requested a review March 30, 2023 15:45
Copy link
Collaborator

@sprocketc sprocketc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Confirmed that the issue is fixed.

@tiensonqin tiensonqin merged commit 81c1397 into logseq:master Apr 3, 2023
6 checks passed
@tiensonqin tiensonqin deleted the enhance/context-menu branch April 3, 2023 05:00
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.

Press backspace while making a template removes multiple blocks
3 participants