Skip to content

feat: Insert > Page Templates, and save a page as a template (#173) - #239

Merged
DWAA1660 merged 3 commits into
AlienTechSoftware:mainfrom
DWAA1660:feat/page-templates/173
Nov 14, 2026
Merged

DWAA1660 merged 3 commits into
AlienTechSoftware:mainfrom
DWAA1660:feat/page-templates/173

Conversation

@DWAA1660

Copy link
Copy Markdown
Collaborator

Closes #173.

What changes

Insert > Page Templates used to be a disabled button. It now opens a pane on the right, in the same style as the Tags Summary.

  • Templates are grouped by category: Academic, Blank, Business, Planners and My Templates.
  • One click adds a page to the open section from that template and opens it. The page goes last in the section and is untitled, as Add Page makes it. Nothing is written over an existing page, which answers the issue's question about how applying a template should behave.
  • Eight built-in templates: Lecture Notes (college ruled), Study Guide, College Ruled, Grid, Meeting Notes, Project Overview, To Do List and Weekly Planner. They are kept as Markdown with their paper and written in the section's own format (HTML or CommonMark + GFM).
  • Save current page as a template (a name box plus a button, or Enter) keeps a copy of the page's folder: words, arranged boxes, ink, files, paper and page colour. Subpages and the page's version history are left out. The copy lives in .notecraft/templates/<name>/ in the notebooks folder. It's a dot folder, so the tree never shows it. A page made from it gets fresh ids and a fresh date, the same way Copy works.

Code

  • crates/store/src/page_templates.rs: list, find, save, remove and new_page, with unit tests that cover every built-in in both formats, saved templates (ids, files, paper, colour, no subpages, no history) and bad input.
  • Engine commands page.templates, page.from_template, page.save_template and page.remove_template, so the CLI, MCP and the control channel can do the same. docs/commands.md was regenerated.
  • UI: Act::PageTemplates, templates_panel, and pageTemplates in ui.inspect. The strings are in the i18n catalogs.
  • Docs: folder-format.md (where templates live), gaps.md and feature-parity.md.

Not built

Previews in the gallery, a default template for new pages, and removing a saved template from the pane (page.remove_template does it from the engine).

Tests

  • UI test page_templates_add_pages_and_keep_this_page_as_one:
    • opens the pane and checks every built-in is listed;
    • Meeting Notes makes a new untitled page with the template's words, and the page that was open is unchanged;
    • saving the open page as "Idea board" lists it under My Templates, and that template then makes another page with the saved page's words.
  • cargo xtask ci passes locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y4im4nvZvQHZdShop1ff8w

DWAA1660 and others added 3 commits November 13, 2026 19:02
…chSoftware#173)

Insert > Page Templates was a disabled button. It now opens a pane on
the right with templates by category (Academic, Blank, Business, Planners
and My Templates). One click adds a page to the open section from a
template and opens it. The page that was open is never written over: the
new page goes last in the section, untitled, as Add Page makes it.

- Eight built-in templates (Lecture Notes, Study Guide, College Ruled,
  Grid, Meeting Notes, Project Overview, To Do List, Weekly Planner) are
  kept as Markdown with their paper, and written in the section's format.
- "Save current page as a template" keeps a copy of the page's folder
  (words, boxes, ink, files, paper and colour; not its subpages or its
  version history) in .notecraft/templates/ in the notebooks folder. A
  page made from it gets new ids and a fresh date.

store::page_templates holds this, with unit tests. Engine commands
page.templates, page.from_template, page.save_template and
page.remove_template give the CLI, MCP and control channel the same
features. Docs: commands.md (regenerated), folder-format.md, gaps.md,
feature-parity.md.

Not built: template previews, a default template for new pages, and
removing a saved template from the pane.

Closes AlienTechSoftware#173

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4im4nvZvQHZdShop1ff8w
@DWAA1660
DWAA1660 merged commit 83729be into AlienTechSoftware:main Nov 14, 2026
10 checks passed
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.

[UI parity] Enable Insert > Page Templates with reusable layouts and user-created templates

1 participant