Offline Mode: Remove secondary actions from the editor - #22913
Conversation
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr22913-be54822 | |
| Version | 24.5 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | be54822 | |
| App Center Build | WPiOS - One-Offs #9340 |
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr22913-be54822 | |
| Version | 24.5 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | be54822 | |
| App Center Build | jetpack-installable-builds #8384 |
38afcea to
2fe021f
Compare
|
Found an issue where sometimes "Publish" for existing posts does not seem to be available. |
| import XCTest | ||
| @testable import WordPress | ||
|
|
||
| class PostEditorStateTests: XCTestCase { |
There was a problem hiding this comment.
These tests were covering what would be typically considered "configuration": the logic in the unit tests is as complex (or simple) as in the code itself, so I decided to remove these.
5be822c to
0c6ebaa
Compare
f64287b to
f41c02e
Compare
0c6ebaa to
3f0ffd6
Compare
3f0ffd6 to
be54822
Compare
momo-ozawa
left a comment
There was a problem hiding this comment.
Works as described, but I found an issue accessing drafts as a contributor
| fatalError("Not implemented (kahu-offline-mode)") | ||
| case .save, .continueFromHomepageEditing: | ||
| assertionFailure("No longer used and supported") | ||
| case .save, .saveAsDraft, .continueFromHomepageEditing: |
There was a problem hiding this comment.
If I open a draft as a contributor, the app crashes at this assertion failure due to the post editor action being .save
There was a problem hiding this comment.
I think there are a few issues with the contributor role, which I think is related to the sync engine changes:
- If I create a new draft as a contributor, the post list cell activity indicator never disappears. When I re-open the editor, then tap the back button without making any changes, the app crashes because it fails the
isOriginal()assertion forisNewDraft - As mentioned above, if I open a draft that's been submitted for review, the app crashes because the post editor action is
.save(doesn't matter if you're logged in as a contributor or an admin)
There was a problem hiding this comment.
I'll cover the contributor role and pending posts in a separate PR and according to the amend to the spec 👍
Working on it right now.


This eliminates the scenario where you tap "Update" and need to force the sync engine to save the changes synchronously, so we no longer have to worry about it.
To test:
The secondary action used to be here:
Regression Notes
PR submission checklist:
RELEASE-NOTES.txtif necessary.Testing checklist: