outliner: add move up/down to editor toolbar - #34
Merged
Merged
Conversation
Add Move up / Move down actions to the outliner editor toolbar on both Apple and Flutter hosts, next to the existing indent/outdent buttons. Move semantics follow logseq's move-blocks-up-down: contiguous selected roots reorder within their siblings; at a boundary the selection crosses into the parent's neighbor as its first child (first-child move-up -> parent's previous sibling, last-child move-down -> parent's next sibling); root-level edges and mixed-parent selections are no-ops. Outdent now also adopts the moved selection's trailing siblings as children of the last moved block, matching logseq direct outdenting.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Manual iOS verification — Move up/down editor toolbar Verified on iPhone 17 simulator against local db-sync ( Tested on journal fixture
Note / possible follow-upMulti-select (long-press) shows the separate selection toolbar, which has no move buttons — multi-block move is supported in the core but not reachable via toolbar UI. Also, toolbar buttons expose no accessibility names in the iOS AX tree (pre-existing pattern, same for indent/outdent). |
|
Manual iOS verification — pinned Verified on iPhone 17 simulator against local db-sync. The toolbar now keeps
Requires logseq/lui#58 (scrollCapsule fix) — the lui pin here tracks that branch until it lands. |
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.
Summary
Adds Move up / Move down actions to the outliner editor toolbar on both hosts (Apple and Flutter), placed right after indent/outdent and wired through the existing
PerformOutlinerToolbarAction→outliner-toolbareffect →ToolbarRPC path (moveUp/moveDownwire actions).Move semantics intentionally mirror logseq's
move-blocks-up-down(deps/outliner): contiguous selected roots (or the editing block) reorder within their siblings; at a boundary the selection crosses into the parent's neighbor as its first child — first-child move-up lands in the parent's previous sibling, last-child move-down lands in the parent's next sibling. Root-level edges, mixed-parent, and non-contiguous selections are no-ops (toolbar still emits the haptic, matching indent/outdent).Also fixes an outdent divergence found while checking parity: logseq's direct outdenting re-parents the moved selection's trailing siblings as children of the last moved block —
Outliner_state.outdentnow emits thosepending_moves too.The toolbar now relies on
scroll-leadingpinning: hide-keyboard stays fixed at the trailing edge while the remaining buttons scroll horizontally (LUI change in logseq/lui#57, pinned here as912829b9on both Package.swift and pubspec).New
move/toolbar_reorderinoutliner_state.ml; newMove_up/Move_downvariants inoutliner_toolbar; SF Symbolsarrow.up/arrow.downand Materialarrow_upward/arrow_downwardicons; OCaml tests cover sibling reorder, selection preservation, boundary crossing, and no-op edges.Testing:
dune build @shared/native/runtest+@shared/test/runtest— 720 tests pass; verified in iPhone 17 simulator (nativesimctlrecording in review comment).Link to Devin session: https://app.devin.ai/sessions/e53865e84cdb4e85aad3d7c5b99ba7c9
Open in Devin Desktop: https://app.devin.ai/desktop/session/e53865e84cdb4e85aad3d7c5b99ba7c9?variant=devin
Requested by: @tiensonqin