diff --git a/Technotes/EditorLaunchingPolicy.md b/Technotes/EditorLaunchingPolicy.md new file mode 100644 index 0000000..0f84e22 --- /dev/null +++ b/Technotes/EditorLaunchingPolicy.md @@ -0,0 +1,21 @@ +# Editor Launching Policy + +_Last updated: Wednesday, 23 September, 2020_ + +This technote defines the policy for what is loaded in the post editor on app launch. + +The app shall always launch to the post editor. Determining what post should be loaded in the editor requires defining the following: + +- **Last Draft:** The last post with either a `local` or `edited` status to have been loaded into the post editor. It's important to note that a +`published` post that is loaded into the post editor and is then changed becomes an `edited` post, and therefore qualifies as a last draft. + +The launch policy is as follows: + +The app shall launch to the last draft, _except_ when: + +- There is no last draft (i.e., on the first launch of the app); or +- The user's actions signal that they are done working with this last draft: + - The last draft was `published` before quitting the app + - The user's last action in the app was to leave the post editor (iOS) or deselect any post from the post list (macOS). + +In these cases, the app shall launch to a new, blank, `local` post. diff --git a/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj b/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj index 265169e..73828fe 100644 --- a/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj +++ b/WriteFreely-MultiPlatform.xcodeproj/project.pbxproj @@ -101,6 +101,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1709ADDF251B9A110053AF79 /* EditorLaunchingPolicy.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = EditorLaunchingPolicy.md; sourceTree = ""; }; 17120DA424E19CBF002B9F6C /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; 17120DA824E1B2F5002B9F6C /* AccountLogoutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLogoutView.swift; sourceTree = ""; }; 17120DAB24E1B99F002B9F6C /* AccountLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLoginView.swift; sourceTree = ""; }; @@ -193,6 +194,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1709ADDE251B99D40053AF79 /* Technotes */ = { + isa = PBXGroup; + children = ( + 1709ADDF251B9A110053AF79 /* EditorLaunchingPolicy.md */, + ); + path = Technotes; + sourceTree = ""; + }; 17120DA624E19CE2002B9F6C /* Settings */ = { isa = PBXGroup; children = ( @@ -295,6 +304,7 @@ 17DF32CA24C8856C00BCE2E3 /* CHANGELOG.md */, 17DF32C724C8853700BCE2E3 /* CODE_OF_CONDUCT.md */, 17DF32C824C8854B00BCE2E3 /* CONTRIBUTING.md */, + 1709ADDE251B99D40053AF79 /* Technotes */, 17DF328024C87D3300BCE2E3 /* Shared */, 17DF328A24C87D3500BCE2E3 /* iOS */, 17DF329124C87D3500BCE2E3 /* macOS */, diff --git a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist b/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist index 2723ebe..6cd8075 100644 --- a/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_ orderHint - 0 + 1 WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_ orderHint - 1 + 0