Porting notes
Notr is a port of NoteSpace by Wiesław Šoltés, from C#, .NET 10, Uno Platform and SkiaSharp to Rust and GPUI, with SQLite in place of JSON-file and IndexedDB storage. It keeps NoteSpace's model, commands, layout and file format.
Where things went
| NoteSpace | Notr |
|---|---|
NoteSpace.Core: model, validation, JSON, section groups, sample |
notr-core: model.rs, validate.rs, interchange.rs, groups.rs, sample.rs |
NoteSpace.Editor: EditorSession, RichText, NoteTable, NoteSearch, PageOutline, InkGeometry |
notr-core: session.rs, rich_text.rs, table.rs, search.rs, outline.rs, ink.rs |
NoteSpace.Storage: IWorkspaceStore, file store, snapshots, export |
notr-store (SQLite), plus notr-core/interchange.rs for export and import |
NoteSpace.Rendering.Skia: PageRenderer, text layout, caches, PNG |
notr: surface.rs, layout.rs, png.rs |
NoteSpace.Controls: NoteSurface, PageListControl, NotebookNavigator, RibbonControl, theme, icons |
notr: surface.rs, editor.rs, panes.rs, ribbon.rs, theme.rs, assets/icons/ |
NoteSpace.App: WorkspaceView and its commands, dialogs, files, search |
notr: workbench.rs, commands.rs, dialogs.rs, files.rs, search_pane.rs |
| Browser host (WebAssembly, IndexedDB) | Not ported; Notr is a macOS app |
As in NoteSpace, the model and editing have no UI dependencies: notr-core depends on
neither GPUI nor SQLite.
What stayed the same
- The
.notespaceformat, with the same validation limits. See The .notespace format. - The model: free-form pages of positioned blocks, formatting marks in UTF-16 ranges with last-mark-wins, ink strokes, a flat page list with levels, section groups as a notebook-local graph, the recycle bin and page versions.
- Transactions: every command is one validated transaction with a named undo step; invalid results are rolled back; no-op edits leave no history; page edits snapshot only the page.
- The commands: the ribbon's tabs, groups and commands, the context menus, the templates, the sample notebook and the wording of most messages.
- The page's look: header, paper patterns, container chrome, table and to-do drawing, tag glyphs and colors, and the text layout rules (word pieces, 1.45 line height, 12-point padding, 24-point list indent).
- The icons: NoteSpace's own line-icon paths (MIT).
What's different
- Storage. A SQLite database with one row per object instead of one JSON document, saved incrementally; conflict detection uses a generation counter instead of a content hash. See Storage.
- The editor. NoteSpace edits a note in a plain native text box over the Skia canvas; Notr's editor lays the note out with the same code as the page, so formatting is visible while you type.
- Lists. Bullets and numbers mark each paragraph. NoteSpace's layout put a marker on every wrapped line.
- Undo. Undo and redo restore document content only: theme, zoom and layout stay as they are. History is bounded by an estimated 64 MiB and 100 entries, and snapshots share attachment bytes instead of copying JSON strings.
- Validation per page. A page edit validates the page rather than the whole workspace. Workspace transactions and every load still validate everything. The 32 MiB interchange limit applies to backups, not to the database.
- Fonts. Windows families map to Mac fonts; the font list is of fonts macOS has.
- Shortcuts follow macOS: ⌘ instead of Ctrl, ⇧⌘Z for redo, ⌥⌘F for Replace (⌘H hides the app on a Mac).
- Dialogs. Messages and confirmations are native alerts; the others are GPUI overlays.
- PNG export renders an SVG of the page with resvg, with line breaks from the screen layout, instead of re-rendering with Skia.
- Version IDs. Page versions get an
id, so the database can write each one once. NoteSpace ignores it. - Not ported: the WebAssembly browser host and its IndexedDB store, the diagnostics JSON the app reports to browser tests, and the spatial index and render caches (GPUI's text shaping cache and viewport culling cover typical pages).