Skip to content

Commit

Permalink
Merge changes from beta 19.7.0.1 + Release Notes (#18411)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Apr 21, 2022
2 parents 5596952 + d00b8ef commit b033106
Show file tree
Hide file tree
Showing 83 changed files with 1,234 additions and 1,103 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-----
* [*] a11y: VoiceOver has been improved on the Menus view and now announces changes to ordering. [#18155]
* [*] Notifications list: remove comment Trash swipe action. [#18349]
* [*] Reader: Fixed a bug that caused cut off content in reader web view [#16106]
* [*] Web previews now abide by safe areas when a toolbar is shown [#18127]
* [*] Site creation: Adds a new screen asking the user the intent of the site [#18367]
* [**] Block Editor: Quote block: Adds support for V2 behind a feature flag [https://github.com/WordPress/gutenberg/pull/40133]
* [**] Block Editor: Update "add block" button's style in default editor view [https://github.com/WordPress/gutenberg/pull/39726]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import UIKit

class SiteDesignPreviewViewController: TemplatePreviewViewController {
private let createsSite: Bool
let completion: SiteDesignStep.SiteDesignSelection
let siteDesign: RemoteSiteDesign

init(siteDesign: RemoteSiteDesign, selectedPreviewDevice: PreviewDevice?, onDismissWithDeviceSelected: ((PreviewDevice) -> ())?, completion: @escaping SiteDesignStep.SiteDesignSelection) {
init(siteDesign: RemoteSiteDesign, selectedPreviewDevice: PreviewDevice?, createsSite: Bool, onDismissWithDeviceSelected: ((PreviewDevice) -> ())?, completion: @escaping SiteDesignStep.SiteDesignSelection) {
self.completion = completion
self.siteDesign = siteDesign
self.createsSite = createsSite
super.init(demoURL: siteDesign.demoURL, selectedPreviewDevice: selectedPreviewDevice, onDismissWithDeviceSelected: onDismissWithDeviceSelected)
delegate = self
title = NSLocalizedString("Preview", comment: "Title for screen to preview a selected homepage design")
title = TextContent.previewTitle
}

required init?(coder: NSCoder) {
Expand All @@ -19,6 +21,17 @@ class SiteDesignPreviewViewController: TemplatePreviewViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.leftBarButtonItem = CollapsableHeaderViewController.closeButton(target: self, action: #selector(closeButtonTapped))
setPrimaryActionButtonTitle()
}

private func setPrimaryActionButtonTitle() {
primaryActionButton.setTitle(createsSite ? TextContent.createSiteButton : TextContent.chooseButton, for: .normal)
}

private enum TextContent {
static let previewTitle = NSLocalizedString("Preview", comment: "Title for screen to preview a selected homepage design.")
static let createSiteButton = NSLocalizedString("Create Site", comment: "Title for the button to progress with creating the site with the selected design.")
static let chooseButton = NSLocalizedString("Choose", comment: "Title for the button to progress with the selected site homepage design.")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class SiteDesignSection: CategorySection {

class SiteDesignContentCollectionViewController: FilterableCategoriesViewController, UIPopoverPresentationControllerDelegate {
typealias TemplateGroup = SiteDesignRequest.TemplateGroup
private let createsSite: Bool
private let templateGroups: [TemplateGroup] = [.stable, .singlePage]

let completion: SiteDesignStep.SiteDesignSelection
Expand Down Expand Up @@ -55,15 +56,16 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl
return sections[sectionIndex].designs[position]
}

init(_ completion: @escaping SiteDesignStep.SiteDesignSelection) {
init(createsSite: Bool, _ completion: @escaping SiteDesignStep.SiteDesignSelection) {
self.completion = completion
self.createsSite = createsSite

super.init(
analyticsLocation: "site_creation",
mainTitle: NSLocalizedString("Choose a design", comment: "Title for the screen to pick a design and homepage for a site."),
prompt: NSLocalizedString("Pick your favorite homepage layout. You can edit and customize it later.", comment: "Prompt for the screen to pick a design and homepage for a site."),
primaryActionTitle: NSLocalizedString("Choose", comment: "Title for the button to progress with the selected site homepage design"),
secondaryActionTitle: NSLocalizedString("Preview", comment: "Title for button to preview a selected homepage design")
mainTitle: TextContent.mainTitle,
prompt: TextContent.subtitle,
primaryActionTitle: createsSite ? TextContent.createSiteButton : TextContent.chooseButton,
secondaryActionTitle: TextContent.previewButton
)
}

Expand All @@ -73,7 +75,7 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl

override func viewDidLoad() {
super.viewDidLoad()
navigationItem.backButtonTitle = NSLocalizedString("Design", comment: "Shortened version of the main title to be used in back navigation")
navigationItem.backButtonTitle = TextContent.backButtonTitle
fetchSiteDesigns()
configureCloseButton()
configureSkipButton()
Expand All @@ -100,7 +102,7 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl
}

private func configureSkipButton() {
let skip = UIBarButtonItem(title: NSLocalizedString("Skip", comment: "Continue without making a selection"), style: .done, target: self, action: #selector(skipButtonTapped))
let skip = UIBarButtonItem(title: TextContent.skipButtonTitle, style: .done, target: self, action: #selector(skipButtonTapped))
navigationItem.rightBarButtonItem = skip
}

Expand All @@ -115,7 +117,7 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl
return
}

navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Cancel", comment: "Cancel site creation"), style: .done, target: self, action: #selector(closeButtonTapped))
navigationItem.leftBarButtonItem = UIBarButtonItem(title: TextContent.cancelButtonTitle, style: .done, target: self, action: #selector(closeButtonTapped))
}

@objc func skipButtonTapped(_ sender: Any) {
Expand Down Expand Up @@ -151,7 +153,7 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl
override func secondaryActionSelected(_ sender: Any) {
guard let design = selectedDesign else { return }

let previewVC = SiteDesignPreviewViewController(siteDesign: design, selectedPreviewDevice: selectedPreviewDevice, onDismissWithDeviceSelected: { [weak self] device in
let previewVC = SiteDesignPreviewViewController(siteDesign: design, selectedPreviewDevice: selectedPreviewDevice, createsSite: createsSite, onDismissWithDeviceSelected: { [weak self] device in
self?.selectedPreviewDevice = device
}, completion: completion)

Expand All @@ -162,10 +164,23 @@ class SiteDesignContentCollectionViewController: FilterableCategoriesViewControl

private func handleError(_ error: Error) {
SiteCreationAnalyticsHelper.trackError(error)
let titleText = NSLocalizedString("Unable to load this content right now.", comment: "Informing the user that a network request failed becuase the device wasn't able to establish a network connection.")
let subtitleText = NSLocalizedString("Check your network connection and try again.", comment: "Default subtitle for no-results when there is no connection.")
let titleText = TextContent.errorTitle
let subtitleText = TextContent.errorSubtitle
displayNoResultsController(title: titleText, subtitle: subtitleText, resultsDelegate: self)
}

private enum TextContent {
static let mainTitle = NSLocalizedString("Choose a design", comment: "Title for the screen to pick a design and homepage for a site.")
static let subtitle = NSLocalizedString("Pick your favorite homepage layout. You can edit and customize it later.", comment: "Prompt for the screen to pick a design and homepage for a site.")
static let createSiteButton = NSLocalizedString("Create Site", comment: "Title for the button to progress with creating the site with the selected design.")
static let chooseButton = NSLocalizedString("Choose", comment: "Title for the button to progress with the selected site homepage design.")
static let previewButton = NSLocalizedString("Preview", comment: "Title for button to preview a selected homepage design.")
static let backButtonTitle = NSLocalizedString("Design", comment: "Shortened version of the main title to be used in back navigation.")
static let skipButtonTitle = NSLocalizedString("Skip", comment: "Continue without making a selection.")
static let cancelButtonTitle = NSLocalizedString("Cancel", comment: "Cancel site creation.")
static let errorTitle = NSLocalizedString("Unable to load this content right now.", comment: "Informing the user that a network request failed becuase the device wasn't able to establish a network connection.")
static let errorSubtitle = NSLocalizedString("Check your network connection and try again.", comment: "Default subtitle for no-results when there is no connection.")
}
}

// MARK: - NoResultsViewControllerDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ final class SiteDesignStep: WizardStep {
typealias SiteDesignSelection = (_ design: RemoteSiteDesign?) -> Void
weak var delegate: WizardDelegate?
private let creator: SiteCreator
private let isLastStep: Bool

private(set) lazy var content: UIViewController = {
return SiteDesignContentCollectionViewController { [weak self] (design) in
return SiteDesignContentCollectionViewController(createsSite: isLastStep) { [weak self] (design) in
self?.didSelect(design)
}
}()

init(creator: SiteCreator) {
init(creator: SiteCreator, isLastStep: Bool) {
self.creator = creator
self.isLastStep = isLastStep
}

private func didSelect(_ design: RemoteSiteDesign?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ final class SiteCreationWizardLauncher {
let addressService = DomainsServiceAdapter(managedObjectContext: ContextManager.sharedInstance().mainContext)
return WebAddressStep(creator: self.creator, service: addressService)
case .design:
return SiteDesignStep(creator: self.creator)
// we call dropLast to remove .siteAssembly
let isLastStep = steps.dropLast().last == .design
return SiteDesignStep(creator: self.creator, isLastStep: isLastStep)
case .intent:
return SiteIntentStep(creator: self.creator)
case .name:
Expand Down
14 changes: 9 additions & 5 deletions WordPress/Jetpack/Resources/AppStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ msgctxt "app_store_keywords"
msgid "social,notes,jetpack,writing,geotagging,media,blog,website,blogging,journal"
msgstr ""

msgctxt "v19.6-whats-new"
msgctxt "v19.7-whats-new"
msgid ""
"Big news, site fans—your My Site screen just got better. You’ll now see two new tabs you can switch between: Site Menu and Home.\n"
"We made a small but mighty change to the block editor: the “Add Block” button is more visible when you first open the editor with no blocks selected. We also removed one of three error notifications when a media or audio block fails to upload—it felt like overkill.\n"
"\n"
"The Home tab also contains handy cards with more information about your site, including drafts, scheduled posts, and today’s stats. Or, if you’re in a hurry, you can easily head over to another section of the app.\n"
"You’ll hear some accessibility tweaks in the VoiceOver experience when you’re rearranging menu items. Instructions and notices are clearer, and the menu hierarchy makes more sense out loud.\n"
"\n"
"We’re all about clear communication. That’s why we’ve added new error text to the photo upload process, just in case you try to upload a photo from your device without giving the app photo permission first.\n"
"We added a new screen to the site creation process where you can enter your site’s intent. We tested this screen with a small group of users, and we think you’ll like it, too.\n"
"\n"
"Finally, when in-app notices pop up, they now fade out more smoothly when you don’t need them anymore. Exit stage left.\n"
"Web previews won’t cut off bottom-of-the-screen notifications when your browser toolbar is visible.\n"
"\n"
"What’s in a name? Well, if your site has one, you’ll see it in the My Site navigation title.\n"
"\n"
"When you swipe left on a comment in your Notifications, you won’t see the “Trash” option anymore. Instead you’ll see “Unapprove Comment” and “Approve Comment.” We approve.\n"
msgstr ""

#. translators: This is a promo message that will be attached on top of the first screenshot in the App Store.
Expand Down
19 changes: 10 additions & 9 deletions WordPress/Jetpack/Resources/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
* [*] a11y: VoiceOver has been improved on the Menus view and now announces changes to ordering. [#18155]
* [*] Notifications list: remove comment Trash swipe action. [#18349]
* [*] Reader: Fixed a bug that caused cut off content in reader web view [#16106]
* [*] Site creation: Adds a new screen asking the user the intent of the site [#18367]
* [**] Block Editor: Quote block: Adds support for V2 behind a feature flag [https://github.com/WordPress/gutenberg/pull/40133]
* [**] Block Editor: Update "add block" button's style in default editor view [https://github.com/WordPress/gutenberg/pull/39726]
* [*] Block Editor: Remove banner error notification on upload failure [https://github.com/WordPress/gutenberg/pull/39694]
* [*] My Site: display site name in My Site screen nav title [#18373]
* [*] [internal] Site creation: Adds a new screen asking the user the name of the site [#18280]
We made a small but mighty change to the block editor: the “Add Block” button is more visible when you first open the editor with no blocks selected. We also removed one of three error notifications when a media or audio block fails to upload—it felt like overkill.

You’ll hear some accessibility tweaks in the VoiceOver experience when you’re rearranging menu items. Instructions and notices are clearer, and the menu hierarchy makes more sense out loud.

We added a new screen to the site creation process where you can enter your site’s intent. We tested this screen with a small group of users, and we think you’ll like it, too.

Web previews won’t cut off bottom-of-the-screen notifications when your browser toolbar is visible.

What’s in a name? Well, if your site has one, you’ll see it in the My Site navigation title.

When you swipe left on a comment in your Notifications, you won’t see the “Trash” option anymore. Instead you’ll see “Unapprove Comment” and “Approve Comment.” We approve.
14 changes: 9 additions & 5 deletions WordPress/Resources/AppStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,19 @@ msgctxt "app_store_keywords"
msgid "blogger,writing,blogging,web,maker,online,store,business,make,create,write,blogs"
msgstr ""

msgctxt "v19.6-whats-new"
msgctxt "v19.7-whats-new"
msgid ""
"Big news, site fans—your My Site screen just got better. You’ll now see two new tabs you can switch between: Site Menu and Home.\n"
"We made a small but mighty change to the block editor: the “Add Block” button is more visible when you first open the editor with no blocks selected. We also removed one of three error notifications when a media or audio block fails to upload—it felt like overkill.\n"
"\n"
"The Home tab also contains handy cards with more information about your site, including drafts, scheduled posts, and today’s stats. Or, if you’re in a hurry, you can easily head over to another section of the app.\n"
"You’ll hear some accessibility tweaks in the VoiceOver experience when you’re rearranging menu items. Instructions and notices are clearer, and the menu hierarchy makes more sense out loud.\n"
"\n"
"We’re all about clear communication. That’s why we’ve added new error text to the photo upload process, just in case you try to upload a photo from your device without giving the app photo permission first.\n"
"We added a new screen to the site creation process where you can enter your site’s intent. We tested this screen with a small group of users, and we think you’ll like it, too.\n"
"\n"
"Finally, when in-app notices pop up, they now fade out more smoothly when you don’t need them anymore. Exit stage left.\n"
"Web previews won’t cut off bottom-of-the-screen notifications when your browser toolbar is visible.\n"
"\n"
"What’s in a name? Well, if your site has one, you’ll see it in the My Site navigation title.\n"
"\n"
"When you swipe left on a comment in your Notifications, you won’t see the “Trash” option anymore. Instead you’ll see “Unapprove Comment” and “Approve Comment.” We approve.\n"
msgstr ""

#. translators: This is a standard chunk of text used to tell a user what's new with a release when nothing major has changed.
Expand Down
Loading

0 comments on commit b033106

Please sign in to comment.