Commit Graph

82 Commits

Author SHA1 Message Date
Angelo Stavrow
53ab32b7a3
Prep Mac app for release, fix bugs in iOS app (#258)
* Update Sparkle to latest version

* Bump minimum macOS target

For launch, I propose we support the current version of macOS (14.x) and one version earlier (13.x).

* Add WFNavigation wrapper to use NavigationSplitView in macOS

* Replace NavigationView with WFNavigation in ContentView

* Fix deprecation warnings on locale

* Update docs for updating the Mac app

* Fix for being sent back to post list on app reactivate

* Bump build version

* Remove debugging statements

* Bump Sparkle version to address security fix
2024-07-28 06:02:02 -04:00
Angelo Stavrow
3f424b399a
Improve offline experience (#255) 2023-10-23 17:15:41 -04:00
Angelo Stavrow
39a78c56b6
Fix sharing picker and prep for v1.0 release of Mac app (#242)
* Present sharing menu in background, not popover

* Write logs to new post (#236)

* Set the post editor font in the updateUIView method (#237)

* Wrap becomeFirstResponder in async dispatch

This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Set the font in the updateUIView method

* Bump build number and update change log

* Don't navigate to new/last draft on launch (#238)

* Only navigate to new/last draft on launch on macOS

This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

* Bump build number and update change log

* Revert "Don't navigate to new/last draft on launch (#238)" (#239)

This reverts commit f4ba5f9a90.

* Revert "Set the post editor font in the updateUIView method (#237)" (#240)

This reverts commit d46eb639ad.

* Squashed commit of the following:

commit 804255b1da
Merge: a799fd6 d46eb63
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 15:28:10 2022 -0500

    Merge branch 'main' into fix-crash-on-launch-tmp-no-nav

commit a799fd6210
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 08:16:34 2022 -0500

    Bump build number and update change log

commit b81276d629
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 08:16:16 2022 -0500

    Only navigate to new/last draft on launch on macOS

    This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

* Update change log

* Set the post editor font in the updateUIView method

commit f9f94b48d3465f9bcfc47ea5e478cc1d66da9a4d
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 10:05:03 2022 -0500

    Fix missed changes in change log

commit 593cc8f1fa83feec923905a5004b885fa68e3003
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:46:36 2022 -0500

    Bump patch version and build number

commit e0f752e6a4828c3d09649da8f9fe5a1902a2f137
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 2f7163dff4ca9d3279c553190b78d2d47277a03e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:43:00 2022 -0500

    Update change log

commit e42436676d2ce2e70e96a18364cb8127a5921cb5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:40:27 2022 -0500

    Squashed commit of the following:

    commit 804255b1da
    Merge: a799fd6 d46eb63
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 15:28:10 2022 -0500

        Merge branch 'main' into fix-crash-on-launch-tmp-no-nav

    commit a799fd6210
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 08:16:34 2022 -0500

        Bump build number and update change log

    commit b81276d629
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 08:16:16 2022 -0500

        Only navigate to new/last draft on launch on macOS

        This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

commit d7c03b9d2d1165a9b34d96a4e5350214211c1643
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:26:18 2022 -0500

    Revert "Set the post editor font in the updateUIView method (#237)" (#240)

    This reverts commit d46eb639ad.

commit 43b53c6e456d7b59e7363d1591363c58a246b4be
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:25:36 2022 -0500

    Revert "Don't navigate to new/last draft on launch (#238)" (#239)

    This reverts commit f4ba5f9a90.

commit 34546f994efaa77d21ff51aad84201f2dbbffd3e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:06:31 2022 -0500

    Don't navigate to new/last draft on launch (#238)

    * Only navigate to new/last draft on launch on macOS

    This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

    * Bump build number and update change log

commit bc3bc23308
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 7703e925b7
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:41 2022 -0500

    Set the font in the updateUIView method

commit 6e60e0ded5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:11 2022 -0500

    Wrap becomeFirstResponder in async dispatch

    This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Squashed commit of the following:

commit f9f94b48d3465f9bcfc47ea5e478cc1d66da9a4d
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 10:05:03 2022 -0500

    Fix missed changes in change log

commit 593cc8f1fa83feec923905a5004b885fa68e3003
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:46:36 2022 -0500

    Bump patch version and build number

commit e0f752e6a4828c3d09649da8f9fe5a1902a2f137
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 2f7163dff4ca9d3279c553190b78d2d47277a03e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:43:00 2022 -0500

    Update change log

commit e42436676d2ce2e70e96a18364cb8127a5921cb5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:40:27 2022 -0500

    Squashed commit of the following:

    commit 804255b1da
    Merge: a799fd6 d46eb63
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 15:28:10 2022 -0500

        Merge branch 'main' into fix-crash-on-launch-tmp-no-nav

    commit a799fd6210
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 08:16:34 2022 -0500

        Bump build number and update change log

    commit b81276d629
    Author: Angelo Stavrow <angelo@droppedbits.com>
    Date:   Sun Dec 18 08:16:16 2022 -0500

        Only navigate to new/last draft on launch on macOS

        This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

commit d7c03b9d2d1165a9b34d96a4e5350214211c1643
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:26:18 2022 -0500

    Revert "Set the post editor font in the updateUIView method (#237)" (#240)

    This reverts commit d46eb639ad.

commit 43b53c6e456d7b59e7363d1591363c58a246b4be
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:25:36 2022 -0500

    Revert "Don't navigate to new/last draft on launch (#238)" (#239)

    This reverts commit f4ba5f9a90.

commit 34546f994efaa77d21ff51aad84201f2dbbffd3e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:06:31 2022 -0500

    Don't navigate to new/last draft on launch (#238)

    * Only navigate to new/last draft on launch on macOS

    This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

    * Bump build number and update change log

commit bc3bc23308
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 7703e925b7
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:41 2022 -0500

    Set the font in the updateUIView method

commit 6e60e0ded5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:11 2022 -0500

    Wrap becomeFirstResponder in async dispatch

    This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Set the font in the updateUIView method

Also, wrap becomeFirstResponder in async dispatch

This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Fix crash-on-launch when post list is empty (#241)

* Apply a quarter-second delay to the dispatched call

* Update change log

* Fix nav-back bug when launching to last draft

* Improve keyboard present/dismiss animations

* Update change log and bump build number

* Update change log and bump build number

* Adjust initial frame size

* Bump minimum version to macOS 12

* Bump version and build number

* Bump build number

* Bump build number (again?)

* Undo initial sizing of settings window

* Bump build number

* Improve share button services

Adds two useful services to which the user can share a post: copy-URL-to-pasteboard (custom), and add-to-reading-list (system-provided).

* Improve initial layout of window
2023-02-12 11:14:26 -05:00
Angelo Stavrow
884da073e9
Prepare release v1.0.11 for iOS (#225)
* Add error handling to Mac app

* Log fatal crashes and present alert on next launch

* Update crash alert copy and navigate to help forum

* Refactor logging into reuseable methods

* Refactor class to use protocol

* Add environment object to settings window

* Improve deactivation of app when miniaturizing

* Chagne dispatch type when creating new post

* Bump version and build number

* Remove unnecessary TODO comment

* Update change log

* Log fatal crashes and present alert on next launch

* Update crash alert copy and navigate to help forum

* Refactor logging into reuseable methods

* Add environment object to settings window

* Improve deactivation of app when miniaturizing

* Chagne dispatch type when creating new post

* Improve default window size (#220)

* Clean up unnecessary import

* Set idealWidth property on sidebars

* Unset selected post on collection change (#218)

* Unset selected post when changing collection

* Update change log

* Bump build number and update change log
2022-09-10 08:30:55 -04:00
Angelo Stavrow
a51bbd3abc
Alert on error: shared code (#207)
* Initial work on presenting alert on error

* Move Account-related error handling up the hierarchy

* Handle errors on logout

* Fix for temporary debugging

* Clean up WriteFreelyModel’s published vars

* Add error handling to top-level content view

* Set current error on API call failures

* Set current error on API call handlers

* Move User Defaults errors to ErrorConstants file

* Add default values for some error strings

* Handle purging post errors

* Add FIXME to track silent failure on fetching collections

As collections are fetched and added to the `list` property in the CollectionListModel’s initializer, it’s tricky to throw an error here: we call it as a property initializer in CollectionListView, which cannot throw.

Consider refactoring this logic such that we’re using, for example, a @FetchRequest in CollectionListView instead.

* Handle errors in (most) shared code

Two outliers to come back to are:

- the LocalStoreManager, where we can’t set a current error in the WriteFreelyModel in methods that can’t throw
- the CollectionListModel, where the initializer can’t throw because we use it as a property initializer in CollectionListView

* Add error handling to Mac app

* Revert "Add error handling to Mac app"

This reverts commit b1a8b8b29c.
2022-07-27 09:56:32 -04:00
Angelo Stavrow
6693a83bd1
Merge pull request #195 from writefreely/migrate-store-to-group-container
Migrate persistent store to App Group
2021-10-22 16:23:16 -04:00
Angelo Stavrow
2f1b895df5
Rename 'persistentContainer' to 'container' 2021-10-08 17:15:38 -04:00
Angelo Stavrow
11ad3bc2ff
Use LocalStorageManager 'standard' singleton 2021-10-08 17:07:06 -04:00
Angelo Stavrow
ba898b6ac6
Adapt new navigation to Mac app 2021-10-08 14:29:18 -04:00
Angelo Stavrow
ff7e7c3c0e
Re-enable launch-to-last-draft policy 2021-09-24 15:29:20 -04:00
Angelo Stavrow
3c1e04e3bf
Use view model for CollectionListView 2021-09-24 14:45:28 -04:00
Angelo Stavrow
28856eb434
Display Settings sheet on iOS 15 and above 2021-09-10 14:11:03 -04:00
Angelo Stavrow
8184919697
Create new draft in selected collection 2021-02-10 15:12:13 -05:00
Angelo Stavrow
e1c5823cd6
Move new-post generation for Mac app to PostEditorModel 2021-01-25 11:53:16 -05:00
Angelo Stavrow
9b06eb34a8
Fix race condition in creating new post 2021-01-14 13:29:51 -05:00
Angelo Stavrow
1acd25ad42
Handle selectedCollection in CollectionView 2021-01-13 17:03:42 -05:00
Angelo Stavrow
d51fa4672a
Remove unnecessary SidebarView
SidebarView literally just calls CollectionListView and provides no other functionality or state management; ContentView can therefore just call CollectionListView directly.
2021-01-12 16:38:18 -05:00
Angelo Stavrow
725ff2eed9
Merge branch 'main' into add-help-tooltips 2020-12-18 11:54:22 -05:00
Angelo Stavrow
0b0fdd81a1
Move toolbar from ContentView to PostLIstView 2020-12-17 11:27:58 -05:00
Angelo Stavrow
4ec81ccfbf
Add help tooltips to the toolbar buttons. 2020-12-11 16:16:43 -05:00
Angelo Stavrow
a5ab2182eb
Overlay ProgressView on post list while processing network requests 2020-12-07 15:15:49 -05:00
Angelo Stavrow
fb5255cb04
Clean up SwiftLint warning with multiline string literal 2020-12-01 16:23:15 -05:00
Angelo Stavrow
7902bff33d
Remove reload button from toolbar 2020-12-01 09:53:09 -05:00
Angelo Stavrow
3114d037b3
Refactor active-post toolbar buttons into extracted view 2020-11-27 11:02:18 -05:00
Angelo Stavrow
28d3b6f831
Make sure to always clear the last draft when we unset the selectedPost 2020-11-26 17:01:33 -05:00
Angelo Stavrow
5dabe97db4
Restore alerts on Edit > Delete, no-network failure 2020-11-26 16:38:39 -05:00
Angelo Stavrow
8ff1de188b
Make adding and deleting posts more reliable/crashproof 2020-11-26 15:52:00 -05:00
Angelo Stavrow
5ca32ddcfc
Show prompt if there are server-side changes to post 2020-11-26 15:01:12 -05:00
Angelo Stavrow
7cb7fa3017
Use AppStorage dynamic property instead of direct UserDefaults update
Known issue: the menubar File > Reload From Server command will not update based on changes to model.account.isLoggedIn, but instead defaults to whatever the value was on app launch. Filed as FB8918303 with Apple.
2020-11-26 12:05:20 -05:00
Angelo Stavrow
7398c1d3cf
Implement basic publishing 2020-11-25 16:06:52 -05:00
Angelo Stavrow
acde0c8978
Add toolbar button logic, menu item, keyboard shortcut for server reload 2020-11-25 15:10:22 -05:00
Angelo Stavrow
735867a940
Add new-post logic to toolbar button and menu, fix broken iOS code 2020-11-25 14:41:53 -05:00
Angelo Stavrow
1e432c6adb
Fix spacing when collapsing sidebar, add other buttons to toolbar 2020-11-25 14:11:57 -05:00
Angelo Stavrow
39ae839052
Add toolbar button and menu entry to toggle sidebar 2020-11-24 15:35:26 -05:00
Angelo Stavrow
efae5202f8
Merge branch 'main' into fix-crash-on-launch 2020-11-04 14:18:44 -05:00
Angelo Stavrow
01bfe7e74a
Call PostListModel.remove() async on main queue 2020-11-02 13:09:38 -05:00
Angelo Stavrow
bd695b23e6
Remove anything that attempts to set selected post or last draft 2020-10-29 12:03:31 -04:00
Angelo Stavrow
c2df4cab86
Default to all-posts list if logged in, drafts otherwise 2020-10-29 10:36:43 -04:00
Angelo Stavrow
945e748b98
Check for network connection before request, present alert on failure 2020-10-16 17:36:26 -04:00
Angelo Stavrow
ce409486d4
Move lastDraft-setting logic to ContentView.onAppear handler 2020-09-24 14:14:35 -04:00
Angelo Stavrow
5af1d38a2d
Present alert on macOS if using Edit > Delete as confirmation 2020-09-17 13:23:44 -04:00
Angelo Stavrow
6ea10fb434
Move sheet modifier outside of NavigationView 2020-09-11 13:55:29 -04:00
Angelo Stavrow
dad0fef7f1
Rename PersistenceManager to LocalStorageManager 2020-09-09 14:19:40 -04:00
Angelo Stavrow
e8d52b4b69
Update SwiftUI previews 2020-09-09 12:12:19 -04:00
Angelo Stavrow
ca8e74b2dc
Replace Post type with WFAPost managed object 2020-09-08 16:17:58 -04:00
Angelo Stavrow
e8301b7eb4
Add "All Posts" grouping back to CollectionListView 2020-09-08 09:57:05 -04:00
Angelo Stavrow
0887638841
Load user collections from cache on launch, wipe from database on logout 2020-09-08 09:57:05 -04:00
Angelo Stavrow
8e035a43cb
Fetch user collections into CoreData and list from ManagedObjectContext 2020-09-08 09:55:43 -04:00
Angelo Stavrow
bc8ae19dab
Update "drafts" references in code to "local drafts" 2020-09-01 09:59:36 -04:00
Angelo Stavrow
49d8b35bb6
Get SwiftUI previews working with debug data 2020-08-27 11:29:54 -04:00