Repository navigation
Eight roadmap features: coloured sections in a notebook (#52), a computable table (#147), a trend line on line charts that completes #295, numbered markers on a figure (#247), tidy hand-drawn flowcharts (#245), a timeline element (#148), link suggestions while creating a Zettelkasten card (Z5) and card sequences with branches (Z7). The notebook format moves to version 28 (sections): the migration from version 27 is automatic, and Notebook 0.29 and older open a v28 notebook read-only and never overwrite it. Every save on 0.30 writes version 28, so update every synced device together. The review fixes of each feature are listed under it.
Zettelkasten: link suggestions (Z5)
- Link suggestions while creating a card (Z5). The New card dialog (also from the Inbox) has a Cards to link field: as you type the title, source and tags, the cards of your slip-box that share tags or title words with it are listed (best first, the most recently changed card breaks ties), each with the reason. Tap one to link it; the link is written both ways, like a drawn arrow, once the note exists. Settings > Study > Zettelkasten: Suggest cards to link (on by default) and Suggestions shown (1 to 8).
- Cheap. The candidates come from the cards already indexed and the metadata cache (no note is read), are capped at the 600 most recent cards, and ranking runs a quarter of a second after the last key.
- No format change. Code: pure
src/zettel/link-suggest.ts,src/zettel/link-suggest-ui.ts. Teststests/zettel-link-suggest.test.ts; harnessdoc=linksuggest. Not verified on Android hardware. - Review fix: the chosen cards are linked to the exact note the dialog made. The first version waited up to 30 seconds for "the next new card" and could write the links into another card (one arriving by sync, a slip-box card made meanwhile, a creation that never happened). That watcher is gone. The cards chosen travel with the dialog's answer (
CardAnswer.links, never written to the note's properties) and are linked inside the same queued task right after the note is written, in the card dialog and in the Inbox. If the card is not made, nothing is linked. A chosen card that was renamed meanwhile is found again by its id. The notice says what happened: Linked to 1 card. / Linked to N cards. (Italian singular and plural), The chosen cards were already linked. when nothing was added, and the failure notice when a link could not be written. Chosen cards deleted while the dialog was open are named as gone (1 of the chosen cards is gone… / N of the chosen cards are gone…), never as "already linked" (review R6). Nothing keeps listening after the plugin is unloaded.
Sections inside a notebook (#52, document format 28)
- Coloured sections inside a notebook (#52), as in OneNote. New section… (page sheet, All actions, command) starts a section at a page with a title and one of the eight subject colours; it runs to the page before the next section. The page navigator shows a coloured tab strip (the section in view is current; a tap jumps to its first page), a divider with the title and page count before each section, and a colour edge on its pages. The Sections dialog lists them (tap to go; rename, recolour, delete from the row's menu). Next section and Previous section jump between them. Every change is one undo step, named in the history panel. Read-only notebooks show and navigate sections but do not change them. Sections whose page is gone show nowhere but count toward the 200: the Sections dialog says how many and offers to remove them, and New section uses the same count (review S4); the New section dialog remembers the page itself, not its position, so a page list that changes while it is open cannot move the new section (review S6).
- Sections stay consistent with the pages. Sections are anchored to page ids. Deleting the first page of a section moves the section to the next page (or removes it if that page starts a section of its own); moving pages keeps a section with its pages, or starts it at the first page that stayed, and never changes the section of a page that did not move: a section moved into the middle of another splits it, the pages after it keep the host's title and colour (a continuation section), and the two parts become one again when the block moves out; only pieces of one split section are joined (a continuation is recognised by its id, also through a chain of splits and after a rename and a rename back, review T2), never independent sections that share a title and colour, such as a weekly "Lecture" and "Homework" (review S1, R1; pages in no section that a moved section lands in front of join it, the only way they can show); adding, inserting and duplicating pages change nothing. Undo puts pages and sections back exactly. Known limits (labels only, nothing is lost): the pieces of a split section copied by a notebook template stay separate sections, and when two devices split one section offline, a conflicted-copy merge keeps one piece and reports the other as differing (review T3, T4).
- Copies, merges, templates. A conflicted copy's merge adds the copy's sections the notebook lacks (counted in the summary); the summary also says how many of the copy's sections differ (renamed, recoloured, moved, or another one on a page where the notebook already starts one: the notebook's are kept, the copy's stay in the copy) and how many did not fit a full list (the copy then stays where it is), so a copy whose only change is a section is never "Nothing new" (review S2, S8); notebook templates keep the sections; pages copied or moved to another notebook take none; repair salvages them.
- Document format v28. One optional notebook-level list,
sections(id,title1–60 characters,color,page; at most 200; no two on one page). Migration 27 → 28 is the identity plus the version; older plugins open a v28 notebook read-only. Unknown keys inside a section are not written back and are counted as dropped on read, so a backup is kept before the save that loses them; format.md now says the plugin does not keep unknown fields (review S3). Every save on 0.30 writes version 28, even a notebook without sections, so a device still on 0.29 opens it read-only (with a backup, nothing is lost): update every synced device together (review S9). JSON Schemadocs/schema/notebook-v28.schema.json(renamed from v27). - Code.
src/model/sections.ts(rules,SetSections),src/view/sections-tools.ts,src/view/sections-modal.ts,src/view/sections-logic.ts. English and Italian texts, long-press help, context ranking. Teststests/model-v28.test.ts,tests/sections-logic.test.ts; harnessdoc=sections. Not verified on Android hardware.
Computable table (#147)
- Computable table (#147). With a hand-drawn table selected, Compute table (All actions, command palette) works out the formulas typed in the cells and writes each result after its formula, as ONE undo step. A formula is a text box inside a cell that starts with
=:=SUM(B1:B4),=AVG(B1:B4),=A2*B2,=C2*15%,=MIN,=MAX,=COUNT,=MEDIAN,=PRODUCT,=ABS,=SQRT,=ROUND(x, 2),=PCT(part, whole), with+ - * / ^, parentheses, ranges and a postfix%(Italian names such asSOMMAandMEDIAwork too; arguments are separated by,or;).A1is the top-left cell of the table, header row included. After computing, the box reads=SUM(B1:B4) → 100: the formula stays in the box (Compute only ever replaces the result it wrote: a value right after the arrow that ends its line or meets a second arrow, or an error code; anything else after the arrow, such as=B2*C2 → 120 (checked by hand)or a number you typed after your own arrow, is kept behind the new result and a second arrow, and a note on a line below the formula and the box's line breaks all stay; a blank or text value shows-; a line below that starts with an operator, such as-D2,+ B3or* 2, continues the formula, so a mistake there shows an error rather than the value of the lines above, while a bullet note such as- includes VATor* see p. 4(an operator, a blank and a plain word) stays a note: review R2, R3, T1; words typed after a computed result on its own line are kept behind the next result, which leaves the old value visible once, so write notes on the line below or after a second arrow, as the long-press help says: review T5), so editing a number and choosing Compute table again updates the result. Errors are shown as codes:#REF(a cell outside the table),#CYCLE(cells that depend on each other),#DIV/0,#VALUE(text where a number is needed),#NAME(unknown function),#NUM,#ERR(the formula does not read), and every formula that uses an error cell shows it too. Refused, with a notice and nothing changed, when a formula box is locked, part of a drawing with states or under a study tape, and fail-closed when the table or a box to be written touches a redaction box (a result could reveal what is under it). Handwriting is not read: numbers and formulas are typed in text boxes. Charts and statistics skip a formula cell (its text is not a plain number). No format change. Code:src/math/table-formula.ts,src/ink/table-compute.ts,TableTools.computeinsrc/view/table-tools.ts.
Chart trend line (#295)
- Trend line on line charts (completes #295). The Chart from table dialog has a Trend line choice for the Line type: a dashed least-squares line through the first series (x is the row position 1, 2, 3 ...) with its equation and R² as a small label inside the chart. The choice is kept by Update chart (stored as a trailing
rin the chart group id; ids made by 0.29 read as before; no document format change). Code:src/math/chart-regression.ts.
Numbered figure markers (#247)
- Numbered markers on a figure, with a legend (#247). Select a picture, a drawing (ink) or a marker and choose Add numbered marker in All actions: a numbered circle (a translucent ring with its number) is put on the figure and its line is added to a legend under it, in one undo step. The new marker is selected so you can drag it to the part it names; the next use joins the same figure without selecting it again. Type the descriptions in the legend like any text box (
1. Cell wall). - Numbering is by placement order, renumbering is explicit. A new marker takes the number after the highest of its figure, so the numbers you have already read, written about or referred to never change by themselves. After deleting a marker, select any marker of that figure and choose Renumber markers: the gap closes (1 2 4 becomes 1 2 3), each legend line keeps its description with its marker, the line of a marker that is gone is removed (when it holds words, Renumber asks first and shows them) and a marker without a line gets an empty one, all in one undo step. It is explicit on purpose: an automatic renumber after a delete would change numbers while you are still working on the figure and could not be told from an edit.
- No format change. A marker is one group of a shape stroke (the ring) and a text box (the number); the legend is one group of a short rule and a text box. The group id
nbm1.<m|l>.<figure>.<random>links them to their figure (the picture's element id, or a fresh id for ink). Every marker is a group of its own, so one marker moves, is recoloured or deleted alone. Copies (paste, duplicate page) get fresh group ids like any copied group: the copy is a picture with the same numbers and legend, linked to nothing, so it can never change the original or be changed by it. - Safe by construction. An insert that would lie under a redaction box (or when the boxes cannot be read) is refused; a locked legend, a page lock and drawings with states refuse with a reason. A figure holds up to 99 markers. Text boxes are drawn under the ink, so the ring is a tint, never a solid fill that would hide its number.
- Review fixes (I1, I2, I3, I6, I11, I12).
- Renumber markers and Add numbered marker check every item they change, before and after, against the redaction boxes of the page (fail closed when the boxes cannot be read) and refuse with a notice, changing nothing. Before, Renumber was not checked at all: dropping a line made the legend shorter, its area could leave a box that covered its last line, and the next export printed those words in clear. Add only checked its new items, not the legend it extends.
- The legend is rewritten line by line, never re-written from scratch: Add splices ONE line in (written like its neighbours: indentation,
.or)), Renumber changes only the digits at the start of an entry. Blank spacer lines, indentation, headings, notes and any line that is not an entry stay exactly as typed. Only an INDENTED line right under an entry belongs to it; a note after a blank line ("Source: textbook p.4") or an unindented line is free text and is never removed with an entry. Two lines under one number both keep their words and follow their marker (the notice says how many). A legend reordered by hand keeps its order. - Renumber refuses while a marker of the figure is not whole (its number edited into "3a", its ring half erased), so the legend line of such a marker is never taken for the line of a deleted one; Add numbered marker counts its number as taken.
- Study tapes: when a legend line or a marker number that would change lies under a study tape (hidden or revealed), both actions refuse (as the flowchart tidy does) and the person moves the tape first; nothing covered changes unseen. Asking first (as Delete and Cut do) was not chosen: a renumber rewrites many items at once, and the answer under the tape would change, not go.
- Add numbered marker refuses when the longer legend would run past the bottom of a page of fixed size; with only a legend left (all markers deleted), the new marker goes just above the legend instead of to the page centre.
- Known limit (review R8): renumbering changes only the digits of each legend line, which keeps its place, so when the markers' order differs from the legend's line order the legend can read
1. A / 3. B / 2. C; sort the lines by hand.
- Code.
src/ink/figure-markers.ts(group ids, reading a page, the target of a selection, the add and renumber plans; noobsidian),src/model/figure-legend.ts(legend text: parse, add a line, reconcile after a renumber),src/view/figure-marker-tools.ts(the two actions). Tests:tests/figure-markers.test.ts,tests/figure-legend.test.ts,tests/figure-marker-actions.test.ts, harnessdoc=figmarkers.
Tidy flowchart (#245)
- Hand-drawn flowcharts that tidy themselves (#245). Tidy flowchart (All actions › Selection, command palette) on a selection of hand-drawn boxes and arrows: closed strokes are read as rectangles, diamonds and ellipses, arrows (one stroke, or a line with a small V at its end) that start and end on two different boxes become connectors. The boxes are lined up in columns and rows, the gaps between neighbours are evened out, the first box lands on the grid, and every connector is drawn again, straight, from outline to outline (touching the curve of an ellipse or the point of a diamond, not an invisible box around it). The writing, text boxes and equations inside a box move with it; writing within about 22 pt of an arrow and outside every box (a "yes" or a "no") follows the middle of that arrow; any other writing stays.
- Boxes keep their ink. A box is only moved: its strokes keep their points, pressure, pen and style. Only a connector is replaced, by a clean shape stroke with the same colour, width and group; one already clean and untouched stays. Tidying a tidy chart does nothing.
- One undo step, nothing new in the file. The step is made of the existing stroke and element commands (
src/ink/flowchart.ts,src/ink/flowchart-layout.ts,src/view/flowchart-tools.ts), so there is no format change and per-page undo treats it as a single-page step. - Fails closed. It moves nothing when a moved or redrawn item touches a redaction box before or after the move (or the boxes cannot be read), touches a study tape, would leave the page (ink that was on the page may end at most 2 pt off it; only ink that already stuck out gets 6 pt), or when the boxes are too tangled to place (a box inside a box of a similar size, two boxes in one cell). Hidden ink, locked text boxes and ink of drawing-state parts are never touched. A selection across pages is not tidied.
- A letter is not an arrowhead. A small V next to the end of a line is deleted when the line is redrawn as an arrow, so it is only read as a head when it is clearly one: symmetric about the line (wings on either side, 8 to 75 degrees off it and within 30 degrees of each other), small against the line, its tip not deeper than 4 pt inside a box, no other writing within 3 pt of it, and the only candidate of that line. A "V", "L", "<" or ">" that is the first letter of a label or part of a word is left where it is and the line is redrawn as a plain line.
- Limits. Connectors are straight (no right-angle elbows); text is moved, not read (there is no handwriting recognition); a box has to be one closed stroke. Known limit (review R4): a real arrowhead the stricter rules do not recognise (both heads of a double-headed arrow, wings more than 30 degrees apart, a connector under 24 pt, two heads within 3 pt of each other) stays where it was when its line is redrawn, as a stray V near the old end; Undo puts everything back and nothing is deleted.
Timeline (#148)
- Timeline element (#148). Timeline in the All actions insert group opens a dialog: a title, one event per line (
date: label), a colour and a size, with a live picture of the result. The plugin draws an axis spaced in proportion to the time between events, with round ticks, a dot for each event and a flag-style text label that never overlaps another label or crosses another label's pole (labels alternate above and below the axis and stack in bands when crowded). It is ordinary shape strokes and text boxes of one group, inserted in one undo step ("Timeline inserted" in the history panel); it can be moved, restyled and exported like any group. Nothing is added to the document format. - Dates. Plain years (1492), years BC and AD in many spellings (44 BC, 44 a.C., BC 44, -44, AD 1492, d.C.), centuries in Arabic or Roman numerals (5th century BC, V secolo a.C., XV secolo), decades (1960s), ranges (1914-1918, 490-479 BC), calendar dates (1789-07-14, 14/07/1789, 14 July 1789, 14 luglio 1789) and "c." / "circa". There is no year 0 (1 BC is followed by 1 AD). A date or century is placed at its middle. Lines whose date is not understood are listed in the dialog and left out. At most 24 events of 160 characters each.
- Long gaps. When one gap is more than four times all the other gaps together (3000 BC, then 1900 to 1969), it is drawn shortened: a dashed piece of axis with a "//" break and its true length written under it ("4900 years"); the other gaps share the rest of the axis. Ticks are drawn on the proportional parts only.
- Edit timeline. With a timeline selected, Edit timeline reads it back from its text (the first line of each label box is the date as typed, the rest the label; the title is the topmost title-sized box), opens the same dialog filled in, and redraws it in the same place in one undo step. Edit a label's text on the page first and the new date moves its dot on the next edit. Asking again with nothing changed says so. Refused, with a reason and nothing changed, when the timeline is no longer all in view, a box of it is locked, it belongs to a drawing with states, a text box was resized (so it cannot be read back), it would leave the page, or it would touch a redaction box. A copy of a timeline is a picture (the link in the group id is dropped, as for charts).
- Edit timeline, review fixes. (I4) A line the dialog would leave out (a date that is no longer understood, a label over 160 characters, more than the event limit) used to take its label box off the page when you pressed Update; now Update timeline stays disabled and says "Fix or delete the lines listed above" until each such line is fixed or deleted by you (Insert timeline of a new timeline still just lists what it leaves out). (I5) The redrawn timeline keeps the ids of every stroke and label that survives (labels matched by their text, the rest by order) and replaces them in place; only the surplus is removed or added. Undo and Redo of an edit therefore count as moves for the redaction check: after a box was drawn over a label the edit moved, Undo is refused instead of sliding the label out from under the box. The z-order slots of the members are kept too. (I6) An edit is refused with "some of the timeline lies under a study tape" when any old or new item touches a study tape (as the flowchart tidy). (I9) The place an edit keeps is read from the axis (the leftmost horizontal line), not from the first stroke in page order.
- Code. Pure
src/math/timeline-layout.ts(dates, event lines, spacing, ticks, labels),src/ink/timeline.ts(strokes and text boxes, group idnbt1.<colour>.<random>, insert and edit plans),src/view/timeline-dialog.ts,src/view/timeline-tools.ts. Tests:tests/timeline.test.ts,tests/timeline-actions.test.ts, harnessdoc=timeline.
Zettelkasten: card sequences (Z7)
- Card sequences and branches (Z7). With Card ids on Luhmann numbering, New follow-up card (
1a→1b) and New branch card (1a→1a1) make a card from the lasso selection, or from the page in view when it is not a card yet. The card it continues is the numbered card on the page, or one picked from the notebook's numbered cards. The id is the next free one: a taken id, a gap, or a note already named like it never gets reused or overwritten. The usual card dialog opens, without the manual Parent card field. - Walking the numbering. Show card sequence opens a dialog with the parent, previous and next card and the children, each a row that opens its note (from a notebook it also offers the two new-card buttons). Go to previous / next card in the sequence, Go to parent card and Go to child cards work from a card note or from a notebook page that is a numbered card. A parent that no longer exists is skipped, so no card is unreachable.
- Setting. Link new sequence cards to their origin (Settings → Study → Zettelkasten, on by default): both notes get a link to each other in
links, through the same writer as arrows. Nothing else in either note is touched. The sequence commands exist only with Luhmann numbering. - No format change. The structure is the card's
zettel-id; nothing is stored in the notebook. - Review fix: an id above a card that exists is taken. A follow-up of
1awith1b1present (but no1b) is1c, and a branch of1with only1a1present is1b, so a new card never becomes the parent of the cards of a deleted one. Notes named like1b1 Foocount the same way. - Review fix: a card page is not a dead end. New follow-up card / New branch card on a page that is already a card (every page of a slip-box) now adds a new page right after it for the new card (same size and paper, one undo step, added when you press Create, so cancelling leaves the notebook unchanged); a lasso selection still makes the card from the selection. The notebook must be editable, else a notice says why.
- Review fix: no second card for the same page. While a card dialog for a whole page is open the slip-box does not give that page a card of its own, and the card is checked again right before it is written (a page that got its card meanwhile makes a notice, not a second note). The origin card is found again by its id if its note was renamed while the dialog was open, and a notice says when the link with it could not be made. A card's file name is also checked case-insensitively before it is written (
1a Energynext to1A energygets2), as on Windows and Android they are one file. - Review fix (R5): the page added for a card. The card is written to that page found by its id when the queued write runs (pages may move meanwhile), in the notebook as it is then, not as it was when the dialog opened (review T7; a page no longer there gives a "page gone" notice). If the write fails, the page is kept, a notice says why and that Undo removes it, and the page stays "new" so a slip-box notebook gives it a card at the next save (before, it stayed without a card for good); in a slip-box notebook the notice says so (review T6). A failed link with the origin card has its own notice (
sequence.linkFailed). - Code.
src/zettel/sequence.ts(pure: order, parent, siblings, children, next free id;tests/zettel-sequence.test.ts),sequence-view.ts(dialog),service.tsandindex.ts(commands). Harnessdoc=zsequence.