Repository navigation
fix(outliner): moving a property value up past the first value keeps it a value - #13677
Closed
yuxi-liu-wired wants to merge 3 commits into
Closed
yuxi-liu-wired wants to merge 3 commits into
yuxi-liu-wired wants to merge 3 commits into
Conversation
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 2026
…it a value With a many-valued property (values v1, v2 on a block), Alt+Shift+Up on v2 turned v2 into an ordinary child of the block and dropped it from the property: the up move targets the block two above, and with none it moves the block into its parent as the first child, and a block moved into its parent that way is not restored as a value of the property. The first value now moves down after the moved values instead, a move between two values of the property, which keeps both. With three values, v3 moved up past v2 already worked; moving it up again past v1 dropped it the same way. Tests: src/test/logseq/outliner/property_value_move_test.cljs (in the app's test build: a value's siblings come from the entity's :block/_raw-parent, which only the compiled app computes): the second value moved up swaps with the first and both stay values, the block's ordinary children untouched; v3 moved up twice; the first value moved down.
Keeps move-blocks-up-down under the outliner's 55-line large-vars limit.
The first value moved up and the last value moved down stay in place and stay values; the block's ordinary children are untouched.
yuxi-liu-wired
force-pushed
the
fix/move-property-value-up
branch
from
October 16, 2026 18:35
2b58d20 to
4c0e72f
Compare
Contributor
Author
|
Combined with the other PRs that change the same files into #13783. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a block with a many-valued property holding v1 and v2, Alt+Shift+Up on v2 does not swap the two values: v2 becomes an ordinary child block of the block, and the property keeps v1 only.
The up move (
move-blocks-up-down) targets the block two above the first selected block, and when there is none it moves the selection into its parent as the first child. For a property value with only the first value above it, that is the parent block, and a block moved into its parent that way is not restored as a value of the property (move-blockrestores the property only when the target is itself a value, or when:created-from-propertyis passed). With three values, moving v3 up past v2 works (the target is v1, a value); moving it up again past v1 drops it the same way.The fix: in that case the first value moves down after the moved values instead, a move between two values of the property, which keeps every value.
Tests in
src/test/logseq/outliner/property_value_move_test.cljs(the app's test build: a property value finds its siblings through the entity's:block/_raw-parent, which the outliner library's nbb run does not compute): the second value moved up swaps with the first, both stay values and the block's ordinary children are untouched (fails on master: v2 drops out); v3 moved up twice ends first (fails on master at the second move); the first value moved down swaps as well. The outliner core, undo/redo, editor and property-value test namespaces pass with the change, as does the outliner library's suite.