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

Disable features on static posters phase #18132

Merged
merged 6 commits into from
Mar 17, 2023

Conversation

AjeshRPai
Copy link
Contributor

@AjeshRPai AjeshRPai commented Mar 17, 2023

Closes #18131

Description

This PR focuses on disabling the following features during the static screens phase.

  • Page Creation template picker
  • Jetpack powered editor blocks
  • Help and Support on the editor
  • Quick Start

To test

  • Install and login to the app
  • Navigate to Me > App Settings > Privacy Settings and enable Collect Information
  • Enable the jp_removal_static_posters and restart the app

Test - Page Creation Template Picker

  • Navigate to Pages List
  • Tap the FAB on the pages list
  • ✅ Verify the page creation template flow is not shown
  • Navigate back to My Site

Test - Quick Start

  • Logout of the app
  • Login back
  • Select a site when prompted
  • ✅ Verify the quick start dialog is not shown
Test - Jetpack powered editor blocks AND Help and Support Note: These instructions were copied from PR #17587 - thanks @fluiddot ### 1 - Editor Jetpack-powered features **ENABLED** in **WordPress app**

Preparation

  1. Navigate to App Settings in the WordPress app and open Debug settings.
  2. Disable p_removal_static_posters and restart the app

Check Jetpack blocks

  1. Create a post.
  2. Tap on ➕ Add Blocks button.
  3. Scroll down the block list.
  4. Observe that the Jetpack blocks are present within the Jetpack powered section section and can be added to the post.
  5. Add all Jetpack blocks (Contact Info, Story, Layout Grid blocks).
  6. Observe that all Jetpack blocks are displayed and can be edited.
  7. Save the post with some Jetpack blocks (this post will be used in other test cases).

Check @-mentions and X-posts features

  1. Add a Paragraph block.
  2. Type the + character and observe that the x-post sheet is displayed.
    NOTE: x-post feature only works in sites with the O2 plugin enabled like P2-based sites. In order to test this, please use a P2-based site.
  3. Type the @ character and observe that the @-mentions sheet is displayed.
  4. Observe that in the toolbar the @ format button is displayed.

Check the help's support section

  1. Open a post.
  2. Tap on the three dots button to open the contextual menu.
  3. Observe that there's the option Help & Support that references Support, tap on it.
  4. Observe that the section Get support is present.

Check Reusable blocks

  1. Create a reusable block in the web version of the editor (instructions here).
  2. Create a post in the app.
  3. Tap on ➕ Add Blocks button.
  4. Observe that in the bottom sheet the "Reusable" tab is shown.
  5. Tap on the "Reusable" tab and insert a Reusable block.
  6. Observe that the block is displayed.
  7. Save the post with at least one Reusable block (this post will be used in other test cases).

Check Unsupported Block Editor (UBE)

  1. Create a post in the web version of the editor.
  2. Add a block that is not supported in the native version like the Table block.
  3. Save the post (this post will be used in other test cases).
  4. Open the same post in the app.
  5. Observe that the block is displayed as unsupported.
  6. Tap on the block and try to edit it with UBE.
  7. Observe that it can be edited with UBE.

2 - Editor Jetpack-powered features DISABLED in WordPress app

  1. Navigate to App Settings in the WordPress app and open Debug settings.
  2. Enable p_removal_static_posters and restart the app

Check Jetpack blocks

  1. Open the previous post saved with Jetpack blocks.
  2. Observe that the Jetpack blocks are displayed as unsupported.
  3. Tap on a Jetpack block and observe that a bottom sheet is displayed indicating that the block is not supported.
  4. Tap on ➕ Add Blocks button.
  5. Scroll down the block list.
  6. Observe that the Jetpack blocks are NOT present.

Check @-mentions and X-posts features

  1. Add a Paragraph block.
  2. Type the + character and observe that the x-post sheet is NOT displayed.
    NOTE: x-post feature only works in sites with the O2 plugin enabled like P2-based sites. In order to test this, please use a P2-based site.
  3. Type the @ character and observe that the @-mentions sheet is NOT displayed.
  4. Observe that in the toolbar the @ format button is NOT displayed.

Check the help's support section

  1. Open a post.
  2. Tap on the three dots button to open the contextual menu.
  3. Observe that there's the option Help but doesn't reference Support, tap on it.
  4. Observe that the section Get support is NOT present.

Check Reusable blocks

  1. Open the previous post saved with Reusable blocks.
  2. Observe that the Reusable block is displayed as unsupported.
  3. Tap on the block and observe that a bottom sheet is displayed indicating that the block is not supported.
  4. Tap on ➕ Add Blocks button.
  5. Observe that in the bottom sheet the "Reusable" tab is NOT shown.

Check Unsupported Block Editor (UBE)

  1. Open the previous post saved with unsupported blocks.
  2. Observe that the block is displayed as unsupported.
  3. Tap on the block and observe that it can't be edited with UBE.

3- Editor Jetpack-powered features ENABLED in Jetpack app

  1. Navigate to App Settings in the Jetpack app and open Debug settings.
  2. Turn jp_removal_four flag on. This flag should be omitted by the Jetpack app.
  3. Repeat the same test cases described in "1 - Editor Jetpack-powered features ENABLED in WordPress app":
    • Check Jetpack blocks
    • Check @-mentions and X-posts features
    • Check the help's support section
    • Check Reusable blocks
    • Check Unsupported Block Editor (UBE)

Regression Notes

  1. Potential unintended areas of impact
    The features are still visible when in static poster phase

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

  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 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.

Updates: the logic to remove template selection ability in
static poster phase 4

This commit is based on this commit
 b2feee0 from this PR -
 #17738
 which disabled the feature on phase 4

 Added a helper function to disable the template selection in
 pages and replaced the usages of `shouldRemoveJetpackFeatures` with
 `shouldShowTemplateSelectionInPages`
Updates: the logic to add jetpack powered blocks ability in
static poster phase

This commit is based on this commit
 4418fbd from this PR -
#17587
 which disabled the jetpack powered editor features on phase 4

 Added a helper function to disable the Jp powered editor features in
 pages and replaced the usages of `shouldRemoveJetpackFeatures` with
 `shouldShowJetpackPoweredEditorFeatures`
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 17, 2023

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr18132-4ac1550.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit4ac1550
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 17, 2023

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr18132-4ac1550.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit4ac1550
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@zwarm zwarm requested a review from fluiddot March 17, 2023 13:48
@zwarm zwarm self-assigned this Mar 17, 2023
@zwarm zwarm marked this pull request as ready for review March 17, 2023 13:48
@zwarm zwarm assigned AjeshRPai and unassigned AjeshRPai Mar 17, 2023
@zwarm zwarm requested review from ovitrif and enejb March 17, 2023 13:51
Copy link
Contributor

@enejb enejb left a comment

Choose a reason for hiding this comment

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

This works really well for me! Nice work!

@zwarm zwarm merged commit cdba787 into release/21.9 Mar 17, 2023
@zwarm zwarm deleted the issue/disable_features_on_static_posters_phase branch March 17, 2023 15:12
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