Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

History, versions and changes

Revisions, restoring and copying versions, and the change view between versions. Decisions: D-04, D-37, D-38, D-43.

Revisions

  • Every real save makes a revision linked to its parent; a no-op save doesn’t
    • Shared: NotesCoreTest.everySaveCreatesRevisionButNoOpSaveDoesNot
    • Not tested: Android UI, iOS UI
  • Saves within a minute collapse into the latest version
    • Shared: NotesCoreTest.savesWithinAMinuteKeepOnlyTheLatestVersion
    • Not tested: Android UI, iOS UI
  • History lists versions; restoring one adds a RESTORE revision and keeps the rest
    • Shared: NotesCoreTest.restoreCreatesNewRevisionAndKeepsHistory
    • Android UI: HistorySearchTrashUiTest.historyListsVersionsAndRestoresOne
    • iOS UI: HistorySearchTrashUITests.HistoryListsVersionsAndRestoresOne
  • Copying a version makes a new note “(copy)” in the same notebook
    • Shared: NotesCoreTest.copyRevisionToNewNote
    • Android UI: HistorySearchTrashUiTest.copyingAVersionMakesANewNote
    • iOS UI: HistorySearchTrashUITests.CopyingAVersionMakesANewNote
  • A version’s changes compare with the version before it, even across a hidden move
    • Shared: NotesCoreTest.versionChangesCompareWithTheVersionBefore
    • Not tested: Android UI, iOS UI
  • Move, delete and undelete are stored as revisions but left out of history; restoring a version doesn’t move the note (D-43)
    • Shared: NotesCoreTest.moveDeleteUndelete, NotesCoreTest.savesWithinAMinuteKeepOnlyTheLatestVersion, OrganizingTest.deletingANotebookMovesItsNotesToTheTopLevelAndUndoPutsThemBack
    • Android UI: HistorySearchTrashUiTest.historyListsVersionsAndRestoresOne (a move only; the note is moved, then a checklist tick after it shows as the current version)
    • iOS UI: HistorySearchTrashUITests.HistoryListsVersionsAndRestoresOne (same)
    • Not tested: Android UI, iOS UI (delete and undelete; the newest shown version being marked current when a move is the latest revision)

Change view (RevisionDiffTest)

BehaviorShared
The first version shows everything as added (D-38)firstVersionIsAllAdded
A word change is shown with its lineshowsAWordChangeWithItsLine
Neighboring word changes joinjoinsAdjacentWordChanges
Changes on distant lines are separate hunksseparatesChangesOnDistantLines
Changes on neighboring lines stay in one hunkkeepsChangesOnNeighbouringLinesTogether
Context is capped at about 100 characters per side (D-38)capsContextAtAboutAHundredCharacters
Added and removed linesshowsAddedAndRemovedLines
Formatting alone is not a change (D-37)formattingAloneIsNotAChange
Checking a task is a changecheckingATaskIsAChange
A rename is not a changeaRenameIsNotAChange
Whitespace-only changes are shownshowsWhitespaceOnlyChanges
Large rewrites are handled (edit cap)handlesLargeRewrites

The earlier-version screen is in screenshots.md (earlierVersion on both platforms).

Gaps

  • Accessibility of the change view: screen readers hearing “added:” and “removed:”, and removed text being struck through as well as red, are untested. Only the screenshots show the look.
  • “Formatting changes only” label on a version with no text changes has no UI test.
  • History of a trashed note (viewing or restoring from the trash) is untested.