Fossil SCM

branch/forum-editor-2026

2 months, 2 weeks ago by stephan

The purposes of the forum-editor-2026 branch is to take the first steps in "ajaxifying" the forum editing and response process. The goals include:

  • A more modern editing approach than the legacy forms account for. e.g. edits and responses can now be made without leaving the thread list.
  • Improve attachment support. e.g. we can attach multiple files at once, attach from the clipboard, and attach during the initial edit of a post (historically we could not attach until saving the post so future attachments had a target).
  • Drafts: it stores a separate draft copy of each new post, edit, and response in localStorage or sessionStorage (if available) each time the editor fields lose focus, so edits are not lost when leaving the page. Stale drafts are reaped at random intervals. Each draft is keyed to the post it's editing or replying to, so multiple edits and/or replies can be active at any one time.

For the most part this branch "hijacks" the UI for certain pages during loading to replace legacy buttons and controls with the new stuff, which allows it to continue working using the legacy forms if JS is disabled.

Quirks:

  • Saving a response or edit will, on success, redirect back to the edited or new post in order to reload the page. Ideally JS could update the page as needed, but lots of necessary metadata are out of its reach, e.g. the post sequence numbers and versions which may have arrived while editing. Getting the UI to a point where we could do all of the manipulation in JS is a potential later change, not part of this one.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button