-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Site Name] Adjusts design picker buttons for treatment variation #18397
Conversation
You can test the changes in Jetpack from this Pull Request by:
.ipa file can also be downloaded directly here.If you need access to App Center, please ask a maintainer to add you. |
You can test the changes in WordPress from this Pull Request by:
.ipa file can also be downloaded directly here.If you need access to App Center, please ask a maintainer to add you. |
Note: The PR will probably need to target |
a1a9b91
to
7a4701d
Compare
The skip button change was reverted with 7a4701d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this @antonis ! the change works as expected; just left a couple of comments for you to consider.
@@ -100,10 +100,13 @@ class TemplatePreviewViewController: UIViewController, NoResultsViewHost, UIPopo | |||
} | |||
|
|||
private func styleButtons() { | |||
let isLastSiteCreationStep = ABTest.siteNameV1.variation == .treatment(nil) && FeatureFlag.siteName.enabled | |||
let mainButtonTitle = isLastSiteCreationStep ? NSLocalizedString("Create site", comment: "Title for the button to progress with creating the site with the selected design") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we have a couple of hardcoded strings, including this one, would it be possible to group them in a private enum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -100,10 +100,13 @@ class TemplatePreviewViewController: UIViewController, NoResultsViewHost, UIPopo | |||
} | |||
|
|||
private func styleButtons() { | |||
let isLastSiteCreationStep = ABTest.siteNameV1.variation == .treatment(nil) && FeatureFlag.siteName.enabled | |||
let mainButtonTitle = isLastSiteCreationStep ? NSLocalizedString("Create site", comment: "Title for the button to progress with creating the site with the selected design") | |||
: NSLocalizedString("Choose", comment: "Title for the button to progress with the selected site homepage design") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the comment should have a period at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled with babc542 👍
|
||
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"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comments here: the comment should have a period, and since this file has quite a few hardcoded strings, wondering if we can group them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above handled with babc542. Thank you for the feedback 🙇
👋 If we're going to land on a single string after the A/B tests I'd suggest not using this PR to keep things simpler, but I've created one with tests in case we might need it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only suggestion would be to consider making changes in SiteDesignPreviewViewController
rather than TemplatePreviewViewController
since it's a more specific subclass. LayoutPreviewViewController
also relies on TemplatePreviewViewController
but because of ordering it isn't affected. 👍
…ign-buttons-tweaks [Site Creation] Pass a boolean to determine Site Design primary button titles
Thank you for your suggestions @twstokes 🙇 |
Generated by 🚫 dangerJS |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good during testing (both with Site Name on / off) and the way the "shape" of the code improved is quite nice! 🚀
Thank you @antonis & @twstokes for your collaborative efforts on this, and @Gio2018 for the valuable feedback 🙇.
I'm approving the PR, but as per the PR merge policy for our iOS repos, the author would normally merge it.
Apparently we're still in need of a follow-up to this internal comment: p5T066-37N-p2#comment-12066
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🙇 If I understand correctly about how the translation keys work, the interface should translate "Create Site" because that key has been translated before and the comment isn't part of the key.
primaryActionButton.setTitle(createsSite ? TextContent.createSiteButton : TextContent.chooseButton, for: .normal) | ||
} | ||
|
||
private enum TextContent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @antonis ! !
@antonis and @twstokes (writing a single comment in the main PR) this has been bundled as part of 19.7 beta 1 (19.7.0.1). Thanks for your work 🙌 |
Description
This PR adjusts the design picker
Choose
buttons to communicate to the user that their action will create the site.To test
Treatment variation
choose
button is changed tocreate site
choose
button is changed tocreate site
Control variation
Regression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.