feat(todo): comments and descriptions in the editor (ADR 0033, D38)
Comments and the descriptions of tasks, projects, sections and filters become the editor's document on halkyon_editor; names and titles stay text. Rows written as text read as notes and become documents when next saved, the server seeing only sealed bytes, so there is no migration. Sections' descriptions can now be written, and a project's shows above its tasks. Android answers whether a link can open only for what is declared, so Todo declares http and https. Whats-New: Comments and descriptions take rich text: headings, lists, checklists, links and more. Whats-New-De: Kommentare und Beschreibungen können jetzt formatiert werden: Überschriften, Listen, Checklisten, Links und mehr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
648dfe4051
commit
a25cca12b4
1 changed files with 645 additions and 282 deletions
|
|
@ -735,6 +735,12 @@ Reporting is worked out on the device from what tasks keep (`completedAt`, `comp
|
|||
|
||||
What is Learn's alone stayed in Learn, on top of the package: formula, callout, spoiler, file and YouTube blocks, ruby, Markdown, `rich_text_screen`, `save_status`, `core_blocks`, the study button, grammar. Nothing in the package may know them, so what the editor took from them directly is inverted: `EditorBlocks` gains `textMarks` (ruby and formulas drawn within lines), `formatActions` (their buttons, in the same place, after subscript) and `onEditorClosed` (a reading shown over the pointer taken away), and `RichContentEditor` a `wrapEditor` (the grammar host). An `InsertableBlock`'s name now takes the `BuildContext`, not Learn's `AppLocalizations`, and `offering` narrows what an editor offers keeping the rest (the discussion composer). Learn's screens use `LearnContentEditor` and `LearnContentView`, thin wrappers in `core/editor/learn_content.dart` passing Learn's blocks and turning `grammar` into the wrapper; a global default the app sets instead would have left every widget test without Learn's blocks, and the package's own default is `basicBlocks`, so that Todo gets a working editor with no setup. `RichContent` stays pure Dart in a Flutter package: nothing outside the apps reads it today; a server that had to would move it to a pure Dart package then.
|
||||
|
||||
**D38. What is written at length is a note, in the editor** (the developer's, 6 Nov 2026, after trying D36). Comments and the descriptions of tasks, projects, sections and filters are `RichContent` from `halkyon_editor` (D37), stored in their sealed payloads as the editor's document, which supersedes the Markdown D36's comments were left for; names and titles stay text. No migration: the server sees only sealed bytes, so `readNote` reads either shape and a row written as text becomes a document when next saved. The payloads stay schema 1, since Todo isn't released: a build from before D38 can't read a row written since, as a phone with both would show, and that is accepted now and would not be once it is. A row of a newer document format is skipped rather than read half. `src/core/note/` holds it: search, filters' `search:`, the table's column, rows and one-line previews read the plain text. A note holding nothing is left out of its payload, so "no description" stays one state.
|
||||
|
||||
Where a note is written follows what it is: a comment, quick add, and the project's, section's and filter's dialogs write it in place (`NoteComposer`, as high as its lines, the format bar while it has the focus); a task's description and a comment being changed open the whole window (`editNote`, as Learn's `editRichText`), and leaving it however it is left keeps what was written, as the field did when it lost the focus. Addresses written in a note become links as it is saved, http and https alone (`withLinks`), as comments had them. The editor asks Android whether a link can open before opening it, so Todo declares both schemes under `<queries>`. Sections had a description in their payload that nothing could write, and projects one that nothing showed: the section's dialog now writes it, and a project's list shows it above its tasks.
|
||||
|
||||
A comment's layout follows Todoist's (D36): a task's sheet shows how many, the latest on one line and Show all, with the bar at its foot; comments open on a sheet of their own, each in its box, the latest in view, the field staying at the foot. Reactions are a list of emoji in the comment's payload, each once, from `emoji_picker_flutter` (MIT), whose recents stay on the device; a chip's tap takes its reaction off. With one person on a comment each counts 1, and the list has no names to carry when sharing comes.
|
||||
|
||||
## Steps
|
||||
|
||||
1. **The frame**: go_router and `NavigationFrame` with the four tabs (empty screens that
|
||||
|
|
|
|||
Loading…
Reference in a new issue