Todo small lines template as a Methods item (refs #51) #71
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/51-todo-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #51. Spike for the small lined todo template as a native reMarkable Methods template (Jeremy's D19: "use what the official third-party templates use"). Draft until Jeremy's tablet check.
What it does
Remarkable.NewTemplatewrites aTemplateTypecloud item (<id>.metadata,<id>.content={},<id>.templateJSON) in one commit right after a sync, the same loop asNewPdf(412 → sync and retry ×3; already there → no-op). Each write is logged (item id, root hash, generation, uploads, ms).Todos.Template: "Todo small lines": P Lines small's 52 px rules, a margin line at x 120.5, and a printed box on every rule left of the margin (Todos.Template.box/1, D31). OCR renders strokes only, on white (OCR.PageImage), so the boxes never reach it. The.templateis built fromTemplates.segments/1andbox/1, which is also what the page view draws (Templates.svg/1, version 5), so the two match. Coordinates scale bytemplateWidth/1404andtemplateHeight/1872, so one file fits the rM2 and the Paper Pro. The item id is fixed, so adding it twice adds it once.draw_pagewrite on its rules (samerules/1and layout as P Lines small).docs/todo-template.md: the format (from spacepanda.se and real Methods templates on GitHub), the risks, and the tablet check for Jeremy.Risks
template.valuea page on it stores (name or item id). The tablet check finds out.Checks
mix precommitgreen. New tests:new_template_test.exs(files, plan, write, retry on 412, no double add, logs),todos/template_test.exs(Methods fields, 37 straight paths, matches the SVG), and a settings LiveView test.Screenshots (head
1ca35aa, Chromium; no horizontal scroll at 390 or 1280)Settings > reMarkable, 390px, before adding:
390px, once the template is in the library:
Desktop, before adding:
Desktop, added:
Fixed (
f2589fb), Nye F3: the rM2 reads a Methods canvas turned 90° from the Paper Pro's, so the template is now two items named "Todo small lines": the Paper Pro's (supportedScreens["rmPP"], same id) and the rM2's (["rm2"], new id6c73ab67-…, every point(x, y)→(y, 1404 - x),sx/sykept).NewTemplatenow writes a list in one commit and skips items already there, so only a missing one is written.Todos.Template.ids/0replacesid/0;added?needs both. Docs updated.mix precommit: 1122 tests, 0 failures. The settings UI didn't change, so the screenshots still hold.Fixed (
5fb9d1c), D29/D34: Jeremy's rM2 drew the turned item sideways, so it's one upright item for rm2 + rmPP under a new id; Add to tablet removes our earlier items in the same commit.57c5e80, D31: printed boxes. Every one of the 36 rules gets a 30 px box at x 76–106, from 40 px to 10 px above its rule (row 0: y 10.5–40.5).Todos.Template.box/1(row 0–35 →{left, top, width, height}, theLines.Marksrect) andboxes/0are the one source: the.templatedraws each as a closedM/L/Zpath,Templates.svg/1(version 5) and the picker thumbnail draw the same rects. New idd7fac201-…; the upright item without boxes (1548ae34-…) joinsstale_ids/0. Settings card text and icon now show the boxes.docs/todo-template.mdupdated (no more "no boxes printed"). Tests forbox/1, the 36 drawn boxes matching it, the SVG and the thumbnail.mix precommitgreen.The template at 2x (app drawing at
fe0c01a, D36 layout, top left: title rule, margin at x 220.5, boxes at x 160–190 clear of the toolbar):Settings card at head
57c5e80, 390px and desktop (Chromium, no horizontal scroll):D36 (
fe0c01a), Jeremy's rM2 re-check of57c5e80: upright, but the boxes sat under the tablet's toolbar and he wants room for the list's title first. Now: one title rule at y 154.5 from the margin to 1403; 31 task rules from 258.5 every 52 px (last 1818.5); margin at x 220.5; boxes at x 160-190 (30 px, 40/10 above the rule),box/1rows 0-30.Templates.rules/1also returnstitle_yandmargin_x. New idd3850d5e-…; 57c5e80'sd7fac201-…joinsstale_ids, so Add to tablet removes it. The typed-page layout now starts right of the margin, on the first task rule. Svg version 6; the settings card's icon and text show the title line. Also Nye's two wording notes (M/L/Zin the doc, duplicate moduledoc sentence).mix precommit: 1126 tests, 0 failures.Settings card at
fe0c01a, 390px and desktop (no horizontal scroll at either):The page as the app draws it (
Templates.svg/1), the same drawing as the.template:Remarkable.NewTemplate writes a TemplateType item (.metadata, {} .content, .template JSON) in one commit after a sync, like NewPdf. Todos.Template builds the .template from Templates.segments/1, the same drawing the page view uses: P Lines small's rules and a left margin. Settings > reMarkable gets an Add to tablet card. docs/todo-template.md has the tablet check.WIP: Todo small lines template as a Methods item (refs #51)to Todo small lines template as a Methods item (refs #51)Jeremy said ship it. Merged into main with a signed merge commit,
1dbc293(no squash); local mix precommit on the merge passed (1126 tests). The CI runner hasn't started a job since run 144 (Nov 1), so no CI result here. Forgejo shows this PR closed rather than merged because manual-merge marking is off on this repo.