feat(editor): add realistic sample document
This commit is contained in:
parent
820099ddad
commit
9b13766359
1 changed files with 50 additions and 8 deletions
|
|
@ -46,21 +46,63 @@ public enum SaplingSampleData {
|
|||
|
||||
public static var document: MarkdownDocument {
|
||||
MarkdownDocument(
|
||||
url: rootURL.appendingPathComponent("Research/README.md"),
|
||||
title: "README",
|
||||
url: rootURL.appendingPathComponent("Writing/Editor Prototype.md"),
|
||||
title: "Editor Prototype",
|
||||
content: """
|
||||
# Sapling
|
||||
# Editor Prototype Notes
|
||||
|
||||
Sapling is a **Git-native** Markdown workspace.
|
||||
This document exists to test whether Sapling feels comfortable as a writing surface. It should be long enough to scroll, varied enough to exercise Markdown styling, and plain enough that the editor itself stays out of the way.
|
||||
|
||||
- [x] Model local workspaces
|
||||
- [ ] Render inactive Markdown lines
|
||||
The goal for Milestone 1 is not a complete editor. The goal is confidence: text should be easy to enter, easy to revise, and easy to navigate without thinking about the machinery underneath.
|
||||
|
||||
## What Good Feels Like
|
||||
|
||||
A comfortable editor creates very little friction. The cursor lands where expected. Selection feels native. The page has enough breathing room that long paragraphs are readable, but not so much decoration that the document becomes secondary.
|
||||
|
||||
Useful qualities:
|
||||
|
||||
- The editor owns most of the window.
|
||||
- Lines are not stretched across the entire screen.
|
||||
- The current line is visible without shouting.
|
||||
- Arrow keys, word navigation, and page navigation behave normally.
|
||||
- Markdown styling helps scanning but never blocks editing.
|
||||
|
||||
## Navigation Checklist
|
||||
|
||||
Use this section for quick keyboard testing.
|
||||
|
||||
- [ ] Move with arrow keys.
|
||||
- [ ] Jump by word with Option + Arrow.
|
||||
- [ ] Extend selection with Shift + Arrow.
|
||||
- [ ] Select across multiple lines.
|
||||
- [ ] Use Home, End, Page Up, and Page Down.
|
||||
- [ ] Type into the active line after moving quickly.
|
||||
|
||||
## A Normal Paragraph
|
||||
|
||||
Sapling should support the kind of writing that happens in notes, design documents, research logs, and project journals. That means paragraphs should feel calm and readable. The editor should avoid cramped edges, unexpected jumps, and visual noise that pulls attention away from the sentence currently being written.
|
||||
|
||||
Inline Markdown should remain understandable: **strong emphasis** should be easy to spot, *light emphasis* should remain subtle, and links like [Sapling](https://example.com/sapling) should be legible even before full rendering exists.
|
||||
|
||||
## Code Sample
|
||||
|
||||
```swift
|
||||
let workspace = Workspace(name: "Research", rootURL: url)
|
||||
struct EditorExperiment {
|
||||
var activeLine: Int
|
||||
var preservesSelection: Bool
|
||||
|
||||
mutating func move(to line: Int) {
|
||||
activeLine = line
|
||||
preservesSelection = true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
## Notes While Testing
|
||||
|
||||
Add observations here while using the prototype for ten or fifteen minutes. The best findings are usually small: a cursor jump, a line that feels too wide, a shortcut that does not behave like a native editor, or a status indicator that creates more distraction than value.
|
||||
|
||||
The prototype is successful when this document feels like something you can keep editing rather than something you are merely testing.
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue