-
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
Add Jetpack badge to Activity log detail #19007
Add Jetpack badge to Activity log detail #19007
Conversation
… powered button, used both as a badge and as a banner
…cludes the Jetpack powered badge (iPhone only)
…om the split screen master view
You can test the changes in WordPress from this Pull Request by:
|
You can test the changes in Jetpack from this Pull Request by:
|
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.
👋 @Gio2018! This looks good to me and passed the manual tests you provided. I've added some comments below.
- ✅ "Jetpack powered" badge appears at the bottom of My Site -> Menu on iPhone 13 (WPiOS)
- ✅ "Jetpack powered" badge does not appear at the bottom of My Site -> Menu when using a larger phone and rotated to landscape (iPhone 13 Pro Max) or an iPad (WPiOS)
- ✅ "Jetpack powered" badge appears in the activity detail screen
- ✅ "Jetpack powered" badge does not appear at the bottom of My Site -> Menu or under an activity for any device running Jetpack app
- ✅ Badge looks good in dark / light mode
⚠️ Padding around the text is lost for larger font sizes. Text will show ellipses for very large fonts.
Padding lost | Ellipses |
---|---|
⚠️ Badge appears on self-hosted sites that doesn't have Jetpack installed
⚠️ Badge's top margin isn't slightly different between the My Site menu and activity detail view
My Site | Activity Detail |
---|---|
⚠️ Tapping the badge on the My Site menu shows the outline but does nothing
WordPress/Classes/ViewRelated/Activity/ActivityDetailViewController.swift
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Jetpack/Branding/Common/JetpackButton.swift
Outdated
Show resolved
Hide resolved
…nt size for accessibility categories
…geView.isHidden = false in storyboard
…rve both the badge and the banner when scaling
…ge on My Site for self hosted sites
…ed badge to align it with My Site
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.
Make sure the "Jetpack powered" badge appears at the bottom of the list (see screenshot above)
Hi @Gio2018, I think the "Home" tab within "My Site" is Jetpack-powered. The "Menu" tab is not related to Jetpack AFAIK. For example, logging into a self-hosted shows the "Menu" tab only.
I haven't done a complete review, do you want me to review this fully, or is one review (@twstokes's review) what you're looking for?
Thank you @guarani ! Looking at the Figma designs, the badge also appears in Menu under View Site. I have also just added code to exclude that badge from self hosted sites. Does it make sense? |
* Update BlogDetailsViewController * Remove JetpackBadgeCell
WordPress/Classes/ViewRelated/Jetpack/Branding/Common/JetpackButton.swift
Show resolved
Hide resolved
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setup() | ||
|
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.
Micro, optional nit: Extra spacing.
titleLabel?.adjustsFontSizeToFitWidth = true | ||
setImage(.gridicon(.plans), for: .normal) | ||
contentVerticalAlignment = .fill | ||
contentHorizontalAlignment = .center |
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.
It looks like this may be a default?
} | ||
|
||
func setup() { | ||
|
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.
Micro, optional nit: Extra spacing.
@@ -36,6 +36,9 @@ class ActivityDetailViewController: UIViewController, StoryboardLoadable { | |||
} | |||
} | |||
|
|||
@IBOutlet weak var jetpackBadgeView: UIView! | |||
|
|||
|
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.
Micro, optional nite: Not sure if this extra space was intentional.
👋 @Gio2018, I noticed for very large accessibility sizes the badge will exceed the bounds of the screen. Possibly we could add constraints to prevent this? |
…-iOS into feature/jetpack-badge-my-site-menu-activity-log
Fixes #NA
This PR adds the "Jetpack powered" badge to activity log detail.
It also optimizes code between
JetpackButton
andJetpackBannerView
To test:
on any iPhone or iPad
WordPress app
Jetpack app
Regression Notes
Potential unintended areas of impact
Low impacts on activity detail UI
What I did to test those areas of impact (or what existing automated tests I relied on)
Test on a variety of devices
What automated tests I added (or what prevented me from doing so)
none
PR submission checklist:
I have considered if this change warrants user-facing release notes and have added them toNot releasedRELEASE-NOTES.txt
if necessary.