Devlog #4: Onboarding and Revised Export Engine + Other improvements.
This is probably the final devlog before i ship my project. Here are the changes i made:
- Onboarding screen : To introduce the user to what Fork() is, i designed and onboarding screen. The screen features a typewriter animation and some bento boxes explaining the usefulness of the app. It introduces the user to the core concepts of the app without overwhelming them. Once dismissed (via a custom checkbox), it saves a flag to localStorage so it never interrupts returning users.
The Shortcuts screen: I also added a small section on the bottom left that shows some of the useful keyboard shortcuts. It breaks down the entire zero-mouse flow (like Cmd + ↵ for child branches and Cmd + B for siblings) so users can reference the hotkeys instantly. By pressing on a Show more shortcuts button, another screen pops up with all of the shortcuts
- SVG & PNG Exports: This was the hardest engineering challenge of the project and took me the longes. Because Fork() uses standard HTML elements ( and ) instead of a raw , exporting it meant reverse-engineering the DOM into an image. Here is what i had to face to perfect these two engines
The Outdated Engine: Initially, I used html2canvas, but it couldn’t understand modern Flexbox math or connecting branch lines, resulting in empty, broken files. I completely swapped the engine to the modern html-to-image library.
The large canvas: Browsers panic when trying to capture a 100,000-pixel infinite canvas. To fix this, I built an invisible staging area. When you click export, the app clones the tree, strips away the UI buttons, removes all absolute coordinates, and uses native CSS to tightly “shrinkwrap” the bounding box around your exact nodes.
The 2MB Chrome Limit: When generating the SVG, Google Chrome kept throwing an XML error. This was because I was putting the raw image data into a URL string, and Chrome silently chops off strings larger than 2 Megabytes.
The Blob Fix: To bypass the browser’s memory limits, I converted the raw data into a Binary Blob stored securely in RAM. By using URL.createObjectURL(blob), the app generates a tiny pointer URL that allows users to instantly download massive, infinite-resolution vector trees without the browser crashing.
Note on SVGs: Because Chrome flags local SVGs containing tags as a security risk, double-clicking the exported file on a desktop shows a blank screen or a cutoff svg file. But if you drag that exact same file into Figma, Illustrator, or Miro, It renders the vector math flawlessly.
- Better UX: I entirely stripped out native browser alert() boxes—which are terrible for UX because they freeze the main browser thread—and built a custom Alert System.
The Loader: Exports now trigger a Loading Screen with three spinning rings. It features a text element that actively cycles through statuses (“Freezing DOM…”, “Processing spatial math…” and some other stuff).
That was my final changes to the website. I just need to write the README.md and then i can officially ship this project