Implement the OPML menu editor #25

Closed
opened 2026-07-18 20:48:51 +00:00 by hugo · 1 comment
Owner

Goal

Replace the Menu Editor placeholder with the bDS2-compatible tree editor over the existing OPML menu engine.

Current state

  • meta/menu.opml parsing, Home-first normalization, rendering, save, and filesystem sync exist.
  • The workspace Menu Editor route is a placeholder.
  • specs/menu.allium and MenuEditorSurface in specs/editor_misc.allium are normative.
  • RuDS deep links are complete separately and must remain limited to ruds://new-post.

Required behavior

  • Load the active project's normalized menu and save changes through the existing OPML update path.
  • Add an existing page, a submenu from free text, an existing category, or a new normalized category.
  • Insert after the selected sibling or as the first child of a selected submenu; cancelling removes the draft.
  • Move entries among siblings; indent only beneath the preceding submenu; unindent immediately after the parent.
  • Support drag before/after entries and inside submenus, with delayed submenu expansion from the spec.
  • Refuse self/descendant drops and drops inside non-submenus.
  • Keep the canonical Home entry first and make move, indent, unindent, delete, and drag unavailable/no-op for Home.
  • Show localized validation, empty states, save success, and failures.
  • Hook any new macOS menu action through the native intercept and both localization areas.

Implementation notes

  • Read docs/UI_STYLE_GUIDE.md before UI work and reuse the shared editor/sidebar primitives.
  • Keep menu.opml as the sole persistent model; do not add a database table.
  • Put tree mutation logic in small pure functions and test it independently.
  • Follow red/green TDD and compare bDS2 import/menu editor handlers and tests when the specs are silent.

Acceptance criteria

  • Tests cover every insertion, cancellation, move, indent, unindent, drag position, invalid drop, Home protection, normalization, save, and reload path.
  • Creating a category uses normal project metadata/category persistence.
  • Saved OPML round-trips to the same normalized tree and site rendering sees it.
  • The Menu Editor placeholder is gone and the complete workflow is localized and keyboard accessible.
  • allium check specs, cargo fmt --all -- --check, cargo build --workspace, and cargo test --workspace pass.
## Goal Replace the Menu Editor placeholder with the bDS2-compatible tree editor over the existing OPML menu engine. ## Current state - meta/menu.opml parsing, Home-first normalization, rendering, save, and filesystem sync exist. - The workspace Menu Editor route is a placeholder. - specs/menu.allium and MenuEditorSurface in specs/editor_misc.allium are normative. - RuDS deep links are complete separately and must remain limited to ruds://new-post. ## Required behavior - Load the active project's normalized menu and save changes through the existing OPML update path. - Add an existing page, a submenu from free text, an existing category, or a new normalized category. - Insert after the selected sibling or as the first child of a selected submenu; cancelling removes the draft. - Move entries among siblings; indent only beneath the preceding submenu; unindent immediately after the parent. - Support drag before/after entries and inside submenus, with delayed submenu expansion from the spec. - Refuse self/descendant drops and drops inside non-submenus. - Keep the canonical Home entry first and make move, indent, unindent, delete, and drag unavailable/no-op for Home. - Show localized validation, empty states, save success, and failures. - Hook any new macOS menu action through the native intercept and both localization areas. ## Implementation notes - Read docs/UI_STYLE_GUIDE.md before UI work and reuse the shared editor/sidebar primitives. - Keep menu.opml as the sole persistent model; do not add a database table. - Put tree mutation logic in small pure functions and test it independently. - Follow red/green TDD and compare bDS2 import/menu editor handlers and tests when the specs are silent. ## Acceptance criteria - Tests cover every insertion, cancellation, move, indent, unindent, drag position, invalid drop, Home protection, normalization, save, and reload path. - Creating a category uses normal project metadata/category persistence. - Saved OPML round-trips to the same normalized tree and site rendering sees it. - The Menu Editor placeholder is gone and the complete workflow is localized and keyboard accessible. - allium check specs, cargo fmt --all -- --check, cargo build --workspace, and cargo test --workspace pass.
hugo added the enhancement label 2026-07-18 20:48:51 +00:00
Author
Owner

Implemented in 92a942d. Replaced the placeholder with the complete localized OPML tree editor: page/submenu/category drafts, normal metadata-backed category creation, sibling moves, indent/unindent, protected Home, validated before/after/inside drag-and-drop with 450 ms submenu expansion, save/reload feedback, native Save integration, and accessible toolbar equivalents. Corrected the OPML engine to emit/read canonical bDS2 pageSlug/categoryName/category-archive data, recursively normalize Home, ignore foreign outlines, and feed the saved tree to rendering; also fixed root category archive URLs. Neutral review covered the issue, bDS2 handlers/tree operations, menu.allium, and editor_misc.allium. Verified with Allium check/analyse, cargo fmt, clippy -D warnings, cargo build --workspace, cargo test --workspace, canonical round-trip/renderer/category persistence tests, and visual QA of the packaged macOS app.

Implemented in 92a942d. Replaced the placeholder with the complete localized OPML tree editor: page/submenu/category drafts, normal metadata-backed category creation, sibling moves, indent/unindent, protected Home, validated before/after/inside drag-and-drop with 450 ms submenu expansion, save/reload feedback, native Save integration, and accessible toolbar equivalents. Corrected the OPML engine to emit/read canonical bDS2 pageSlug/categoryName/category-archive data, recursively normalize Home, ignore foreign outlines, and feed the saved tree to rendering; also fixed root category archive URLs. Neutral review covered the issue, bDS2 handlers/tree operations, menu.allium, and editor_misc.allium. Verified with Allium check/analyse, cargo fmt, clippy -D warnings, cargo build --workspace, cargo test --workspace, canonical round-trip/renderer/category persistence tests, and visual QA of the packaged macOS app.
hugo closed this issue 2026-07-19 17:37:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hugo/RuDS#25