Skip to content

Conversation

megayu
Copy link
Collaborator

@megayu megayu commented Dec 22, 2023

Add some features to optimize block selection

  • mod+click support deselect if it's on an selected block
  • support mod+shift+click
  • optimize CSS to make the selection of blocks more intuitive

Before
image
you can't figure out whether block 3 is selected or not

After
image
only block 1 is selected
image
block 1 and 3 both are selected

@tiensonqin tiensonqin self-requested a review December 25, 2023 01:20
@andelf
Copy link
Collaborator

andelf commented Dec 25, 2023

I have some personal local customization using not() selector:

.ls-block.selected {
  border: 1px dashed yellow;
}
.ls-block.selected .ls-block:not(.selected) {
  background-color: var(--ls-primary-background-color) !important;
}

@tiensonqin tiensonqin force-pushed the enhance/block-selection branch from ca13ad5 to be33592 Compare December 26, 2023 09:07
Copy link
Contributor

@tiensonqin tiensonqin left a comment

Choose a reason for hiding this comment

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

Works great! 💯
I tweaked the css a bit to highlight the bullet instead of adding border bottom to the block containers.
CleanShot 2023-12-26 at 17 56 12@2x

@tiensonqin tiensonqin merged commit 2b0d956 into logseq:master Dec 26, 2023
@tiensonqin tiensonqin deleted the enhance/block-selection branch December 26, 2023 09:56
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.

3 participants