Skip to content

feat(ui-egui): drag notebooks, sections and pages in the navigation pane - #395

Open
leifrossau wants to merge 6 commits into
AlienTechSoftware:mainfrom
leifrossau:feat/drag-notebooks-and-pages
Open

leifrossau wants to merge 6 commits into
AlienTechSoftware:mainfrom
leifrossau:feat/drag-notebooks-and-pages

Conversation

@leifrossau

Copy link
Copy Markdown
Collaborator

What and why

The navigation pane can now be arranged by dragging, as in OneNote. Before, the only ways were the context menu's Move Up and Move Down (one place at a time, pages only) and the Move or Copy dialog.

  • Pages go up or down among pages (a line shows where), onto the middle of another page to become its subpage (the row is outlined), or onto a section to move there.
  • Sections and section groups go among each other, or into a notebook or section group.
  • Notebooks go among the open notebooks, wherever each is kept: one in a synced folder can go before one in the notebooks folder. The order is kept in the settings (notebook_order), so nothing in the notebooks is written.
  • What is carried follows the pointer. Escape puts it back, and letting go where it cannot go changes nothing. A press that hardly moves is still a click.

A new command, node.place (path, to, before), puts a node just before one of its new neighbours, or last. It takes an order number between its neighbours', so only the node placed is written. The others are renumbered only when no number is left between them. Move Up and Move Down renumber the whole section, which on a synced folder (OneDrive through onedriver) waits on the mount once per page.

Quality level L3 (see SKILLS/nc-devx/SKILL.md)

  • cargo xtask pre-push passes on the current branch before pushing
  • The pre-push hook confirms the validation still matches origin/main
  • CI checks pass for this pull request
  • Coverage: the coverage job's warnings are read; cargo xtask coverage --update is in
    this pull request if coverage rose
  • Docs match the change: docs/commands.md regenerated for node.place
  • A new user action is a CommandSpec with a test (node.place)
  • Page or demo changes: none
  • UI changes: rows show a drop line or outline only while something is dragged; nothing changes at rest
  • New files under assets/ or docs/images/ have a row in ATTRIBUTION.md (none added)

How it was checked

  • cargo xtask pre-push on this branch.
  • notebooks_sections_and_pages_are_dragged_where_they_go (UI) drags in the window and checks each result:
    • a page above another;
    • Escape cancelling;
    • a page onto a page, as a subpage;
    • a page onto another section;
    • a section above another;
    • a notebook first;
    • a short press still opening the page.
  • navdrag unit tests for where a drop goes.
  • a_node_is_placed_where_it_was_dropped_writing_only_itself (store): checks that only the moved page's file changes, and that the section is renumbered when no gap is left.
  • a_page_is_placed_before_another_or_last and notebooks_keep_the_order_they_were_dragged_into (engine): the notebooks come from two folders, and the order is still there after reopening.
  • Tried by hand on KDE Wayland with a notebook on onedriver.
  • Not done: the list does not scroll by itself when dragging near its edge.

🤖 Generated with Claude Code

leifrossau and others added 6 commits November 18, 2026 20:30
node.place puts a page, section, section group or notebook just before one
of its new neighbours, or last: where a drag in the navigation pane drops
it. It takes an order between its neighbours, so only the node placed is
written; the others are renumbered only when no number is left between.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As in OneNote: a row taken hold of is carried, and the row under the
pointer shows where it would go - a line above or below it, or an outline
when it would go into it. A page goes among pages, into a section, or onto
another page as its subpage; a section among sections or into a notebook or
section group; a notebook among notebooks, wherever each is kept. Escape
puts it back, and a press that hardly moves is still a click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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