From f4f6126b653853932c6b3e7e7da66b7bc73f1566 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 13:54:04 +1100 Subject: [PATCH 01/22] Bump version number --- config/Version.internal.xcconfig | 4 ++-- config/Version.public.xcconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/Version.internal.xcconfig b/config/Version.internal.xcconfig index eb0486505258..c831222a6fe9 100644 --- a/config/Version.internal.xcconfig +++ b/config/Version.internal.xcconfig @@ -1,2 +1,2 @@ -VERSION_LONG = 23.7.0.20231124 -VERSION_SHORT = 23.7 +VERSION_LONG = 23.8.0.20231127 +VERSION_SHORT = 23.8 diff --git a/config/Version.public.xcconfig b/config/Version.public.xcconfig index df536d86f844..8a6b02e73cb6 100644 --- a/config/Version.public.xcconfig +++ b/config/Version.public.xcconfig @@ -1,2 +1,2 @@ -VERSION_LONG = 23.7.0.20231116 -VERSION_SHORT = 23.7 +VERSION_LONG = 23.8.0.0 +VERSION_SHORT = 23.8 From 195f68916e0071f5a598ad38c987488919af9ac8 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 13:54:05 +1100 Subject: [PATCH 02/22] Update draft release notes for 23.8. --- WordPress/Resources/release_notes.txt | 39 ++++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/WordPress/Resources/release_notes.txt b/WordPress/Resources/release_notes.txt index 2e089ef84b11..02e3a751de24 100644 --- a/WordPress/Resources/release_notes.txt +++ b/WordPress/Resources/release_notes.txt @@ -1,23 +1,18 @@ -Buckle up, this update’s a doozy. Let’s start with Site Media. +* [**] Add Optimize Images setting for image uploads and enable it by default [#21981] +* [*] Fix the media item details screen layout on iPad [#22042] +* [*] Improve the performance of loading thumbnails and original images in the Site Media screen [#22043] +* [*] Integrate native photos picker (`PHPickerViewController`) in Story Editor [#22059] +* [*] Fix an issue [#21959] where WordPress → Jetpack migration was not working for accounts with no sites. These users are now presented with a shortened migration flow. The "Uninstall WordPress" prompt will now also appear only as a card on the Dashboard. [#22064] +* [*] Add Select and Deselect button to previews in Site Media picker [#22078] +* [*] [internal] Fix an issue with scheduling of posts not working on iOS 17 with Xcode 15 [#22012] +* [*] [internal] Remove SDWebImage dependency from the app and improve cache cost calculation for GIFs [#21285] +* [*] Stats: Fix an issue where sites for clicked URLs do not open [#22061] +* [*] Improve pages list performance when there are hundreds of pages in the site [#22070] +* [*] Fix an issue with local thumbnails for GIFs inserted to Site Media not being animated [#22083] +* [*] [internal] Make Reader web views inspectable on iOS 16.4 and higher [#22077] +* [*] [internal] Add workarounds for large emoji on P2. [#22080] +* [*] [Jetpack-only] Block Editor: Ensure text is always visible within Contact Info block [https://github.com/Automattic/jetpack/pull/33873] +* [*] Block Editor: Ensure uploaded audio is always visible within Audio block [https://github.com/WordPress/gutenberg/pull/55627] +* [*] Block Editor: In the deeply nested block warning, only display the ungroup option for blocks that support it [https://github.com/WordPress/gutenberg/pull/56445] +* [**] Refactor deleting media [#21748] -- We updated the Site Media screen design with better menus, file selection and sharing, and more. It even runs faster—no more jerky GIFs or stalled-out videos. -- You can use the pan gesture to select multiple media files at once. It’s also easier to swipe from one photo to another, change metadata, and delete items. -- On iPad, you can switch between square image previews and aspect ratio. -- We fixed issues with blank placeholder images, incorrect messages, document sharing, and occasional crashes. - -We’re not done yet. We also made big changes to Posts & Pages. - -- The Posts & Pages screen got a facelift with clean, simple display options. -- Use more advanced search features, like author and tag filters, to find the content you’d like to edit. Search also works across all authors (unless, of course, you want content from one specific person.) -- Use swipe actions to view, share, or delete posts and pages. Sweet. -- The context menu now lets you access comments, settings, and other actions for a post or page. -- We fixed issues with page refreshes and visibility, as well as a handful of crashes. - -Finally, we fixed a handful of pesky problems across the app. - -- The app now recognizes when you’ve finished uploading a GIF. (monty-burns-excellent.gif) -- “Hidden” posts now have a better description for their privacy status. -- The reader now scrolls to the top when you tap the status bar. Up, up, and away. -- The Menus screen properly creates menu items based on top-level pages. -- We fixed a crash related to using text colors in older site themes. -- You shouldn’t run into any errors when you paste deeply nested content. Much like onions, ogres, cakes, or parfaits, your content can have many layers. From 508cd359bb7a1c0d167f1e0f5a199f79698d862f Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 13:54:05 +1100 Subject: [PATCH 03/22] Update draft release notes for 23.8. --- WordPress/Jetpack/Resources/release_notes.txt | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/WordPress/Jetpack/Resources/release_notes.txt b/WordPress/Jetpack/Resources/release_notes.txt index bf7fbf7c1f83..02e3a751de24 100644 --- a/WordPress/Jetpack/Resources/release_notes.txt +++ b/WordPress/Jetpack/Resources/release_notes.txt @@ -1,27 +1,18 @@ -Buckle up, this update’s a doozy. +* [**] Add Optimize Images setting for image uploads and enable it by default [#21981] +* [*] Fix the media item details screen layout on iPad [#22042] +* [*] Improve the performance of loading thumbnails and original images in the Site Media screen [#22043] +* [*] Integrate native photos picker (`PHPickerViewController`) in Story Editor [#22059] +* [*] Fix an issue [#21959] where WordPress → Jetpack migration was not working for accounts with no sites. These users are now presented with a shortened migration flow. The "Uninstall WordPress" prompt will now also appear only as a card on the Dashboard. [#22064] +* [*] Add Select and Deselect button to previews in Site Media picker [#22078] +* [*] [internal] Fix an issue with scheduling of posts not working on iOS 17 with Xcode 15 [#22012] +* [*] [internal] Remove SDWebImage dependency from the app and improve cache cost calculation for GIFs [#21285] +* [*] Stats: Fix an issue where sites for clicked URLs do not open [#22061] +* [*] Improve pages list performance when there are hundreds of pages in the site [#22070] +* [*] Fix an issue with local thumbnails for GIFs inserted to Site Media not being animated [#22083] +* [*] [internal] Make Reader web views inspectable on iOS 16.4 and higher [#22077] +* [*] [internal] Add workarounds for large emoji on P2. [#22080] +* [*] [Jetpack-only] Block Editor: Ensure text is always visible within Contact Info block [https://github.com/Automattic/jetpack/pull/33873] +* [*] Block Editor: Ensure uploaded audio is always visible within Audio block [https://github.com/WordPress/gutenberg/pull/55627] +* [*] Block Editor: In the deeply nested block warning, only display the ungroup option for blocks that support it [https://github.com/WordPress/gutenberg/pull/56445] +* [**] Refactor deleting media [#21748] -First off, we added the All Domains screen so you can manage all your domains in one place within the app. There’s no place like home. - -Next, we made updates to Site Media. - -- The Site Media screen design has better menus, file selection and sharing, and more. It even runs faster—no more jerky GIFs or stalled-out videos. -- You can use the pan gesture to select multiple media files at once. It’s also easier to swipe from one photo to another, change metadata, and delete items. -- On iPad, you can switch between square image previews and aspect ratio. -- We fixed issues with blank placeholder images, incorrect messages, document sharing, and occasional crashes. - -We’re not done yet. We also made big changes to Posts & Pages. - -- The Posts & Pages screen got a facelift with clean, simple display options. -- Use more advanced search features, like author and tag filters, to find the content you’d like to edit. Search also works across all authors (unless, of course, you want content from one specific person.) -- Use swipe actions to view, share, or delete posts and pages. Sweet. -- The context menu now lets you access comments, settings, and other actions for a post or page. -- We fixed issues with page refreshes and visibility, as well as a handful of crashes. - -Finally, we fixed a handful of pesky problems across the app. - -- The app now recognizes when you’ve finished uploading a GIF. (monty-burns-excellent.gif) -- “Hidden” posts now have a better description for their privacy status. -- The reader now scrolls to the top when you tap the status bar. Up, up, and away. -- The Menus screen properly creates menu items based on top-level pages. -- We fixed a block editor crash related to using text colors in older site themes. -- You shouldn’t run into any errors when you paste deeply nested content in the block editor. Much like onions, ogres, cakes, or parfaits, your content can have many layers. From 6999d0fee400fac169df31faa05af25683629bd6 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 13:54:06 +1100 Subject: [PATCH 04/22] Release Notes: add new section for next version (23.9) --- RELEASE-NOTES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 99e252fd48f0..7cb27431318d 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,3 +1,7 @@ +23.9 +----- + + 23.8 ----- * [**] Add Optimize Images setting for image uploads and enable it by default [#21981] From f6de892c2aeb39ce804510eb2ade267af01c4b8e Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:04:30 +1100 Subject: [PATCH 05/22] Remove Jetpack-only entries from WordPress 23.8 raw release notes --- WordPress/Resources/release_notes.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/WordPress/Resources/release_notes.txt b/WordPress/Resources/release_notes.txt index 02e3a751de24..12dd2d252374 100644 --- a/WordPress/Resources/release_notes.txt +++ b/WordPress/Resources/release_notes.txt @@ -2,7 +2,6 @@ * [*] Fix the media item details screen layout on iPad [#22042] * [*] Improve the performance of loading thumbnails and original images in the Site Media screen [#22043] * [*] Integrate native photos picker (`PHPickerViewController`) in Story Editor [#22059] -* [*] Fix an issue [#21959] where WordPress → Jetpack migration was not working for accounts with no sites. These users are now presented with a shortened migration flow. The "Uninstall WordPress" prompt will now also appear only as a card on the Dashboard. [#22064] * [*] Add Select and Deselect button to previews in Site Media picker [#22078] * [*] [internal] Fix an issue with scheduling of posts not working on iOS 17 with Xcode 15 [#22012] * [*] [internal] Remove SDWebImage dependency from the app and improve cache cost calculation for GIFs [#21285] @@ -11,8 +10,6 @@ * [*] Fix an issue with local thumbnails for GIFs inserted to Site Media not being animated [#22083] * [*] [internal] Make Reader web views inspectable on iOS 16.4 and higher [#22077] * [*] [internal] Add workarounds for large emoji on P2. [#22080] -* [*] [Jetpack-only] Block Editor: Ensure text is always visible within Contact Info block [https://github.com/Automattic/jetpack/pull/33873] * [*] Block Editor: Ensure uploaded audio is always visible within Audio block [https://github.com/WordPress/gutenberg/pull/55627] * [*] Block Editor: In the deeply nested block warning, only display the ungroup option for blocks that support it [https://github.com/WordPress/gutenberg/pull/56445] * [**] Refactor deleting media [#21748] - From 5e66467129439580e2c3c98367eafe973ecab22a Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:04:58 +1100 Subject: [PATCH 06/22] Remove "Jetpack-only" label from Jetpack 23.8 release notes --- WordPress/Jetpack/Resources/release_notes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Jetpack/Resources/release_notes.txt b/WordPress/Jetpack/Resources/release_notes.txt index 02e3a751de24..93d752f63ce0 100644 --- a/WordPress/Jetpack/Resources/release_notes.txt +++ b/WordPress/Jetpack/Resources/release_notes.txt @@ -11,7 +11,7 @@ * [*] Fix an issue with local thumbnails for GIFs inserted to Site Media not being animated [#22083] * [*] [internal] Make Reader web views inspectable on iOS 16.4 and higher [#22077] * [*] [internal] Add workarounds for large emoji on P2. [#22080] -* [*] [Jetpack-only] Block Editor: Ensure text is always visible within Contact Info block [https://github.com/Automattic/jetpack/pull/33873] +* [*] Block Editor: Ensure text is always visible within Contact Info block [https://github.com/Automattic/jetpack/pull/33873] * [*] Block Editor: Ensure uploaded audio is always visible within Audio block [https://github.com/WordPress/gutenberg/pull/55627] * [*] Block Editor: In the deeply nested block warning, only display the ungroup option for blocks that support it [https://github.com/WordPress/gutenberg/pull/56445] * [**] Refactor deleting media [#21748] From b6e7fdb98174c45c609ead23679403182c98eb22 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:06:28 +1100 Subject: [PATCH 07/22] Use latest stable versions of internal pods for release 23.8 This results in only the transitive Sentry dependency updating. That's okay, Sentry being a data collecting library, we are keen on having it as up-to-date as possible. --- Podfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index dd8960b2a1b8..c056e71dc9f4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -49,12 +49,12 @@ PODS: - OHHTTPStubs/Swift (9.1.0): - OHHTTPStubs/Default - Reachability (3.2) - - Sentry (8.15.2): - - Sentry/Core (= 8.15.2) - - SentryPrivate (= 8.15.2) - - Sentry/Core (8.15.2): - - SentryPrivate (= 8.15.2) - - SentryPrivate (8.15.2) + - Sentry (8.16.1): + - Sentry/Core (= 8.16.1) + - SentryPrivate (= 8.16.1) + - Sentry/Core (8.16.1): + - SentryPrivate (= 8.16.1) + - SentryPrivate (8.16.1) - Sodium (0.9.1) - Starscream (3.0.6) - SVProgressHUD (2.2.5) @@ -206,8 +206,8 @@ SPEC CHECKSUMS: OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab OHHTTPStubs: 90eac6d8f2c18317baeca36698523dc67c513831 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - Sentry: 6f5742b4c47c17c9adcf265f6f328cf4a0ed1923 - SentryPrivate: b2f7996f37781080f04a946eb4e377ff63c64195 + Sentry: fcd7073d05654d9f0214d0226fca3d56d6530379 + SentryPrivate: 1cf54bae8be81dee04672b4c14ad5de52efb909f Sodium: 23d11554ecd556196d313cf6130d406dfe7ac6da Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5 SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 From faf7af49aebf7ba2e547435b3f44b5183103e544 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:11:34 +1100 Subject: [PATCH 08/22] Update strings for localization --- .../Resources/en.lproj/Localizable.strings | 146 +++++++++--------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/WordPress/Resources/en.lproj/Localizable.strings b/WordPress/Resources/en.lproj/Localizable.strings index 906c972a879f..76062a509796 100644 --- a/WordPress/Resources/en.lproj/Localizable.strings +++ b/WordPress/Resources/en.lproj/Localizable.strings @@ -188,9 +188,6 @@ /* Age between dates over one year. */ "%d years" = "%d years"; -/* Max image size in pixels (e.g. 300x300px) */ -"%dx%dpx" = "%1$dx%2$dpx"; - /* One menu area available in the theme */ "%i menu area in this theme" = "%i menu area in this theme"; @@ -500,8 +497,7 @@ /* Dismiss button title */ "activityList.dismiss.title" = "Dismiss"; -/* Accessibility label for add button to add items to the user's media library - Remove asset from media picker list */ +/* Remove asset from media picker list */ "Add" = "Add"; /* Action for Media Picker to indicate selection of media. The argument in the string represents the number of elements (as numeric digits) selected */ @@ -597,9 +593,6 @@ /* No comment provided by engineer. */ "Add menu item to children" = "Add menu item to children"; -/* Accessibility hint for add button to add items to the user's media library */ -"Add new media" = "Add new media"; - /* Screen reader text for Menus button that adds a new menu to a site. */ "Add new menu" = "Add new menu"; @@ -764,10 +757,10 @@ "Alternatively, you can convert the content to blocks." = "Alternatively, you can convert the content to blocks."; /* No comment provided by engineer. */ -"Alternatively, you can detach and edit these blocks separately by tapping “Detach patterns”." = "Alternatively, you can detach and edit these blocks separately by tapping “Detach patterns”."; +"Alternatively, you can detach and edit this block separately by tapping “Detach”." = "Alternatively, you can detach and edit this block separately by tapping “Detach”."; -/* No comment provided by engineer. */ -"Alternatively, you can detach and edit this block separately by tapping “Detach pattern”." = "Alternatively, you can detach and edit this block separately by tapping “Detach pattern”."; +/* translators: Alternative option included in a warning related to having blocks deeply nested. */ +"Alternatively, you can flatten the content by ungrouping the block." = "Alternatively, you can flatten the content by ungrouping the block."; /* Instruction text to explain to help users type their password instead of using magic link login option. */ "Alternatively, you may enter the password for this account." = "Alternatively, you may enter the password for this account."; @@ -907,6 +900,39 @@ /* VoiceOver accessibility hint, informing the user the button can be used to approve a comment */ "Approves the Comment." = "Approves the Comment."; +/* Option to enable the optimization of images when uploading. */ +"appSettings.media.imageOptimizationRow" = "Optimize Images"; + +/* Indicates an image will use high quality when uploaded. */ +"appSettings.media.imageQuality.high" = "High"; + +/* Indicates an image will use low quality when uploaded. */ +"appSettings.media.imageQuality.low" = "Low"; + +/* Indicates an image will use maximum quality when uploaded. */ +"appSettings.media.imageQuality.maximum" = "Maximum"; + +/* Indicates an image will use medium quality when uploaded. */ +"appSettings.media.imageQuality.medium" = "Medium"; + +/* The quality of image used when uploading */ +"appSettings.media.imageQuality.title" = "Quality"; + +/* Title for the image quality settings option. */ +"appSettings.media.imageQualityRow" = "Image Quality"; + +/* Message of an alert informing users to enable image optimization in uploads. */ +"appSettings.optimizeImagesPopup.message" = "Image optimization shrinks images for faster uploading.\n\nThis option is enabled by default, but you can change it in the app settings at any time."; + +/* Title of an alert informing users to enable image optimization in uploads. */ +"appSettings.optimizeImagesPopup.title" = "Keep optimizing images?"; + +/* Title of button for turning off image optimization, displayed in the alert informing users to enable image optimization in uploads. */ +"appSettings.optimizeImagesPopup.turnOff" = "No, turn off"; + +/* Title of button for leaving on image optimization, displayed in the alert informing users to enable image optimization in uploads. */ +"appSettings.optimizeImagesPopup.turnOn" = "Yes, leave on"; + /* Menus alert message for alerting the user to unsaved changes while trying back out of Menus. */ "Are you sure you want to cancel and discard changes?" = "Are you sure you want to cancel and discard changes?"; @@ -925,9 +951,6 @@ /* Message prompting the user to confirm that they want to disconnect Jetpack from the site. */ "Are you sure you want to disconnect Jetpack from the site?" = "Are you sure you want to disconnect Jetpack from the site?"; -/* Message prompting the user to confirm that they want to permanently delete a group of media items. */ -"Are you sure you want to permanently delete these items?" = "Are you sure you want to permanently delete these items?"; - /* Message prompting the user to confirm that they want to permanently delete a media item. Should match Calypso. */ "Are you sure you want to permanently delete this item?" = "Are you sure you want to permanently delete this item?"; @@ -1320,10 +1343,7 @@ "Blocks menu" = "Blocks menu"; /* translators: Warning related to having blocks deeply nested. %d: The deepest nesting level. */ -"Blocks nested deeper than %d levels may not render properly in the mobile editor. For this reason, we recommend flattening the content by ungrouping the block or editing the block using the web editor." = "Blocks nested deeper than %d levels may not render properly in the mobile editor. For this reason, we recommend flattening the content by ungrouping the block or editing the block using the web editor."; - -/* translators: Warning related to having blocks deeply nested. %d: The deepest nesting level. */ -"Blocks nested deeper than %d levels may not render properly in the mobile editor. For this reason, we recommend flattening the content by ungrouping the block or editing the block using your web browser." = "Blocks nested deeper than %d levels may not render properly in the mobile editor. For this reason, we recommend flattening the content by ungrouping the block or editing the block using your web browser."; +"Blocks nested deeper than %d levels may not render properly in the mobile editor." = "Blocks nested deeper than %d levels may not render properly in the mobile editor."; /* Title of a button that displays the WordPress.com blog */ "Blog" = "Blog"; @@ -1517,9 +1537,6 @@ /* Share extension dialog dismiss button label - displayed when user is missing a login token. */ "Cancel sharing" = "Cancel sharing"; -/* Media Library option to cancel an in-progress or failed upload. */ -"Cancel Upload" = "Cancel Upload"; - /* The action was canceled */ "Canceled" = "Canceled"; @@ -1570,9 +1587,6 @@ Main title */ "Change Password" = "Change Password"; -/* Title of button that takes user to the system Settings section for the app */ -"Change Settings" = "Change Settings"; - /* Accessibility hint for web preview device switching button */ "Change the device type used for preview" = "Change the device type used for preview"; @@ -2627,7 +2641,6 @@ Example: Reply to Pamela Nguyen */ /* Delete Delete button title for the warning shown to the user when he refuses to re-login when the authToken is missing. Title for button that permanently deletes a media item (photo / video) - Title for button that permanently deletes one or more media items (photos / videos) Title of a delete button Title of the trash confirmation alert. */ "Delete" = "Delete"; @@ -3101,8 +3114,7 @@ Example: Reply to Pamela Nguyen */ /* No comment provided by engineer. */ "Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen." = "Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen."; -/* Accessibility label for edit button to enable multi selection mode in the user's media library - Editing GIF alert default action button. +/* Editing GIF alert default action button. Edits a Comment Edits the comment User action to edit media details. @@ -3313,9 +3325,6 @@ Example: Reply to Pamela Nguyen */ /* Secondary message shown when there are no domains that match the user entered text. */ "Enter different words above and we'll look for an address that matches it." = "Enter different words above and we'll look for an address that matches it."; -/* Accessibility hint for edit button to enable multi selection mode in the user's media library */ -"Enter edit mode to enable multi select to delete" = "Enter edit mode to enable multi select to delete"; - /* Accessibility Label for the enter full screen button on the comment reply text view */ "Enter Full Screen" = "Enter Full Screen"; @@ -3550,9 +3559,6 @@ Example: Reply to Pamela Nguyen */ /* Message for mark all as read success notice */ "Failed marking Notifications as read" = "Failed marking Notifications as read"; -/* Error title when picked media cannot be imported into stories. */ -"Failed Media Export" = "Failed Media Export"; - /* No comment provided by engineer. */ "Failed to insert audio file. Please tap for options." = "Failed to insert audio file. Please tap for options."; @@ -3760,6 +3766,12 @@ Example: Reply to Pamela Nguyen */ /* An example tag used in the login prologue screens. */ "Football" = "Football"; +/* translators: Recommendation included in a warning related to having blocks deeply nested. */ +"For this reason, we recommend editing the block using the web editor." = "For this reason, we recommend editing the block using the web editor."; + +/* translators: Recommendation included in a warning related to having blocks deeply nested. */ +"For this reason, we recommend editing the block using your web browser." = "For this reason, we recommend editing the block using your web browser."; + /* Register Domain - Domain contact information section header description */ "For your convenience, we have pre-filled your WordPress.com contact information. Please review to be sure it’s the correct information you want to use for this domain." = "For your convenience, we have pre-filled your WordPress.com contact information. Please review to be sure it’s the correct information you want to use for this domain."; @@ -5284,9 +5296,7 @@ Please install the %3$@ to use the app with this site."; "me.products.header" = "Products"; /* Noun. Title. Links to the blog's Media library. - Tab bar title for the Media tab in Media Picker The menu item to select during a guided tour. - Title for Media Library section of the app. Title for the media section in site settings screen Title label for the media settings section in the app settings */ "Media" = "Media"; @@ -5348,9 +5358,6 @@ Please install the %3$@ to use the app with this site."; /* Message of an alert informing users that the video they are trying to select is not allowed. */ "mediaExporter.videoLimitExceededError" = "Uploading videos longer than 5 minutes requires a paid plan."; -/* Verb. User action to dismiss error alert when failing to load media item. */ -"mediaItemTable.errorAlert.dismissButton" = "Dismiss"; - /* Accessibility hint for add button to add items to the user's media library */ "mediaLibrary.addButtonAccessibilityHint" = "Add new media"; @@ -5429,6 +5436,12 @@ Please install the %3$@ to use the app with this site."; /* The title of the button to dismiss the alert shown when the picked media cannot be imported into stories. */ "mediaPicker.failedMediaExportAlert.dismissButton" = "Dismiss"; +/* Error message when picked media cannot be imported into stories. */ +"mediaPicker.failedMediaExportAlert.message" = "Your media could not be exported. If the problem persists you can contact us via the Me > Help & Support screen."; + +/* Error title when picked media cannot be imported into stories. */ +"mediaPicker.failedMediaExportAlert.title" = "Failed Media Export"; + /* Message for alert when access to camera is not granted */ "mediaPicker.noCameraAccessMessage" = "This app needs permission to access the Camera to capture new media, please change the privacy settings if you wish to allow this."; @@ -5462,6 +5475,9 @@ Please install the %3$@ to use the app with this site."; /* The name of the action in the context menu */ "mediaPicker.takeVideo" = "Take Video"; +/* Max image size in pixels (e.g. 300x300px) */ +"mediaSizeSlider.valueFormat" = "%1$d × %2$d px"; + /* Medium image size. Should be the same as in core WP. */ "Medium" = "Medium"; @@ -5508,9 +5524,6 @@ Please install the %3$@ to use the app with this site."; /* The title in the Delete WordPress screen */ "migration.deleteWordpress.title" = "You no longer need the WordPress app on your device"; -/* Primary button title in the migration done screen. */ -"migration.done.actions.primary.title" = "Finish"; - /* Footer for the migration done screen. */ "migration.done.footer" = "We recommend uninstalling the WordPress app on your device to avoid data conflicts."; @@ -5520,6 +5533,9 @@ Please install the %3$@ to use the app with this site."; /* Primary description in the migration done screen. */ "migration.done.primaryDescription" = "We’ve transferred all your data and settings. Everything is right where you left it."; +/* Secondary description (second paragraph) in the migration done screen. */ +"migration.done.secondaryDescription" = "It's time to continue your WordPress journey on the Jetpack app!"; + /* Title of the migration done screen. */ "migration.done.title" = "Thanks for switching to Jetpack!"; @@ -5568,6 +5584,9 @@ Please install the %3$@ to use the app with this site."; /* The title in the migration welcome screen */ "migration.welcome.title" = "Welcome to Jetpack!"; +/* Primary button title in the migration done screen. */ +"migrationDone.actions.primaryTitle" = "Let's go"; + /* Summary description for a threat */ "Miscellaneous vulnerability" = "Miscellaneous vulnerability"; @@ -6284,9 +6303,6 @@ Please install the %3$@ to use the app with this site."; /* No comment provided by engineer. */ "Only show excerpt" = "Only show excerpt"; -/* Message telling the user that they've only enabled limited photo library permissions for the app. */ -"Only the selected photos you've given access to are available." = "Only the selected photos you've given access to are available."; - /* An informal exclaimation that means `something went wrong`. Title for the view when there's an error loading a comment. Title for the view when there's an error loading Activity Log @@ -6633,9 +6649,6 @@ Please install the %3$@ to use the app with this site."; /* Photography site intent topic */ "Photography" = "Photography"; -/* Tab bar title for the Photos tab in Media Picker */ -"Photos" = "Photos"; - /* Subtitle for placeholder in Free Photos. The company name 'Pexels' should always be written as it is. */ "Photos provided by Pexels" = "Photos provided by Pexels"; @@ -7151,9 +7164,6 @@ Tapping on this row allows the user to edit the sharing message. */ /* Title for web preview device switching button */ "Preview Device" = "Preview Device"; -/* Accessibility label for media item preview for user's viewing an item in their media library */ -"Preview media" = "Preview media"; - /* No comment provided by engineer. */ "Preview page" = "Preview page"; @@ -7841,9 +7851,6 @@ Example: given a notice format "Following %@" and empty site name, this will be /* Button title that triggers a scan */ "Retry Scan" = "Retry Scan"; -/* User action to retry media upload. */ -"Retry Upload" = "Retry Upload"; - /* No comment provided by engineer. */ "Retry?" = "Retry?"; @@ -8129,9 +8136,6 @@ Example: given a notice format "Following %@" and empty site name, this will be /* Accessibility hint for actions when displaying media items. */ "Select media." = "Select media."; -/* Title of button that allows the user to select more photos to access within the app */ -"Select More" = "Select More"; - /* Accessibility label for selecting paragraph style button on formatting toolbar. */ "Select paragraph style" = "Select paragraph style"; @@ -8556,6 +8560,18 @@ Example: given a notice format "Following %@" and empty site name, this will be /* Accessibility hint for actions when displaying media items. */ "siteMedia.cellAccessibilityHint" = "Select media."; +/* Accessibility hint for media item preview for user's viewing an item in their media library */ +"siteMediaItem.contentViewAccessibilityHint" = "Tap to view media in full screen"; + +/* Accessibility label for media item preview for user's viewing an item in their media library */ +"siteMediaItem.contentViewAccessibilityLabel" = "Preview media"; + +/* Button selection media in media picker */ +"siteMediaPicker.deselect" = "Deselect"; + +/* Button selection media in media picker */ +"siteMediaPicker.select" = "Select"; + /* Media screen navigation title */ "siteMediaPicker.title" = "Media"; @@ -9303,9 +9319,6 @@ Example: given a notice format "Following %@" and empty site name, this will be /* Accessibility hint for button used to switch site */ "Tap to switch to another site, or add a new site" = "Tap to switch to another site, or add a new site"; -/* Accessibility hint for media item preview for user's viewing an item in their media library */ -"Tap to view media in full screen" = "Tap to view media in full screen"; - /* Accessibility hint for a button that opens a new view with more details. */ "Tap to view more details." = "Tap to view more details."; @@ -9582,9 +9595,6 @@ Example: given a notice format "Following %@" and empty site name, this will be /* A short error message letting the user know about a problem displaying a post. */ "There was a problem displaying this post." = "There was a problem displaying this post."; -/* Error message displayed when the Media Library is unable to load a full sized preview of an item. */ -"There was a problem loading the media item." = "There was a problem loading the media item."; - /* The loading view subtitle displayed when an error occurred */ "There was a problem loading your data, refresh your page to try again." = "There was a problem loading your data, refresh your page to try again."; @@ -9923,15 +9933,11 @@ Example: given a notice format "Following %@" and empty site name, this will be /* No comment provided by engineer. */ "Transform block…" = "Transform block…"; -/* Accessibility label for trash button to delete items from the user's media library - Accessibility label for trash buttons in nav bars +/* Accessibility label for trash buttons in nav bars Trashes a comment Trashes the comment */ "Trash" = "Trash"; -/* Accessibility hint for trash button to delete items from the user's media library */ -"Trash selected media" = "Trash selected media"; - /* Title of the trash confirmation alert. */ "Trash this post?" = "Trash this post?"; @@ -10052,9 +10058,6 @@ Example: given a notice format "Following %@" and empty site name, this will be /* Title for stories unknown error. */ "Unable to Create Stories Editor" = "Unable to Create Stories Editor"; -/* Text displayed in HUD if there was an error attempting to delete a group of media items. */ -"Unable to delete all media items." = "Unable to delete all media items."; - /* Text displayed in HUD if there was an error attempting to delete a media item. */ "Unable to delete media item." = "Unable to delete media item."; @@ -11525,9 +11528,6 @@ from anywhere."; /* Title of the site address section in the Domains Dashboard. */ "Your free WordPress.com address is" = "Your free WordPress.com address is"; -/* Error message when picked media cannot be imported into stories. */ -"Your media could not be exported. If the problem persists you can contact us via the Me > Help & Support screen." = "Your media could not be exported. If the problem persists you can contact us via the Me > Help & Support screen."; - /* Details about recently acquired domain on domain credit redemption success screen */ "Your new domain %@ is being set up. It may take up to 30 minutes for your domain to start working." = "Your new domain %@ is being set up. It may take up to 30 minutes for your domain to start working."; From 6bd2d52a6d50249c1dbf824ffe7bfa4f654c4a67 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:14:53 +1100 Subject: [PATCH 09/22] Remove duplicated `postList.swipeActionDelete` localized string key --- .../Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift b/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift index 2ac100700f64..b59d47b380a5 100644 --- a/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift +++ b/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift @@ -50,5 +50,5 @@ private enum Strings { static let swipeActionView = NSLocalizedString("postList.swipeActionView", value: "View", comment: "Swipe action title") static let swipeActionShare = NSLocalizedString("postList.swipeActionShare", value: "Share", comment: "Swipe action title") static let swipeActionTrash = NSLocalizedString("postList.swipeActionDelete", value: "Trash", comment: "Swipe action title") - static let swipeActionDeletePermanently = NSLocalizedString("postList.swipeActionDelete", value: "Delete", comment: "Swipe action title") + static let swipeActionDeletePermanently = NSLocalizedString("postList.swipeActionDeletePermanently", value: "Delete", comment: "Swipe action title") } From a890819f3a479c56efdd5f6970328dabe6d12635 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:17:42 +1100 Subject: [PATCH 10/22] Use more verbose comments for the `postList.swipeAction-` entries --- .../ViewRelated/Post/AbstractPostHelper+Actions.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift b/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift index b59d47b380a5..1c81578acf91 100644 --- a/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift +++ b/WordPress/Classes/ViewRelated/Post/AbstractPostHelper+Actions.swift @@ -47,8 +47,8 @@ extension AbstractPostHelper { } private enum Strings { - static let swipeActionView = NSLocalizedString("postList.swipeActionView", value: "View", comment: "Swipe action title") - static let swipeActionShare = NSLocalizedString("postList.swipeActionShare", value: "Share", comment: "Swipe action title") - static let swipeActionTrash = NSLocalizedString("postList.swipeActionDelete", value: "Trash", comment: "Swipe action title") - static let swipeActionDeletePermanently = NSLocalizedString("postList.swipeActionDeletePermanently", value: "Delete", comment: "Swipe action title") + static let swipeActionView = NSLocalizedString("postList.swipeActionView", value: "View", comment: "Title for the 'View' post list row swipe action") + static let swipeActionShare = NSLocalizedString("postList.swipeActionShare", value: "Share", comment: "Title for the 'Share' post list row swipe action") + static let swipeActionTrash = NSLocalizedString("postList.swipeActionDelete", value: "Trash", comment: "Title for the 'Trash' post list row swipe action") + static let swipeActionDeletePermanently = NSLocalizedString("postList.swipeActionDeletePermanently", value: "Delete", comment: "Title for the 'Delete' post list row swipe action") } From a97c640f6afc0bbe7701a7c60fc253f6512025df Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 27 Nov 2023 19:24:22 +1100 Subject: [PATCH 11/22] Update strings for localization --- WordPress/Resources/en.lproj/Localizable.strings | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WordPress/Resources/en.lproj/Localizable.strings b/WordPress/Resources/en.lproj/Localizable.strings index 76062a509796..e4c1fb4dec45 100644 --- a/WordPress/Resources/en.lproj/Localizable.strings +++ b/WordPress/Resources/en.lproj/Localizable.strings @@ -6937,13 +6937,16 @@ Please install the %3$@ to use the app with this site."; /* Accessibility label for a post in the post list. The first placeholder is the post title. The second placeholder is the date. */ "postList.a11y.titleAndDateChunkFormat" = "%1$@, %2$@."; -/* Swipe action title */ +/* Title for the 'Trash' post list row swipe action */ "postList.swipeActionDelete" = "Trash"; -/* Swipe action title */ +/* Title for the 'Delete' post list row swipe action */ +"postList.swipeActionDeletePermanently" = "Delete"; + +/* Title for the 'Share' post list row swipe action */ "postList.swipeActionShare" = "Share"; -/* Swipe action title */ +/* Title for the 'View' post list row swipe action */ "postList.swipeActionView" = "View"; /* All Time Stats 'Posts' label From 3b7a73f317583551a852c01f99b4febfbf4adb3b Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 18:33:21 +0100 Subject: [PATCH 12/22] Add a11y identifier to Image Optimization switch --- .../Me/App Settings/AppSettingsViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift b/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift index 2b51552ab6e4..632bb880e55f 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift @@ -443,7 +443,8 @@ private extension AppSettingsViewController { let imageOptimization = SwitchRow( title: NSLocalizedString("appSettings.media.imageOptimizationRow", value: "Optimize Images", comment: "Option to enable the optimization of images when uploading."), value: imageOptimizationValue, - onChange: imageOptimizationChanged() + onChange: imageOptimizationChanged(), + accessibilityIdentifier: "imageOptimizationSwitch" ) let imageSizingRow = ImageSizingRow( From ebde3640c3d3f3ed48cdd779c16ea0f7c3b5d758 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 18:34:16 +0100 Subject: [PATCH 13/22] Add `chooseOptimizeImages` to `BlockEditorScreen` --- .../Screens/Editor/BlockEditorScreen.swift | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift index 538bab40667b..7d045111afa5 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift @@ -96,6 +96,14 @@ public class BlockEditorScreen: ScreenObject { $0.staticTexts["You have unsaved changes."] } + private let turnOnImageOptimizationGetter: (XCUIApplication) -> XCUIElement = { + $0.buttons["Yes, leave on"] + } + + private let turnOffImageOptimizationGetter: (XCUIApplication) -> XCUIElement = { + $0.buttons["No, turn off"] + } + var addBlockButton: XCUIElement { addBlockButtonGetter(app) } var chooseFromDeviceButton: XCUIElement { chooseFromDeviceButtonGetter(app) } var closeButton: XCUIElement { closeButtonGetter(app) } @@ -119,6 +127,8 @@ public class BlockEditorScreen: ScreenObject { var switchToHTMLModeButton: XCUIElement { switchToHTMLModeButtonGetter(app) } var undoButton: XCUIElement { undoButtonGetter(app) } var unsavedChangesLabel: XCUIElement { unsavedChangesLabelGetter(app) } + var turnOnImageOptimization: XCUIElement { turnOnImageOptimizationGetter(app) } + var turnOffImageOptimization: XCUIElement { turnOffImageOptimizationGetter(app) } public init(app: XCUIApplication = XCUIApplication()) throws { // The block editor has _many_ elements but most are loaded on-demand. To verify the screen @@ -191,6 +201,20 @@ public class BlockEditorScreen: ScreenObject { return self } + /** + Chooses the option of Optimize Images popup. + */ + public func chooseOptimizeImages(option: Bool) throws -> BlockEditorScreen { + if option { + turnOnImageOptimization.tap() + } + else { + turnOffImageOptimization.tap() + } + + return self + } + public func addVideoFromUrl(urlPath: String) -> Self { addMediaBlockFromUrl( blockType: "Video block", From 5764275116096e2ecf02a0cbfad6fc3d701f40f9 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 18:34:35 +0100 Subject: [PATCH 14/22] Add `goToAppSettings` to `MeTabScreen` --- WordPress/UITestsFoundation/Screens/MeTabScreen.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WordPress/UITestsFoundation/Screens/MeTabScreen.swift b/WordPress/UITestsFoundation/Screens/MeTabScreen.swift index 05cf55cebc8e..12d39413ac2e 100644 --- a/WordPress/UITestsFoundation/Screens/MeTabScreen.swift +++ b/WordPress/UITestsFoundation/Screens/MeTabScreen.swift @@ -96,4 +96,10 @@ public class MeTabScreen: ScreenObject { return try MySiteScreen() } + + public func goToAppSettings() throws -> AppSettingsScreen { + appSettingsButton.tap() + + return try AppSettingsScreen() + } } From ab5f23ebe3e7c3789eab0531019946e29f05e814 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 18:35:18 +0100 Subject: [PATCH 15/22] Add app settings screen tests --- .../UITests/Tests/AppSettingsTests.swift | 31 +++++++++++++ .../Screens/Me/AppSettingsScreen.swift | 45 +++++++++++++++++++ WordPress/WordPress.xcodeproj/project.pbxproj | 10 +++++ 3 files changed, 86 insertions(+) create mode 100644 WordPress/UITests/Tests/AppSettingsTests.swift create mode 100644 WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift diff --git a/WordPress/UITests/Tests/AppSettingsTests.swift b/WordPress/UITests/Tests/AppSettingsTests.swift new file mode 100644 index 000000000000..b7eed33dd0fb --- /dev/null +++ b/WordPress/UITests/Tests/AppSettingsTests.swift @@ -0,0 +1,31 @@ +import UITestsFoundation +import XCTest + +final class AppSettingsTests: XCTestCase { + + @MainActor + override func setUpWithError() throws { + setUpTestSuite(removeBeforeLaunching: true) + + try LoginFlow + .login(email: WPUITestCredentials.testWPcomUserEmail) + } + + override func tearDownWithError() throws { + takeScreenshotOfFailedTest() + } + + func testImageOptimizationEnabledByDefault() throws { + try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: true) + } + + func testImageOptimizationIsTurnedOnEditor() throws { + try TabNavComponent().goToBlockEditorScreen().addImage().chooseOptimizeImages(option: true).closeEditor() + try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: true) + } + + func testImageOptimizationIsTurnedOffEditor() throws { + try TabNavComponent().goToBlockEditorScreen().addImage().chooseOptimizeImages(option: false).closeEditor() + try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: false) + } +} diff --git a/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift b/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift new file mode 100644 index 000000000000..17f981e1ff7b --- /dev/null +++ b/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift @@ -0,0 +1,45 @@ +import ScreenObject +import XCTest + +public class AppSettingsScreen: ScreenObject { + + private let backButtonGetter: (XCUIApplication) -> XCUIElement = { + $0.navigationBars.buttons.element(boundBy: 0) + } + + private let imageOptimizationSwitchGetter: (XCUIApplication) -> XCUIElement = { + $0.switches["imageOptimizationSwitch"] + } + + var backButton: XCUIElement { backButtonGetter(app) } + var imageOptimizationSwitch: XCUIElement { imageOptimizationSwitchGetter(app) } + + init(app: XCUIApplication = XCUIApplication()) throws { + try super.init( + expectedElementGetters: [ + backButtonGetter, + ], + app: app + ) + } + + public func tapImageOptimizationSwitch() throws -> Self { + imageOptimizationSwitch.tap() + return self + } + + @discardableResult + public func verifyImageOptimizationSwitch(enabled: Bool) -> Self { + XCTAssertEqual(imageOptimizationSwitch.value as? String, enabled ? "1" : "0") + return self + } + + public func dismiss() throws -> MeTabScreen { + backButton.tap() + return try MeTabScreen() + } + + static func isLoaded() -> Bool { + (try? AppSettingsScreen().isLoaded) ?? false + } +} diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 4f898706acc4..e7dddd52a6e0 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -758,6 +758,9 @@ 17FCA6811FD84B4600DBA9C8 /* NoticeStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17FCA6801FD84B4600DBA9C8 /* NoticeStore.swift */; }; 1A433B1D2254CBEE00AE7910 /* WordPressComRestApi+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A433B1C2254CBEE00AE7910 /* WordPressComRestApi+Defaults.swift */; }; 1ABA150822AE5F870039311A /* WordPressUIBundleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA150722AE5F870039311A /* WordPressUIBundleTests.swift */; }; + 1D0402732B10FA9100888C30 /* AppSettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D0402722B10FA9100888C30 /* AppSettingsTests.swift */; }; + 1D0402742B10FA9100888C30 /* AppSettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D0402722B10FA9100888C30 /* AppSettingsTests.swift */; }; + 1D0402762B10FB9E00888C30 /* AppSettingsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D0402752B10FB9E00888C30 /* AppSettingsScreen.swift */; }; 1D19C56329C9D9A700FB0087 /* GutenbergVideoPressUploadProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D19C56229C9D9A700FB0087 /* GutenbergVideoPressUploadProcessor.swift */; }; 1D19C56429C9D9A700FB0087 /* GutenbergVideoPressUploadProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D19C56229C9D9A700FB0087 /* GutenbergVideoPressUploadProcessor.swift */; }; 1D19C56629C9DB0A00FB0087 /* GutenbergVideoPressUploadProcessorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D19C56529C9DB0A00FB0087 /* GutenbergVideoPressUploadProcessorTests.swift */; }; @@ -6420,6 +6423,8 @@ 1A433B1C2254CBEE00AE7910 /* WordPressComRestApi+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WordPressComRestApi+Defaults.swift"; sourceTree = ""; }; 1ABA150722AE5F870039311A /* WordPressUIBundleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressUIBundleTests.swift; sourceTree = ""; }; 1BC96E982E9B1A6DD86AF491 /* Pods-WordPressShareExtension.release-alpha.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressShareExtension.release-alpha.xcconfig"; path = "../Pods/Target Support Files/Pods-WordPressShareExtension/Pods-WordPressShareExtension.release-alpha.xcconfig"; sourceTree = ""; }; + 1D0402722B10FA9100888C30 /* AppSettingsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSettingsTests.swift; sourceTree = ""; }; + 1D0402752B10FB9E00888C30 /* AppSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSettingsScreen.swift; sourceTree = ""; }; 1D19C56229C9D9A700FB0087 /* GutenbergVideoPressUploadProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GutenbergVideoPressUploadProcessor.swift; sourceTree = ""; }; 1D19C56529C9DB0A00FB0087 /* GutenbergVideoPressUploadProcessorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GutenbergVideoPressUploadProcessorTests.swift; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -15863,6 +15868,7 @@ CC7CB97222B1510900642EE9 /* SignupTests.swift */, EAD2BF4127594DAB00A847BB /* StatsTests.swift */, 6E5BA46826A59D620043A6F2 /* SupportScreenTests.swift */, + 1D0402722B10FA9100888C30 /* AppSettingsTests.swift */, ); path = Tests; sourceTree = ""; @@ -16329,6 +16335,7 @@ children = ( EA78189327596B2F00554DFA /* ContactUsScreen.swift */, 6EC71EC22689A67400ACC0A0 /* SupportScreen.swift */, + 1D0402752B10FB9E00888C30 /* AppSettingsScreen.swift */, ); path = Me; sourceTree = ""; @@ -22963,6 +22970,7 @@ EAD08D0E29D45E23001A72F9 /* CommentsScreen.swift in Sources */, 3F762E9526784B540088CD45 /* WireMock.swift in Sources */, C7B7CC7328134347007B9807 /* OnboardingQuestionsPromptScreen.swift in Sources */, + 1D0402762B10FB9E00888C30 /* AppSettingsScreen.swift in Sources */, 3FE39A3F26F8384E006E2B3A /* StatsScreen.swift in Sources */, 3FE39A3126F836A5006E2B3A /* LoginSiteAddressScreen.swift in Sources */, 3F2F855126FAF227000FCDA5 /* WelcomeScreenLoginComponent.swift in Sources */, @@ -23859,6 +23867,7 @@ EA14533229AD874C001F3143 /* SignupTests.swift in Sources */, EA14533329AD874C001F3143 /* EditorFlow.swift in Sources */, 01281E9D2A051EEA00464F8F /* MenuNavigationTests.swift in Sources */, + 1D0402742B10FA9100888C30 /* AppSettingsTests.swift in Sources */, EA14533429AD874C001F3143 /* UIApplication+mainWindow.swift in Sources */, EA14533529AD874C001F3143 /* LoginFlow.swift in Sources */, EA14533629AD874C001F3143 /* XCTest+Extensions.swift in Sources */, @@ -25817,6 +25826,7 @@ CC7CB97322B1510900642EE9 /* SignupTests.swift in Sources */, CC52188C2278C622008998CE /* EditorFlow.swift in Sources */, 01281E9C2A051EEA00464F8F /* MenuNavigationTests.swift in Sources */, + 1D0402732B10FA9100888C30 /* AppSettingsTests.swift in Sources */, 8B5FEAF125A746CB000CBFF7 /* UIApplication+mainWindow.swift in Sources */, BED4D8331FF11E3800A11345 /* LoginFlow.swift in Sources */, FF2716A11CABC7D40006E2D4 /* XCTest+Extensions.swift in Sources */, From acb5eafcde5ed83171a0602acc18c6db4ebf5a63 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 18:35:44 +0100 Subject: [PATCH 16/22] Fix app deletion in UI tests --- WordPress/UITestsFoundation/XCTestCase+Utils.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/UITestsFoundation/XCTestCase+Utils.swift b/WordPress/UITestsFoundation/XCTestCase+Utils.swift index f4ca321069d4..7bc341b42648 100644 --- a/WordPress/UITestsFoundation/XCTestCase+Utils.swift +++ b/WordPress/UITestsFoundation/XCTestCase+Utils.swift @@ -27,7 +27,7 @@ public extension XCTestCase { appToRemove.firstMatch.press(forDuration: 1) waitAndTap(Apps.springboard.buttons["Remove App"]) - waitAndTap(Apps.springboard.alerts.buttons["Delete App"]) + waitForExistenceAndTap(Apps.springboard.alerts.buttons["Delete App"]) waitAndTap(Apps.springboard.alerts.buttons["Delete"]) } From 868907949d8bee74d874e5578f735925747b56a4 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Mon, 27 Nov 2023 13:13:54 +0100 Subject: [PATCH 17/22] Add calls to `super` in overridden functions of `AppSettingsTests` --- WordPress/UITests/Tests/AppSettingsTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WordPress/UITests/Tests/AppSettingsTests.swift b/WordPress/UITests/Tests/AppSettingsTests.swift index b7eed33dd0fb..1d305415be19 100644 --- a/WordPress/UITests/Tests/AppSettingsTests.swift +++ b/WordPress/UITests/Tests/AppSettingsTests.swift @@ -5,6 +5,7 @@ final class AppSettingsTests: XCTestCase { @MainActor override func setUpWithError() throws { + try super.setUpWithError() setUpTestSuite(removeBeforeLaunching: true) try LoginFlow @@ -12,6 +13,7 @@ final class AppSettingsTests: XCTestCase { } override func tearDownWithError() throws { + try super.tearDownWithError() takeScreenshotOfFailedTest() } From bb664132609cfed0bf73e89c502c164efe6177b4 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Mon, 27 Nov 2023 16:08:43 +0100 Subject: [PATCH 18/22] Fix expected element getters in `AppSettingsScreen` We don't strictly need to expect the back button being present. In fact, on iPad, there's no back button in that screen. --- WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift b/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift index 17f981e1ff7b..36c2be8f2eb2 100644 --- a/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Me/AppSettingsScreen.swift @@ -17,7 +17,7 @@ public class AppSettingsScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ - backButtonGetter, + imageOptimizationSwitchGetter, ], app: app ) From 88e54245ae1d1eafc80e92ce4ec51a4ae2820140 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 28 Nov 2023 12:44:25 +0100 Subject: [PATCH 19/22] Use naming pattern for getters in `BlockEditorScreen` --- .../Screens/Editor/BlockEditorScreen.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift index 7d045111afa5..ace064c4ca8b 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift @@ -96,11 +96,11 @@ public class BlockEditorScreen: ScreenObject { $0.staticTexts["You have unsaved changes."] } - private let turnOnImageOptimizationGetter: (XCUIApplication) -> XCUIElement = { + private let turnOnImageOptimizationButtonGetter: (XCUIApplication) -> XCUIElement = { $0.buttons["Yes, leave on"] } - private let turnOffImageOptimizationGetter: (XCUIApplication) -> XCUIElement = { + private let turnOffImageOptimizationButtonGetter: (XCUIApplication) -> XCUIElement = { $0.buttons["No, turn off"] } @@ -127,8 +127,8 @@ public class BlockEditorScreen: ScreenObject { var switchToHTMLModeButton: XCUIElement { switchToHTMLModeButtonGetter(app) } var undoButton: XCUIElement { undoButtonGetter(app) } var unsavedChangesLabel: XCUIElement { unsavedChangesLabelGetter(app) } - var turnOnImageOptimization: XCUIElement { turnOnImageOptimizationGetter(app) } - var turnOffImageOptimization: XCUIElement { turnOffImageOptimizationGetter(app) } + var turnOnImageOptimizationButton: XCUIElement { turnOnImageOptimizationButtonGetter(app) } + var turnOffImageOptimizationButton: XCUIElement { turnOffImageOptimizationButtonGetter(app) } public init(app: XCUIApplication = XCUIApplication()) throws { // The block editor has _many_ elements but most are loaded on-demand. To verify the screen @@ -206,10 +206,10 @@ public class BlockEditorScreen: ScreenObject { */ public func chooseOptimizeImages(option: Bool) throws -> BlockEditorScreen { if option { - turnOnImageOptimization.tap() + turnOnImageOptimizationButton.tap() } else { - turnOffImageOptimization.tap() + turnOffImageOptimizationButton.tap() } return self From 00e4d46e825778b4d84d968fad1d6a36fab1a7a3 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 28 Nov 2023 12:45:58 +0100 Subject: [PATCH 20/22] Only remove the app before launching in specific App Settings test cases --- WordPress/UITests/Tests/AppSettingsTests.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/WordPress/UITests/Tests/AppSettingsTests.swift b/WordPress/UITests/Tests/AppSettingsTests.swift index 1d305415be19..829ea87c4ce2 100644 --- a/WordPress/UITests/Tests/AppSettingsTests.swift +++ b/WordPress/UITests/Tests/AppSettingsTests.swift @@ -3,10 +3,20 @@ import XCTest final class AppSettingsTests: XCTestCase { + let testsRequiringAppDeletion = [ + "testImageOptimizationEnabledByDefault", + "testImageOptimizationIsTurnedOnEditor", + "testImageOptimizationIsTurnedOffEditor" + ] + @MainActor override func setUpWithError() throws { try super.setUpWithError() - setUpTestSuite(removeBeforeLaunching: true) + + let removeBeforeLaunching = testsRequiringAppDeletion.contains { testName in + self.name.contains(testName) + } + setUpTestSuite(removeBeforeLaunching: removeBeforeLaunching) try LoginFlow .login(email: WPUITestCredentials.testWPcomUserEmail) From ac3d4d4e664be4a6c19c2bd06403f65dedbc1ccf Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 28 Nov 2023 12:47:05 +0100 Subject: [PATCH 21/22] Reformat test cases in `AppSettingsTests` --- .../UITests/Tests/AppSettingsTests.swift | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/WordPress/UITests/Tests/AppSettingsTests.swift b/WordPress/UITests/Tests/AppSettingsTests.swift index 829ea87c4ce2..2589f0477553 100644 --- a/WordPress/UITests/Tests/AppSettingsTests.swift +++ b/WordPress/UITests/Tests/AppSettingsTests.swift @@ -28,16 +28,33 @@ final class AppSettingsTests: XCTestCase { } func testImageOptimizationEnabledByDefault() throws { - try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: true) + try TabNavComponent() + .goToMeScreen() + .goToAppSettings() + .verifyImageOptimizationSwitch(enabled: true) } func testImageOptimizationIsTurnedOnEditor() throws { - try TabNavComponent().goToBlockEditorScreen().addImage().chooseOptimizeImages(option: true).closeEditor() - try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: true) + try TabNavComponent() + .goToBlockEditorScreen() + .addImage() + .chooseOptimizeImages(option: true) + .closeEditor() + try TabNavComponent() + .goToMeScreen() + .goToAppSettings() + .verifyImageOptimizationSwitch(enabled: true) } func testImageOptimizationIsTurnedOffEditor() throws { - try TabNavComponent().goToBlockEditorScreen().addImage().chooseOptimizeImages(option: false).closeEditor() - try TabNavComponent().goToMeScreen().goToAppSettings().verifyImageOptimizationSwitch(enabled: false) + try TabNavComponent() + .goToBlockEditorScreen() + .addImage() + .chooseOptimizeImages(option: false) + .closeEditor() + try TabNavComponent() + .goToMeScreen() + .goToAppSettings() + .verifyImageOptimizationSwitch(enabled: false) } } From f51be52eed99ee51502a55df62a070b2a51f0174 Mon Sep 17 00:00:00 2001 From: kean Date: Tue, 28 Nov 2023 09:37:39 -0500 Subject: [PATCH 22/22] Fix typos --- RELEASE-NOTES.txt | 2 +- .../ViewRelated/Gutenberg/GutenbergMediaPickerHelper.swift | 2 +- .../Classes/ViewRelated/Gutenberg/GutenbergViewController.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index b7069b3bc534..4776e23815d0 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -4,7 +4,7 @@ * [*] The "aspect ratio" mode on the Site Media screen is now also available on iPhone via the new title menu [#22096] * [**] Update the classic editor to use the new Photos and Site Media pickers [#22060] * [**] [internal] Remove WPMediaPicker dependency [#22103] -* [*] [internal] Remove WPMediaPicker dependency from Tenor and Stock Photos pickers [#22066, #22074] +* [*] [internal] Rework Tenor (Free GIF) and Stock Photos (Free Photos) pickers [#22066, #22074] 23.8 ----- diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergMediaPickerHelper.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergMediaPickerHelper.swift index bf9db084c463..dea27f2a5e9b 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergMediaPickerHelper.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergMediaPickerHelper.swift @@ -38,7 +38,7 @@ final class GutenbergMediaPickerHelper: NSObject { context.present(picker, animated: true) } - func presentSiteMediaPickere(filter: WPMediaType, allowMultipleSelection: Bool, completion: @escaping GutenbergMediaPickerHelperCallback) { + func presentSiteMediaPicker(filter: WPMediaType, allowMultipleSelection: Bool, completion: @escaping GutenbergMediaPickerHelperCallback) { didPickMediaCallback = completion MediaPickerMenu(viewController: context, filter: .init(filter), isMultipleSelectionEnabled: allowMultipleSelection) .showSiteMediaPicker(blog: post.blog, delegate: self) diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift index 4d99739f9165..5f1615930d52 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift @@ -643,7 +643,7 @@ extension GutenbergViewController: GutenbergBridgeDelegate { } func gutenbergDidRequestMediaFromSiteMediaLibrary(filter: WPMediaType, allowMultipleSelection: Bool, with callback: @escaping MediaPickerDidPickMediaCallback) { - mediaPickerHelper.presentSiteMediaPickere(filter: filter, allowMultipleSelection: allowMultipleSelection) { [weak self] assets in + mediaPickerHelper.presentSiteMediaPicker(filter: filter, allowMultipleSelection: allowMultipleSelection) { [weak self] assets in guard let self, let media = assets as? [Media] else { callback(nil) return