Skip to content

0.27.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 04:49
· 205 commits to main since this release

Eight features: stroke taper for the pens, two pages side by side, headings when zoomed out, macros, a layout that follows the input device, workspace presets, suggested search terms for PDFs and tasks due on planner pages. The notebook format moves to version 25 (taper): the migration from version 24 is automatic, and Notebook 0.26 and older open a v25 notebook read-only and never overwrite it. Three review rounds are folded in (see Review fixes).

Stroke taper and document format 25

  • Stroke taper (#351) and document format 25. A Taper row in the pen options (the pen, the fountain pen and the brush) with two sliders, Start and End, and a small picture of the stroke drawn by the engine: the line thins towards the first and the last point, like the flick of a pen. It applies to what you write next; Off (the default) is exactly the look of every earlier version. The marker, the highlighter and shapes keep their flat ends.
  • How it is measured. The taper is a length in line widths (1 = twelve widths, never more than half the stroke), so the same setting looks the same on a fine and on a broad pen and survives scaling; a short stroke becomes a leaf shape and a dot stays a dot. The start thins from the first sample (the wet ink shows it); the end settles into its point when the pen lifts.
  • Everywhere you see the page. The static canvas, the live fallback, the zoomed-out level of detail and thumbnails, PNG, SVG, PDF and interactive HTML build the stroke with the same geometry. Favourite pens, pen sets, the radial menu's active mark and the style eyedropper keep the taper. A cut by the eraser or a redaction box keeps a taper only on the piece that still reaches that end of the stroke; joining broken strokes keeps the first start and the last end; a stroke turned into a shape loses it.
  • Document format v25. Two more optional numbers, taperStart and taperEnd (0.05 to 1), on a pen, fountain pen or brush stroke (render 2), written only when set. The v24 to v25 migration is the identity plus the version (a stray key of a v24 file is dropped), so large v24 files are staged too; read leniently a value outside the range, one that is not a number or one on a stroke that cannot taper is dropped and counted (the stroke stays); the strict write refuses all of them. Older versions open a v25 notebook read-only. The golden render hashes do not move. Schema docs/schema/notebook-v25.schema.json (renamed from v24), docs/format.md, docs/architecture.md.
  • Code. src/model/taper.ts (limits and helpers, strokeTaper), InkBuilder in src/ink/ink-geometry.ts (start taper in the point radii, end taper at finish()), src/view/taper-row.ts (the row), FavouritePen.taperStart / taperEnd, ToolbarState.penTaperStart / penTaperEnd.
  • Tests. tests/model-v25.test.ts (helpers, fields, migration, lenient read, staged loading, repair, merge, copies, engine geometry, every export path, cuts and joins, pens), tests/format-schema.test.ts (schema v25); harness doc=taper (dev/harness/taper-check.ts). Not verified on Android hardware.

Layout by input device

  • Layout by input device (#431). The notebook view now shapes itself to what you are using: with the pen the compact bar as before; with a finger one toolbar size more (larger touch targets) and more room between buttons; with a mouse and keyboard a clearer hover and focus state, and the tooltip of a bar button shows the keyboard shortcut you assigned to it in Obsidian. Settings > Appearance > Adapt layout to input: Automatic (default), Pen, Finger, Mouse and keyboard. Automatic reads the pointer type of events the view already gets: three consistent events switch, never in the middle of a stroke, and a touch right after the pen (a resting palm) is ignored. No format change.
  • Code. Pure, tested src/ui/input-layout.ts; DOM glue src/view/input-layout-view.ts (a passive capture listener, one class on the view root); tests in tests/input-layout.test.ts; harness scenario doc=inputlayout.

Two pages side by side

  • Two pages side by side (#49). A third way to scroll, next to Continuous and One page at a time: the pages are shown in pairs like an open book and scroll pair by pair. Turn it on from the page sheet (Two pages side by side), the command palette, or Settings > Pages > Scrolling. You write on both pages; every stroke belongs to the page the pen started on and never spills onto the other one (the existing page hit test routes it, the stroke pipeline and the pen controllers are untouched).
  • Book or pairs. First page alone, like a book (on by default): page 1 sits alone on the right and the pairs are 2-3, 4-5... Off, the pairs are 1-2, 3-4... An odd last page sits alone on the left. Pages of different sizes (portrait next to landscape, PDF pages) are aligned by their top edge with a gap, and the binding stays on one vertical line.
  • Only where there is room. A spread needs a view at least 720 px wide and not taller than wide; a phone or a portrait pane shows one column as before (the setting stays, the button is not offered). Two pages on a landscape tablet (off by default) turns the spread on by itself in landscape and off in portrait, staying on the page in view.
  • Everything that finds a page follows. Next/previous page turn by pair, go to page brings the page (or the pair) into view and, zoomed in, centres the page on the other side; the position kept for "Continue last notebook", saved views, the minimap, the fast scrollbar bubble, the page panel (both pages of the pair are highlighted) and file drops all use the page nearer to the point. Presentation mode still switches to one page at a time and back.
  • Code. Pure src/ink/spread.ts (layoutSpread, spreadRows, rowOf/mateOf, stepRow, canSpread, effectiveScrollMode, scrollToPageViewport, pageUnderScreen); ScrollMode gains "spread", Layout an optional rows, nearestPage an optional sideways tie-break. Settings spreadFirstAlone and spreadAuto. No document format change.
  • Tests. tests/spread.test.ts; harness scenario doc=spread (tablet held sideways and phone, light and dark).

Semantic zoom

  • Semantic zoom (#130). Zoomed far out, the notebook shows its headings and names large over the pages, so the overview says what is where: each large handwritten heading as a picture of its own ink (level 1 with a stronger accent edge), titled bookmarks, the name and top-level outline of a PDF, and the names of large pictures and excerpts in a quieter style. They fade in below about 60 % of the fit-to-width zoom with a faint veil, are complete near the smallest zoom, stay inside their page and never overlap. A finger tap or a mouse click on a label zooms to that spot (a pen tap draws as usual). A view overlay only: the document, the stroke rendering and the stroke level of detail are untouched, and exports, the presentation, the hand-in and page-by-page mode never show it.
  • Setting. Headings when zoomed out (Pages & navigation), on by default, in English and Italian.
  • Cheap on the tablet. The layout is pure and cached per zoom band (src/ink/semantic-zoom.ts), the labels come from the existing headings index and outline (src/model/semantic-sources.ts), at most 40 pooled elements move by CSS variables, a frame runs only when the viewport or the document changed, and heading pictures are drawn two per frame and cached.
  • Tests. tests/semantic-zoom.test.ts, tests/semantic-sources.test.ts, tests/semantic-zoom-isolation.test.ts; harness doc=semzoom (dev/harness/semzoom-check.ts).

Workspace presets

  • Workspace presets (#375). One command (Workspaces…, also in the All actions sheet and the notebook menu) lays out the plugin's panels around the notebook: Lecture (slides pane and the outline), Study (reference window and Related pages) and Focus (everything closed). Save the arrangement in front as a preset of your own (with the writing profile in use), then rename, replace or delete it; up to 12.
  • Panels only. Applying a preset opens or closes the slides pane, the reference window, the page panel (thumbnails or outline), the minimap and the Related pages panel through their own open and close functions. It never moves other Obsidian tabs or panes and never edits a notebook, so it works on a read-only notebook too. Slides and the reference window ask for a file with their usual picker, one at a time.
  • Phones. The reference window, the minimap and the Related pages are left out on a narrow screen (one notice names them); the slides split stays and the page drawer is skipped while it is open.
  • Also. Workspace: Lecture as a one-tap action (ranked first during a class), the setting Lecture workspace when a class starts (Study, off by default), presets stored in the plugin settings (bounded, read leniently), long-press help, English and Italian. Document format unchanged (24).

PDF search suggestions

  • PDF search with suggested terms (#418). Under the search box of a PDF a row of chips offers terms to search: the entries of the PDF's outline that the notebook shows, the titles in this notebook (box titles, bookmarks, marker labels) and the words you type most (text boxes, sticky notes, checklist labels; English and Italian stop-words left out). Typing narrows the row (prefix, word start, inside, one typo; accents and case ignored); a tap puts the term in the box and searches it. One scrolling line, up to 14 chips (8 on a phone), long-press explanations in English and Italian.
  • Cheap and private. The list is bounded (about 240 terms), built when the device is idle, kept per open notebook and rebuilt only when its sources changed; typing only filters it. It reads the open notebook only, writes nothing and changes no format. Handwriting has no text, so it is not a source.
  • Code. Pure src/pdf/search-suggest.ts (tests tests/pdf-search-suggest.test.ts), the chips in src/view/pdf-search-panel.ts, glue in src/view/pdf-reading.ts; harness scenario doc=pdfsuggest.

Tasks on planner pages

  • Tasks due on planner pages (#266). On a daily or weekly planner page a quiet chip Tasks due: n lists the vault's Markdown tasks due on the page's days: a Tasks plugin date, a Dataview [due:: ...] field, or a task in that day's daily note. Tap a row to open the note at the task. Read only (no tick is written from the chip), derived and per device: nothing is stored in the notebook (no format change) and the overlay is not part of any export. The index is built lazily in small slices from the metadata cache and kept up to date from its change events. Setting Tasks on planner pages (Writing, on by default).

Macros

  • Macros (#170). Make your own button: a name, an icon and an ordered list of the plugin's actions (up to 20 steps, up to 12 macros). Open Macros… in All actions (or Settings → Appearance → Macros), tap New macro, add steps from a searchable list (pen, highlighter, eraser, a favourite pen, the shape, arranging the selection, the paper or size of the page, a bookmark, a new page, the next page…), and choose Show on the toolbar. A step that takes a value (the paper, the page size) has its own choice.
  • Where it lives. On the toolbar as a pinned button (the same three pinned places as any quick action; press and hold it to unpin, also on a phone, where a pinned macro always keeps its button), in the Macros section of All actions, and as an Obsidian command per macro (Macro: ) you can give a hotkey or put on the mobile toolbar. A macro that starts on the selection qualifies for For this page in All actions while something is selected, and steps back when it cannot start.
  • Safe by construction. Only actions on an explicit allow-list can be steps: tools and pens, arranging a selection, page paper / size / orientation, bookmark, new and duplicated pages, moving between pages. Nothing that deletes, trashes, overwrites, exports, shares or syncs, and nothing that opens a dialog. Every step runs through the same entry point a tap uses, so a locked page or a locked element refuses as usual; the macro then stops with ONE notice that names the step (and says how many earlier steps are done). A step the plugin does not know (a macro from a newer version) is kept, shown as Unavailable and skipped.
  • One undo step. Everything one run changes is a single history step (Macro run in the history panel): one Undo takes it all back, one Redo does it again. New History.group(label, fn) merges the steps recorded inside it into one Batch; each step keeps all the history's guards (read-only, locks, content check).
  • Code. Pure, Node-tested src/ui/macros.ts (data and lenient reader, allow-list, registry entries, context rule helper, runner), the manager src/view/macros-modal.ts on the modal shell, src/view/macro-run.ts, src/view/macro-commands.ts; settings key macros (no document format change); History.group in src/model/history.ts; tests/macros.test.ts, tests/history-group.test.ts; harness dev/harness/macros-check.ts.

Review fixes

  • Taper at the pen tip and at the lift. While the start taper ramps up, the ballpoint's provisional tip (raw position and predicted points) is thinned like the trail, so no full-size dot rides at the tip. A tapered stroke's wet canvas is hidden in the frame the static layer draws it, so the end taper leaves no fat tail or notch; the live fallback draws the start taper only while the pen is down.
  • Taper is the same for every speed and size. The start ramp follows the way travelled, so slow and fast strokes taper alike, and a thumbnail keeps the taper length in pt, so short strokes no longer turn into spindles on a card.
  • Tapered strokes are frozen by golden hashes. tests/taper-golden.test.ts pins the nodes, the SVG / export path and the thumbnail outline of tapered strokes, so a later change to the ramp cannot silently change every tapered stroke. Test only.
  • Macros run as one honest step. Page turns are immediate while a macro runs, so Next page, Next page advances two pages and later steps land where you arrived. A text box or equation still open is committed first, as its own undo step. A whole run costs one undo entry. A step that changed nothing is not counted as done, and the closing notice says how many (1 step / n steps, also in Italian). An error while checking or preparing a step stops the macro with the usual notice, and a macro does not start while a stroke, an erase or a drag is in progress.
  • Macros keep what a newer version wrote. Unknown fields, steps beyond 20 and macros beyond 12 are kept as written and written back, shown as not run, and an unreadable step keeps its place. A macro whose stored id has another format is kept apart exactly as written; only a missing or doubled id is replaced, the same way on every start, and that one-time repair saves only the macros, their extras and the pins (keys of a newer version stay as they are).
  • Macro pins. The pin of a macro this version only keeps is never dropped and takes no visible place, so Show on the toolbar is not refused for a pin you cannot see; the pin of a macro that no longer exists is removed, and deleting a macro removes only its own pin. The editor keeps a step value it does not know until you pick another.
  • Spread: page actions hit the page you mean. With both pages of a pair in view, Delete page, Paper, Size, Lock and the page number refer to the page you last wrote on, tapped or went to (no flip with a one-pixel pan); zoomed in on one page, that page. The page sheet names it and deleting says which page went.
  • Spread: eraser, resize and lock. Rubbing out near the binding erases on every page the eraser circle touches; the lock notice appears only when the eraser is on the locked page itself. A resize or rotation during a stroke, an erase or a drag waits until the contact ends.
  • Fit stays fit between a spread and a single column. A position or saved view at the fit is stored as zoom 1 in every mode and restores as the fit of the mode it opens in, so it keeps re-fitting after a rotation (an older record with zoom 1 reads as fitted too). Other zooms are measured against the page-wide fit and keep their page size; a saved view at the fit reads "Fit" (Adattata) instead of a percentage.