Skip to content

Commit afd727c

Browse files
author
Tim Sinaeve
committed
feat: multi-format export, treeview navigation, manual save, and synchronized zoom (v0.9.6)
- PlantUML multi-format export (PNG, SVG, JPEG, PUML) with local Java and remote server fallback - Markdown standalone offline HTML export with self-contained styling - Treeview keyboard navigation supporting Home, End, PageUp, PageDown, and Shift range selection - Manual Ctrl+S save committing to history with dynamic toolbar save button state - Display active document version number in status bar next to last save time - Synchronize Ctrl+Wheel code editor and preview zoom with status bar readout and controls - Fix template keyboard navigation boundary when templates list is collapsed - Harden drag-and-drop HTML link extraction against freezes and resolve localhost webview white screen - Add dedicated New Web Link modal in sidebar toolbar - Bump version to v0.9.6 and update all documentation
1 parent b22cf6c commit afd727c

47 files changed

Lines changed: 3133 additions & 222 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ npm-test.png
3030
*.sln
3131
*.sw?
3232
/release
33+
google/

‎App.tsx‎

Lines changed: 94 additions & 9 deletions
Large diffs are not rendered by default.

‎FUNCTIONAL_MANUAL.md‎

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ The resizable left panel is your main navigation and organization area.
3636
- **Templates List:** A separate panel below your documents for managing reusable templates. This panel is resizable; you can drag its top border to adjust its height.
3737
- **Action Toolbar:** The templates panel has its own toolbar for creating new templates.
3838

39-
The entire list of documents and templates can be navigated using your keyboard's arrow keys. Use `Up`/`Down` to move between items, `Right` to expand a folder, `Left` to collapse a folder (or move to its parent), and `Enter` to open the selected item. Alternatively, right-clicking on an item or in the empty space of the sidebar will open a context menu with common actions.
39+
The entire list of documents and templates can be navigated using your keyboard:
40+
- Use `Up`/`Down` to move between adjacent items.
41+
- Use `PageUp`/`PageDown` (or `PgUp`/`PgDn`) to jump by page through long lists.
42+
- Use `Home` or `End` to jump immediately to the top or bottom of the document tree.
43+
- Hold `Shift` with any of these keys (`Shift+Up/Down`, `Shift+PageUp/PageDown`, `Shift+Home/End`) to perform continuous range selections.
44+
- Use `Right` to expand a folder, `Left` to collapse a folder (or jump to its parent), and `Enter` to open the selected item.
45+
- When the **Templates** panel is collapsed, keyboard navigation smartly restricts focus to your document tree, preventing unintended scrolling into hidden template entries.
46+
Alternatively, right-clicking on an item or in the empty space of the sidebar will open a context menu with common actions.
4047

4148
### The Main Content Area
4249

@@ -78,7 +85,8 @@ The bar at the bottom of the window provides at-a-glance information about the a
7885

7986
- **LLM Connection Status:** A colored dot (green for connected, red for error) and text indicating the connection status to your local AI provider.
8087
- **Provider & Model Selection:** Dropdown menus to see the currently configured LLM provider and model, and to quickly switch between other detected services and their available models.
81-
- **Statistics:** Shows the total number of documents and the last save time for the active document.
88+
- **Statistics:** Shows the total number of documents, the active document's current version (e.g., `v3`), and the last save timestamp.
89+
- **Save State Feedback:** The save button in the editor toolbar visually transitions across states: `Dirty` (highlighted) → `Saving` (animated spinner) → `Saved` (green checkmark with confirmation tooltip). Pressing `Ctrl+S` manually creates and commits a new version to history.
8290
- **Workspace Zoom:** A single cluster of zoom buttons, percentage readout, and reset control that automatically targets the preview or editor depending on which pane has focus. Zoom adjustments now move in 5% increments for precise scaling.
8391
- **App Version:** Displays the current version of DocForge.
8492

@@ -90,19 +98,26 @@ The bar at the bottom of the window provides at-a-glance information about the a
9098

9199
- **New Document:** Click the `+` icon at the top of the sidebar or use the `Ctrl+N` shortcut. New documents default to Markdown.
92100
- **New Code File:** Click the code icon. A dialog will appear asking you to provide a filename with an extension (e.g., `script.js`) for automatic language detection.
101+
- **New Web Link:** Click the globe icon in the sidebar toolbar, choose "New Web Link" from the empty-space context menu, or run the `New Web Link` command (`new-weblink`). Enter a URL, and DocForge will auto-derive a clean title from the address path and create the link under the selected folder or root workspace.
93102
- **New from Clipboard:** Use the command palette entry or sidebar menu item to create a document from the current clipboard contents. DocForge will import the text verbatim, detect the document type automatically, generate a title with your connected LLM when it's online, and report the classification in the activity log. If clipboard access is denied, the app shows guidance for restoring permissions.
94103
- **New Root Folder:** Click the folder icon with a `+` to create a new folder at the root of your document list.
95104
- **New Subfolder:** Select an existing folder and click the "New Subfolder" icon to create a folder inside it.
96105
- **Duplicate Selection:** Select one or more items and click the "Duplicate" icon to create a deep copy.
97106

98107
### Exporting Documents
99108

100-
Use the **Save to File…** action whenever you need a local copy of a document outside DocForge.
101-
102-
- **From the Sidebar:** Hover a document in the tree and click the floppy disk quick action, or open the item's context menu and choose **Save to File…**.
103-
- **From the Command Palette:** Type `Save Document to File` to export whichever document is currently focused in the tree.
104-
- **Suggested Filenames:** DocForge proposes a sanitized filename based on the document title and strips any duplicate extension you might already have in the title.
105-
- **Smart Extensions:** The exporter inspects the document type, detected language mode, and embedded MIME hints (for images and PDFs) to choose the most appropriate file extension automatically.
109+
Use the **Save to File…** action whenever you need a local copy of a document outside DocForge:
110+
111+
- **Export Toolbar Dropdown:** When viewing documents with multiple export formats (such as PlantUML and Markdown), the toolbar Save/Download button displays a split dropdown menu with dedicated format options.
112+
- **PlantUML Multi-Format Export:** PlantUML diagrams can be exported into four distinct formats:
113+
- **PNG Image (`.png`):** High-DPI raster image (2x scale) with a transparent background, perfect for presentations and embedding in light or dark themes.
114+
- **SVG Vector (`.svg`):** Scalable vector graphic that remains razor-sharp at any resolution.
115+
- **JPEG Image (`.jpg`):** High-resolution raster image with a solid white background.
116+
- **PlantUML Source (`.puml`):** Plain source text for sharing or backup.
117+
*Rendering uses local Java PlantUML in Electron when available, with automatic remote service fallback.*
118+
- **Markdown to Standalone HTML:** Export any Markdown document as a completely self-contained `.html` file. It bundles GitHub-inspired typography, tables, and code syntax styling, allowing it to be viewed offline in any standard web browser without external network calls.
119+
- **From Context Menus:** Right-click any document in the treeview to access format-specific export options (*Save to File...*, *Save as HTML...*, *Save as PNG...*, *Save as SVG...*, *Save as JPEG...*).
120+
- **Suggested Filenames & Extensions:** DocForge automatically proposes a sanitized filename with the appropriate format extension.
106121
- **Binary Support:** Binary payloads such as PDFs and images are decoded before saving, so the exported file opens natively.
107122
- **Desktop & Browser Friendly:** On Electron builds the action opens the operating system's save dialog; the web preview falls back to a standard browser download prompt.
108123

@@ -137,7 +152,7 @@ Import PDFs by dragging `.pdf` files from your operating system into the sidebar
137152

138153
#### Image Documents
139154

140-
PNG, JPEG, GIF, BMP, WEBP, and SVG assets are detected when you import them from disk, drop them into the sidebar, or pipe image data through **New from Clipboard**. Image documents also open directly in **Preview Only** mode. The preview uses DocForge's zoom and pan surface so you can scroll, drag to reposition, double-click to zoom, or press the on-screen controls to reset the view. Image metadata—such as pixel dimensions and MIME type—appears in the status bar while the preview is active.
155+
PNG, JPEG, GIF, BMP, WEBP, and SVG assets are detected when you import them from disk, drop them into the sidebar, or pipe image data through **New from Clipboard**. Image documents also open directly in **Preview Only** mode. The preview uses DocForge's zoom and pan surface so you can scroll, drag to reposition, double-click to zoom, or use `Ctrl + Wheel` to zoom seamlessly. The workspace zoom controls automatically target the image preview container. Image metadata—such as pixel dimensions and MIME type—appears in the status bar while the preview is active.
141156

142157
**Interacting with Images**:
143158
- **Pasting**: When an image document is open and unlocked, you can paste an image directly from your clipboard (**Ctrl+V**) to replace its content.
@@ -148,10 +163,11 @@ Import PDFs by dragging `.pdf` files from your operating system into the sidebar
148163

149164
#### Web Link Documents
150165

151-
DocForge supports a dedicated **Web Link** (`weblink`) document type. This lets you import and display external web pages directly within the workspace.
166+
DocForge supports a dedicated **Web Link** (`weblink`) document type. This lets you import, create, and display external web pages directly within the workspace.
152167

153-
- **Importing via Drag & Drop:** Drag any website address or link directly from your web browser (e.g. Chrome, Edge, Firefox) and drop it into a folder in the sidebar or onto the empty tree area. A new web link node is automatically created, displaying the website icon and a clean title extracted from the link (e.g. `google.com/search`). You can also drop links onto the middle editor area to import and load them instantly.
154-
- **Embedded Custom Browser:** When you select a web link node, the editor opens a custom, full-bleed web browser interface under the document toolbar.
168+
- **Manual Creation:** Click the **New Web Link** toolbar button (`GlobeIcon`) or use the `New Web Link` command (`new-weblink`) to create a web link document with a target URL and custom or auto-derived title.
169+
- **Importing via Drag & Drop:** Drag any website address or link directly from your web browser (e.g. Chrome, Edge, Firefox) and drop it into a folder in the sidebar or onto the empty tree area. Protected against large or malicious HTML payloads, the parser safely extracts the target link and creates a web link node.
170+
- **Embedded Custom Browser:** When you select a web link node, the editor opens a custom, full-bleed web browser interface under the document toolbar. It supports external websites as well as local development servers (`localhost`, `127.0.0.1`), popup windows, and provides a built-in error recovery screen.
155171
- **Toolbar Navigation & Controls:** The browser includes controls to navigate back and forward, reload the page, and open the active page in your system's default browser.
156172
- **Editable Address Bar:** You can double-click or focus the browser's address bar to directly type a new URL and press `Enter` to navigate.
157173
- **Manual Versioning ("Save Location"):** As you navigate within the webview, if the URL changes, the "Save Location" (floppy disk) icon lights up. Click it to manually save the current navigated URL into the database, generating a new document version that preserves your browsing location.

‎README.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ DocForge is a desktop application designed to streamline the process of creating
1717
- **Emoji-Enhanced Titles:** Insert emoji directly into document and folder names or let the AI suggest a prefix so your workspace stays scannable at a glance.
1818
- **Multi-Document Tabs:** Keep several documents open at once, pin important files, and quickly jump between them using the tab strip and overflow picker.
1919
- **Multi-Format Live Preview:** Get a real-time, rendered preview for Markdown, HTML, PDFs, and common image formats. The preview can be displayed side-by-side (vertically or horizontally) with the editor, and binary formats open straight into preview mode with zoom and pan controls tailored to each viewer.
20-
- **Embedded Web Browsing:** Drag and drop external web links directly into folders or the editor workspace to create document nodes that load and display corresponding websites in an integrated, sandboxed webview. Features complete navigation controls, editable address inputs, locking support, and manual location saving as versioned documents.
21-
- **Focused Workspace Zoom:** Use a single set of zoom controls that automatically follow whichever pane—editor or preview—has focus, complete with 5% increments, keyboard and mouse support, and quick resets.
20+
- **Embedded Web Browsing & Web Links:** Create web links manually or drag and drop external links from your browser. Display websites inside an integrated, sandboxed webview supporting local development servers (`localhost`), popup windows, address navigation, and versioned URL saving.
21+
- **Focused Workspace Zoom:** Use a single set of zoom controls that automatically follow whichever pane—editor or preview—has focus, complete with 5% increments, Ctrl+Wheel zoom in Monaco and image preview containers, and quick resets.
2222
- **AI-Powered Refinement:** Use your connected local LLM to automatically refine and improve your documents with a single click.
2323
- **Document Templating:** Create reusable document templates with variables to quickly generate new documents for recurring tasks.
24-
- **Document Export:** Save any document to your filesystem with a suggested filename and the correct extension for its detected type, whether you're running the Electron app or using the browser build.
24+
- **Multi-Format Document Export:** Save any document to your filesystem with format-specific choices:
25+
- **PlantUML:** Export directly to **PNG** (high-DPI with transparent background), **SVG** vector, **JPEG**, or raw **PUML** source.
26+
- **Markdown:** Export as standalone, styled **HTML** documents with embedded CSS that open completely offline in any browser.
27+
- **Standard Files:** Export with smart extension inference for code, PDFs, images, and text.
28+
- **Comprehensive Keyboard Navigation:** Seamlessly browse your document tree using `Arrow` keys, `PageUp`/`PageDown`, and `Home`/`End`, with `Shift` modifiers for continuous range selections and smart isolation when templates are collapsed.
29+
- **Version History & Live Save Feedback:** Explicitly save new document versions via `Ctrl+S` with dynamic toolbar state feedback (dirty, saving spinner, saved checkmark), view diffs, restore points in time, and see active document versions in the status bar.
2530
- **Google Drive Cloud Sync:** Link DocForge to your Google account using custom OAuth credentials. Securely syncs your SQLite database to an isolated, private space (`drive.appdata`) on Google Drive, complete with automatic startup/shutdown sync options and robust conflict resolution.
2631
- **Integrated Python Workflow:** Open an inline Python console tied to your documents to execute snippets, review logs, and manage isolated environments without leaving DocForge.
2732
- **Shell & PowerShell Execution:** Run or syntax-test scripts directly from the editor with per-document environment overrides that merge with workspace defaults configured in Settings.

0 commit comments

Comments
 (0)