Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Leafdown uses lightweight [Keep a Changelog](https://keepachangelog.com/en/1.1.0
### Added

- Open several documents in one window as tabs. Opening a file, a recent file, an article in the navigator, a link, a search result, or a drop adds a tab after the one you are on, or switches to the tab already holding that file, so opening no longer replaces your document or asks about its unsaved changes. Each tab keeps its own unsaved edits, undo history, place in the document, and search. Switch with a click, `Ctrl+Tab` and `Ctrl+Shift+Tab`, `Ctrl+PageDown` and `Ctrl+PageUp`, or `Ctrl+1` to `Ctrl+9`; close one with `Ctrl+W`, its close button, or a middle click. Closing the window or the folder asks once about every tab with unsaved changes, Find in folder and Replace in folder include the unsaved text of every open tab, and the window's title in the taskbar names the active document.
- Open more than one Leafdown window with File > New window (`Ctrl+Shift+N`), to keep two documents side by side or two folders open at once. Each window has its own tabs, folder, navigator, folder search, and zoom, while settings, recent items, and Always on top apply to every window. A file is open in only one window at a time: opening it from another window switches to its tab and brings its window forward. Renaming a file moves its tabs in every window with their unsaved edits, deleting it leaves other windows' tabs open with the file shown as missing, Save as refuses a file another window has open, and Replace in folder leaves alone a file another window has unsaved edits in. Closing a window asks only about its own unsaved edits, and closing the last one quits Leafdown. File > Quit (`Ctrl+Q`, which no longer closes just the window) closes every window in turn, bringing each one with unsaved edits forward to ask; canceling there keeps that window and the rest open. The first window still reopens where you left it.
- Give Markdown files associated with Leafdown a dedicated folded-page icon with the green leaf and Markdown symbol, separate from the application icon. Both Windows installers include it without changing your default app.
- List a folder's other files, such as images and PDFs, in the article navigator, so a folder holding only those no longer looks empty. They are dimmed, hovering one says that Leafdown can only open Markdown files, and choosing one does nothing; its context menu can still reveal it in File Explorer or copy its path. The article count, the filter, Find in folder, and wiki link suggestions still cover Markdown files only.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ To run one scenario against an already built binary:
pnpm test:e2e:desktop:run -- --scenario folder-watcher
```

Targets are `block-selection`, `callouts`, `command-palette`, `diagnostics`, `document-lifecycle`, `document-watcher`, `find-and-replace`, `keyboard-shortcuts`, `folder-watcher`, `folder-actions`, `folder-search`, `heading-outline`, `help-pages`, `rendered-images`, `remote-images`, `rendered-html`, `rendered-math`, `rendered-mermaid`, `separator-presentation`, `missing-document-error`, `legacy-encoding`, `launch-document`, `persistence`, `release-notes`, `wiki-links`, and `window-lifecycle`. Focused runs use the same isolation, evidence capture, and cleanup as the full suite. The `:run` command does not check binary freshness; run `pnpm build:e2e:desktop` when its inputs change.
Targets are `block-selection`, `callouts`, `command-palette`, `diagnostics`, `document-lifecycle`, `document-watcher`, `find-and-replace`, `keyboard-shortcuts`, `multiple-windows`, `folder-watcher`, `folder-actions`, `folder-search`, `heading-outline`, `help-pages`, `rendered-images`, `remote-images`, `rendered-html`, `rendered-math`, `rendered-mermaid`, `separator-presentation`, `missing-document-error`, `legacy-encoding`, `launch-document`, `persistence`, `release-notes`, `wiki-links`, and `window-lifecycle`. Focused runs use the same isolation, evidence capture, and cleanup as the full suite. The `:run` command does not check binary freshness; run `pnpm build:e2e:desktop` when its inputs change.

For release-build Mermaid timings, build the optimized E2E binary and run the three benchmark cases in PowerShell:

Expand Down
29 changes: 21 additions & 8 deletions docs/architecture.md

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions docs/help/file-and-folder-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ Choose a tab to switch to it. `Mod+Tab` and `Mod+Shift+Tab`, or `Mod+PageDown` a

A newly opened document starts at the top. Following a heading link or choosing a search result instead brings its target into view.

On Windows, installing Leafdown adds it to File Explorer's **Open with** menu for these files and to **Settings > Apps > Default apps**, without changing which app opens them by default. Choose Leafdown there to open Markdown files from File Explorer. Files associated with Leafdown show a folded-page icon with the green leaf and Markdown symbol. Each file opened this way starts its own Leafdown window, with the file's folder as context. **File > Open** works either way.
## Work in more than one window

**File > New window** (`Mod+Shift+N`) opens another Leafdown window, to keep two documents side by side or two folders open at once. Each window has its own tabs, folder, navigator, folder search, and zoom, while settings and recent items are shared and change in every window at once. A file is open in only one window at a time: opening a file that another window already has switches to its tab there and brings that window forward.

Renaming a file or folder in the navigator moves its tabs in every window, keeping their unsaved edits. Deleting one closes its tabs in the window you deleted it from; other windows keep its tabs open with their text and show the file as missing. **Replace in folder** leaves alone a file that another window has with unsaved edits, and says so.

**File > Close window** (`Alt+F4`) or the window's close button asks only about that window's unsaved edits, and closing the last window quits Leafdown. **File > Quit** (`Mod+Q`) closes every window in turn. A window with unsaved edits comes to the front to ask about them, and canceling there stops quitting with that window and those not yet asked still open. The first window reopens where you left it; other windows open offset from the one you opened them from.

On Windows, installing Leafdown adds it to File Explorer's **Open with** menu for these files and to **Settings > Apps > Default apps**, without changing which app opens them by default. Choose Leafdown there to open Markdown files from File Explorer. Files associated with Leafdown show a folded-page icon with the green leaf and Markdown symbol. Each file opened this way starts another instance of Leafdown in its own window, with the file's folder as context; that instance does not know which files the other one has open. **File > Open** works either way.

The welcome screen and **File > Open recent** show previously opened files and folders when **Record recent files and folders** is on. You can remove one recent item or clear both lists without deleting files. See [Settings reference](settings-reference.md) for the setting.

## Work in the article navigator

Choose a Markdown file row to open it. A row's context menu can create a file or folder, rename or delete an entry, reveal its location in the system file manager, or copy its absolute or folder-relative path. Empty navigator space offers actions for the folder root. New files open in a new tab. Deleting asks for confirmation and moves an entry to the system Recycle Bin or Trash; Leafdown does not permanently delete it on its own. Deleting an open file closes its tab. Renaming an open file keeps its unsaved edits and updates its recent path. Links in other files are not rewritten.
Choose a Markdown file row to open it. A row's context menu can create a file or folder, rename or delete an entry, reveal its location in the system file manager, or copy its absolute or folder-relative path. Empty navigator space offers actions for the folder root. New files open in a new tab. Deleting asks for confirmation and moves an entry to the system Recycle Bin or Trash; Leafdown does not permanently delete it on its own. Deleting an open file closes its tab. Renaming an open file keeps its unsaved edits and updates its recent path. Both reach tabs in other windows too, as [Work in more than one window](#work-in-more-than-one-window) describes. Links in other files are not rewritten.

The navigator also lists the folder's other files, such as images and PDFs, dimmed. Leafdown can only open Markdown files, so choosing one of them does nothing, and its context menu does not rename or delete it. A folder holding only such files can still be expanded, while an empty folder has no arrow.

Expand Down
2 changes: 1 addition & 1 deletion docs/help/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Click in the document and type. Leafdown shows Markdown as formatted text while

Choose **File > Save** to write changes. Saving an untitled document opens **Save as**, where you choose its filename and location. **File > Save as** also writes an existing document to a new path. A file saved outside the open folder does not replace that pinned folder context.

Opening a document never closes another: each opens in its own tab. When you close a tab, the folder, or the window with unsaved changes, Leafdown asks before discarding them, and canceling keeps everything open. If another program has changed or removed the file, Leafdown warns before a save can overwrite it or offers Save as for a missing file.
Opening a document never closes another: each opens in its own tab. When you close a tab, the folder, or the window with unsaved changes, or quit Leafdown, Leafdown asks before discarding them, and canceling keeps everything open. If another program has changed or removed the file, Leafdown warns before a save can overwrite it or offers Save as for a missing file.

Continue with [File and folder workflows](file-and-folder-workflows.md) or [Settings reference](settings-reference.md).
2 changes: 1 addition & 1 deletion docs/help/settings-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Open **File > Preferences** to change the settings below. Changes persist across
- **Status bar visibility:** Show or hide document status when a document is open.
- **Article sort order:** Sort the navigator by name, modified date, or type.

**View > Always on top** is another persistent window setting; it keeps Leafdown above other windows until switched off.
**View > Always on top** is another persistent window setting; it keeps every Leafdown window above other windows until switched off.

The **H1 to H6** control at the top of the document outline is also remembered across launches. It chooses how deep the outline lists headings, H1–H3 by default.

Expand Down
5 changes: 3 additions & 2 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Shortcuts use `Mod` as the primary platform modifier (`Ctrl` on Windows/Linux, `
#### File Menu

- **New** (`Mod+N`)
- **New window** (`Mod+Shift+N`, Deferred)
- **New window** (`Mod+Shift+N`)
- **Open...** (`Mod+O`)
- **Open folder...** (`Mod+Shift+O`)
- **Open recent**
Expand All @@ -106,7 +106,8 @@ Shortcuts use `Mod` as the primary platform modifier (`Ctrl` on Windows/Linux, `
- **Preferences...** (`Mod+,`)
- **Close document** (`Mod+W`)
- **Close folder**
- **Close window** (`Alt+F4` / `Mod+Q`)
- **Close window** (`Alt+F4`)
- **Quit** (`Mod+Q`)

#### Edit Menu

Expand Down
Loading