Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Mode: Prepublishing sheet fixes #22998

Merged

Conversation

kean
Copy link
Contributor

@kean kean commented Apr 12, 2024

  • Add DeprecatedPrepublishingViewController. There were too many changes required in the screen and it was no longer sustainable to keep adding if statement to the exiting screen. The deprecated version now fully matches the production version to ensure we don't regress the experience for users who don't have this feature flag on.
  • Fix an issue with posts being published as "protected" by default
  • (Revert) Remove "Publish Date" from the draft Post Settings again (it's unfixable without the switch to the .org API). Related discussion about the publish date: p1712869221226789-slack-C06GRKUGDNX. The republishing sheet will now require you to set the "publish date" right before publishing.
  • Fix an issue where a standalone prepublishing sheet would not send the tags and categories when publishing (it required a revision)
  • Fix an issue where the changes made in the standalone prepublishing sheet would be saved to the DB and not the server
  • Fix an issue with publish button label not updating after changing visibility to .private

Related WPKit PR wordpress-mobile/WordPressKit-iOS#786

To test:

Test 1.1

  • Create and save a draft post
  • Open Post Settings
  • Verify that the "Publish Date" says "Immediately"
  • Change the publish date to a different date
  • Return back to Post Settings and verify that the date was displayed
  • Save the changes
  • Reopen Post Settings and verify that is still shows the selected date
  • Remove the publish date (in the current branch, tap "Now")
  • Verify that the "Publish Date" says "Immediately"
  • Save
  • Reopend Post Settings and verify that the date still says now

Test 2.1

  • Create and save a draft post
  • Open Post Settings and save the publish date in the future
  • Tap "Publish" from the list
  • Select a future date in the past
  • Tap "Publish" to confirm
  • Verify that the post got published with the selected date

Test 2.2

  • Create and save a draft post
  • Tap "Publish" from the List
  • Add a tag
  • Tap "Publish" again to confirm
  • Verify that the post was published with the selected tag

Test 2.3

  • Create and save a draft post
  • Tap "Publish" from the List
  • Add a tag
  • Tap "Close"
  • Verify that the revision was deleted and the changes were not saved

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 12, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr22998-a85c385
Version24.6
Bundle IDcom.jetpack.alpha
Commita85c385
App Center Buildjetpack-installable-builds #8564
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 12, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr22998-a85c385
Version24.6
Bundle IDorg.wordpress.alpha
Commita85c385
App Center BuildWPiOS - One-Offs #9520
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean removed the request for review from momo-ozawa April 12, 2024 01:40
@kean kean marked this pull request as draft April 12, 2024 01:40
@kean kean force-pushed the task/offline-mode-fix-publish-date-handling branch from f0b3df1 to 5c006a9 Compare April 12, 2024 13:39
@dangermattic
Copy link
Collaborator

dangermattic commented Apr 12, 2024

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@kean kean requested a review from momo-ozawa April 12, 2024 13:42
@kean kean marked this pull request as ready for review April 12, 2024 13:43
@kean kean force-pushed the task/offline-mode-fix-publish-date-handling branch 2 times, most recently from f1c4987 to a15d216 Compare April 12, 2024 15:26
@kean kean modified the milestones: 24.7, Pending Apr 12, 2024
@kean kean force-pushed the task/offline-mode-fix-publish-date-handling branch from a15d216 to cf1c3dc Compare April 13, 2024 13:33
@momo-ozawa momo-ozawa modified the milestones: Pending, 24.8 Apr 15, 2024
Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test 1.1

  • FF disabled: The post gets published if you change from a future date to "Now". Similar to this bug
  • FF enabled: N/A since "Publish Date" has been removed from Post Settings

Test 2.1

IMG_0039

  • FF disabled: I don't see a "Publish" action in the context menu for scheduled posts. If I set the publish date to the future, the post gets moved to the scheduled tab.
  • FF enabled: N/A since "Publish Date" has been removed from Post Settings

Test 2.2

Before setting tag After setting tag
IMG_0041 IMG_0040
  • FF disabled/enabled: The scrollview height is wrong after setting a tag

Test 2.3

RPReplay_Final1713266225.MP4
  • FF disabled: After closing the prepublishing sheet, the first time I open the post settings from the context menu, I still see the tag I added. The second time I open the post settings, the tag has been removed.

@kean
Copy link
Contributor Author

kean commented Apr 16, 2024

FF disabled: The post gets published if you change from a future date to "Now". Similar to #22930 (review)

It's a production issue (tested in 24.6).

FF disabled: I don't see a "Publish" action in the context menu for scheduled posts. If I set the publish date to the future, the post gets moved to the scheduled tab.

Yeah, I think I wrote this test based on the assumption without confirming it. But it doesn't work this way because of the known issue in test 1.1.

FF disabled/enabled: The scrollview height is wrong after setting a tag

I added it to the list of known issues. I've seen it occasionally happen before.

FF disabled: After closing the prepublishing sheet, the first time I open the post settings from the context menu, I still see the tag I added. The second time I open the post settings, the tag has been removed.

Expected – it's a production issue. The first time you close the settings it calls the following line and reset the changes you made:

 [self.apost.managedObjectContext refreshObject:self.apost mergeChanges:NO];

@kean kean force-pushed the task/offline-mode-fix-publish-date-handling branch from 40e147c to c9648db Compare April 16, 2024 19:04
@kean kean force-pushed the task/offline-mode-fix-publish-date-handling branch from c9648db to 9de5c6d Compare April 16, 2024 19:20
@kean kean merged commit 6ee45c4 into feature/offline-mode-milesone-2 Apr 16, 2024
23 of 24 checks passed
@kean kean deleted the task/offline-mode-fix-publish-date-handling branch April 16, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants