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
- Shared:
- Saves within a minute collapse into the latest version
- Shared:
NotesCoreTest.savesWithinAMinuteKeepOnlyTheLatestVersion - Not tested: Android UI, iOS UI
- Shared:
- History lists versions; restoring one adds a RESTORE revision and keeps the rest
- Shared:
NotesCoreTest.restoreCreatesNewRevisionAndKeepsHistory - Android UI:
HistorySearchTrashUiTest.historyListsVersionsAndRestoresOne - iOS UI:
HistorySearchTrashUITests.HistoryListsVersionsAndRestoresOne
- Shared:
- Copying a version makes a new note “(copy)” in the same notebook
- Shared:
NotesCoreTest.copyRevisionToNewNote - Android UI:
HistorySearchTrashUiTest.copyingAVersionMakesANewNote - iOS UI:
HistorySearchTrashUITests.CopyingAVersionMakesANewNote
- Shared:
- A version’s changes compare with the version before it, even across a hidden move
- Shared:
NotesCoreTest.versionChangesCompareWithTheVersionBefore - Not tested: Android UI, iOS UI
- Shared:
- 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)
- Shared:
Change view (RevisionDiffTest)
| Behavior | Shared |
|---|---|
| The first version shows everything as added (D-38) | firstVersionIsAllAdded |
| A word change is shown with its line | showsAWordChangeWithItsLine |
| Neighboring word changes join | joinsAdjacentWordChanges |
| Changes on distant lines are separate hunks | separatesChangesOnDistantLines |
| Changes on neighboring lines stay in one hunk | keepsChangesOnNeighbouringLinesTogether |
| Context is capped at about 100 characters per side (D-38) | capsContextAtAboutAHundredCharacters |
| Added and removed lines | showsAddedAndRemovedLines |
| Formatting alone is not a change (D-37) | formattingAloneIsNotAChange |
| Checking a task is a change | checkingATaskIsAChange |
| A rename is not a change | aRenameIsNotAChange |
| Whitespace-only changes are shown | showsWhitespaceOnlyChanges |
| 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.