Skip to content

Feature Request: Diff draft against saved page #567

Description

@rhartmann

Hey, I recently faced this so I thought I'd suggest a change / feature.

Whether you want to discard or use a page draft becomes hard to decide when the page is large and the edits are minor. Imagine three pages worth of text with a little typo in it. Someone fixed the typo but forgot to save the change. Or maybe just a single word added or removed in the draft.

When you want to edit the page, An Otter Wiki smacks three pages worth of text at your face - twice side by side. Good luck finding the difference between the draft and the saved page.

I would find it much easier to decide "discard or keep" if the draft was diffed against the saved page. Similar to comparing page revisions, the diff should indicate removals and additions by red and green color.

Whether that diff should be inline or side by side is probably subject to personal preference. I guess the user should be able to choose the diff mode.

Python difflib.unified_diff may be sufficient for inline diffing as we know it from git diff. For side by side diffing, difflib.HtmlDiff might do the trick.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions