Skip to content

Commit fb85ca7

Browse files
Merge branch 'trunk' into feature/dashboard-arch-refactor/base
2 parents 3d7382c + c1605ee commit fb85ca7

38 files changed

Lines changed: 271 additions & 113 deletions

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def wordpress_ui
4747
end
4848

4949
def wordpress_kit
50-
pod 'WordPressKit', '~> 4.50.0-beta'
50+
pod 'WordPressKit', '~> 4.50.0'
5151
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => ''
5252
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => 'task/18324-site-creation-with-site-name'
5353
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''

Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ PODS:
487487
- WordPressKit (~> 4.18-beta)
488488
- WordPressShared (~> 1.12-beta)
489489
- WordPressUI (~> 1.7-beta)
490-
- WordPressKit (4.50.0-beta.2):
490+
- WordPressKit (4.50.0):
491491
- Alamofire (~> 4.8.0)
492492
- CocoaLumberjack (~> 3.4)
493493
- NSObject-SafeExpectations (= 0.0.4)
@@ -591,7 +591,7 @@ DEPENDENCIES:
591591
- SVProgressHUD (= 2.2.5)
592592
- WordPress-Editor-iOS (~> 1.19.8)
593593
- WordPressAuthenticator (~> 2.0.0)
594-
- WordPressKit (~> 4.50.0-beta)
594+
- WordPressKit (~> 4.50.0)
595595
- WordPressMocks (~> 0.0.15)
596596
- WordPressShared (~> 1.17.1)
597597
- WordPressUI (~> 1.12.5)
@@ -603,7 +603,6 @@ DEPENDENCIES:
603603
SPEC REPOS:
604604
https://github.com/wordpress-mobile/cocoapods-specs.git:
605605
- WordPressAuthenticator
606-
- WordPressKit
607606
trunk:
608607
- Alamofire
609608
- AlamofireImage
@@ -641,6 +640,7 @@ SPEC REPOS:
641640
- UIDeviceIdentifier
642641
- WordPress-Aztec-iOS
643642
- WordPress-Editor-iOS
643+
- WordPressKit
644644
- WordPressMocks
645645
- WordPressShared
646646
- WordPressUI
@@ -853,7 +853,7 @@ SPEC CHECKSUMS:
853853
WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504
854854
WordPress-Editor-iOS: 9eb9f12f21a5209cb837908d81ffe1e31cb27345
855855
WordPressAuthenticator: 5163f732e4e529781f931f158f54b1a1545bc536
856-
WordPressKit: ef5f26d7005b6e24c6c827aea96e8cd0b6365aba
856+
WordPressKit: b5d9b13e7e627134c583d7c6736efa720b306615
857857
WordPressMocks: 6b52b0764d9939408151367dd9c6e8a910877f4d
858858
WordPressShared: 0c4bc5e25765732fcf5d07f28c81970ab28493fb
859859
WordPressUI: c5be816f6c7b3392224ac21de9e521e89fa108ac
@@ -869,6 +869,6 @@ SPEC CHECKSUMS:
869869
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
870870
ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37
871871

872-
PODFILE CHECKSUM: 2f878ca897cb51df24b54e1372ab09d349df080f
872+
PODFILE CHECKSUM: 4ec8f8e1fe1324b2079ae08999bcc274e8232655
873873

874874
COCOAPODS: 1.11.2

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-----
33
* [*] [internal] My Site Dashboard: Made some changes to the code architecture of the dashboard. The majority of the changes are related to the posts cards. It should have no visible changes but could cause regressions. [#18405]
44

5+
56
19.7
67
-----
78
* [*] a11y: VoiceOver has been improved on the Menus view and now announces changes to ordering. [#18155]

WordPress/Classes/Utility/AB Testing/ABTest.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import AutomatticTracks
22

3+
// Attention: AB test is available only for WPiOS
4+
// Jetpack is not supported
35
enum ABTest: String, CaseIterable {
46
case unknown = "unknown"
57
case siteNameV1 = "wpios_site_name_v1"
@@ -14,7 +16,8 @@ extension ABTest {
1416
/// Start the AB Testing platform if any experiment exists
1517
///
1618
static func start() {
17-
guard ABTest.allCases.count > 1, AccountHelper.isLoggedIn else {
19+
guard ABTest.allCases.count > 1, AccountHelper.isLoggedIn,
20+
AppConfiguration.isWordPress else {
1821
return
1922
}
2023

WordPress/Classes/Utility/App Configuration/AppConfiguration.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Foundation
55
*/
66
@objc class AppConfiguration: NSObject {
77
@objc static let isJetpack: Bool = false
8+
@objc static let isWordPress: Bool = true
89
@objc static let showJetpackSitesOnly: Bool = false
910
@objc static let allowsNewPostShortcut: Bool = true
1011
@objc static let allowsConnectSite: Bool = true

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Quick Start/QuickStartTourStateView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class QuickStartTourStateView: UIView {
3838
func configure(blog: Blog, sourceController: UIViewController, checklistTappedTracker: QuickStartChecklistTappedTracker? = nil) {
3939

4040
customizeChecklistView.configure(
41-
tours: QuickStartTourGuide.customizeListTours,
41+
tours: QuickStartTourGuide.customizeListTours(for: blog),
4242
blog: blog,
4343
title: Strings.customizeTitle,
4444
hint: Strings.customizeHint

WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController+FancyAlerts.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@ extension BlogDetailsViewController {
1919
switch info {
2020
case .pages, .editHomepage, .sharing, .stats:
2121
self?.scroll(to: info)
22-
case .viewSite:
23-
self?.scroll(to: info)
24-
25-
guard let self = self,
26-
let navigationController = self.navigationController,
27-
navigationController.visibleViewController != self else {
28-
return
29-
}
30-
31-
self.dismiss(animated: true) {
32-
self.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
33-
self.shouldScrollToViewSite = true
34-
35-
navigationController.popToRootViewController(animated: true)
36-
}
3722
default:
3823
break
3924
}

WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,6 @@ - (void)viewDidAppear:(BOOL)animated
406406
[self cancelCompletedToursIfNeeded];
407407
[self createUserActivity];
408408
[self startAlertTimer];
409-
410-
if (self.shouldScrollToViewSite == YES) {
411-
[self scrollToElement:QuickStartTourElementViewSite];
412-
self.shouldScrollToViewSite = NO;
413-
}
414409

415410
QuickStartTourGuide *tourGuide = [QuickStartTourGuide shared];
416411

@@ -1026,7 +1021,6 @@ - (BlogDetailsSection *)externalSectionViewModel
10261021
callback:^{
10271022
[weakSelf showViewSiteFromSource:BlogDetailsNavigationSourceRow];
10281023
}];
1029-
viewSiteRow.quickStartIdentifier = QuickStartTourElementViewSite;
10301024
viewSiteRow.showsSelectionState = NO;
10311025
[rows addObject:viewSiteRow];
10321026

@@ -1624,17 +1618,19 @@ - (void)showViewSiteFromSource:(BlogDetailsNavigationSource)source
16241618
animated:YES
16251619
completion:nil];
16261620

1621+
MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController;
1622+
16271623
QuickStartTourGuide *guide = [QuickStartTourGuide shared];
16281624

16291625
if ([guide isCurrentElement:QuickStartTourElementViewSite]) {
16301626
[[QuickStartTourGuide shared] visited:QuickStartTourElementViewSite];
1627+
[parentVC toggleSpotlightOnSitePicker];
16311628
} else {
16321629
// Just mark as completed if we've viewed the site and aren't
16331630
// currently working on the View Site tour.
16341631
[[QuickStartTourGuide shared] completeViewSiteTourForBlog:self.blog];
16351632
}
16361633

1637-
MySiteViewController *parentVC = (MySiteViewController *)self.parentViewController;
16381634
parentVC.additionalSafeAreaInsets = UIEdgeInsetsZero;
16391635
}
16401636

WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/BlogDetailHeaderView.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class BlogDetailHeaderView: UIView {
3838
didSet {
3939
refreshIconImage()
4040
toggleSpotlightOnSiteTitle()
41+
toggleSpotlightOnSiteUrl()
4142
refreshSiteTitle()
4243

4344
if let displayURL = blog?.displayURL as String? {
@@ -73,11 +74,15 @@ class BlogDetailHeaderView: UIView {
7374
titleView.titleButton.setTitle(title, for: .normal)
7475
}
7576

76-
@objc func toggleSpotlightOnSiteTitle() {
77+
func toggleSpotlightOnSiteTitle() {
7778
titleView.titleButton.shouldShowSpotlight = QuickStartTourGuide.shared.isCurrentElement(.siteTitle)
7879
}
7980

80-
@objc func toggleSpotlightOnSiteIcon() {
81+
func toggleSpotlightOnSiteUrl() {
82+
titleView.subtitleButton.shouldShowSpotlight = QuickStartTourGuide.shared.isCurrentElement(.viewSite)
83+
}
84+
85+
func toggleSpotlightOnSiteIcon() {
8186
titleView.siteIconView.spotlightIsShown = QuickStartTourGuide.shared.isCurrentElement(.siteIcon)
8287
}
8388

@@ -240,8 +245,8 @@ fileprivate extension BlogDetailHeaderView {
240245
return siteIconView
241246
}()
242247

243-
let subtitleButton: UIButton = {
244-
let button = UIButton()
248+
let subtitleButton: SpotlightableButton = {
249+
let button = SpotlightableButton(type: .custom)
245250

246251
button.titleLabel?.font = WPStyleGuide.fontForTextStyle(.footnote)
247252
button.titleLabel?.adjustsFontForContentSizeCategory = true

WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController+QuickStart.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extension MySiteViewController {
1111
switch element {
1212
case .noSuchElement:
1313
self?.additionalSafeAreaInsets = .zero
14-
case .siteIcon, .siteTitle:
14+
case .siteIcon, .siteTitle, .viewSite:
1515
self?.scrollView.scrollToTop(animated: true)
1616

1717
self?.additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: Constants.bottomPaddingForQuickStartNotices, right: 0)

0 commit comments

Comments
 (0)