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

Improve visibility picker and integrate it in Post Settings #23154

Merged
merged 9 commits into from
May 7, 2024

Conversation

kean
Copy link
Contributor

@kean kean commented May 4, 2024

Fixes #21944. Related PR: #23149.

This PR contains multiple fixes and improvements to the experience of changing Post Visibility. This is another change that lifted straight from Gutenberg to ensure it's familiar to WordPress users.

Changes

  • Integrate the new PostVisibilityPicker in PostSettingsViewController to allow us to remove PostVisibilitySelectorViewController in 24.9 or later. The password field is now displayed in the visibility picker to match Gutenberg.
  • Fixes this crash Crash when showing privacy screen #21944
  • Fixes an issue where sometimes "Visibility" cell becomes disabled when not needed
    RCA WPTableViewCell doesn't implement prepareForReuse
  • Update visibility picker to show current password (that's what Gutenberg and the production versions of the app do)
  • Add missing "Password Protected" and "Private" badges to Post List
  • Add an alert warning that changing the scheduled post status to "private" will lead to it being published immediately (matches Gutenberg)
  • Fix how list applies badges color (just use .secondary for everything). Previously it would display seemingly arbitrary colors for certain post types.

To test:

Test 1.2

  • Publish a password-protected post
  • Open Post Settings
  • Change visibility to "public"
  • Save
  • ✅ Verify that save is successful (← was failing due TBD)

Test 1.3

  • Publish a public post
  • Open Post Settings
  • Change visibility to "private"
  • ✅ Verify that the "Publish Date" cell is disabled
  • Open visibility picker again
  • Close the picker
  • ✅ Verify that the "Publish Date" cell is disabled and "Visibiliy" is not (← it was failing due to the cell reuse)

Test 1.4

  • Open a scheduled post (without a password)
  • Open Post Settings
  • Change visibility to "protected" and select a password
  • "Save" the visibility and "Save" post settings
  • ✅ Verify that the post is still scheduled

Test 1.5

  • Open a scheduled post (without a password)
  • Open Post Settings
  • Change visibility to "private" and "Save"
  • ✅ Verify that an alert warning that the post will be published immediately is displayed
  • Tap "Save" to save settings
  • ✅ Verify that the post got published

Test 1.6

  • ✅ Verify that the Post List screen display "private" and "password protected" visibility in status labels

Regression Notes

  1. Potential unintended areas of impact: Post Visibility
  2. What I did to test those areas of impact (or what existing automated tests I relied on): manual
  3. What automated tests I added (or what prevented me from doing so): n/a

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)

@kean kean added this to the 24.9 milestone May 4, 2024
@kean kean requested a review from momo-ozawa May 4, 2024 15:12
@kean kean changed the title Task/integrate new visibility picker Improve visibility picker and integrate it in Post Settings May 4, 2024
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 4, 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 Numberpr23154-1ce5fcb
Version24.8
Bundle IDorg.wordpress.alpha
Commit1ce5fcb
App Center BuildWPiOS - One-Offs #9817
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 May 4, 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 Numberpr23154-1ce5fcb
Version24.8
Bundle IDcom.jetpack.alpha
Commit1ce5fcb
App Center Buildjetpack-installable-builds #8865
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

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.

LGTM w 1 nit

@kean kean force-pushed the task/integrate-new-visibility-picker branch from 029d24f to d43f54b Compare May 7, 2024 11:12
@kean kean enabled auto-merge May 7, 2024 11:13
@kean kean merged commit ee8e09a into trunk May 7, 2024
24 checks passed
@kean kean deleted the task/integrate-new-visibility-picker branch May 7, 2024 11:41
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.

Crash when showing privacy screen
3 participants