Skip to content

Commit 3cb1edf

Browse files
authored
Merge branch 'trunk' into issue/18484-site-title-updates-mt-site
2 parents ff6a64d + 361b4dc commit 3cb1edf

12 files changed

+108
-21
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ abstract_target 'Apps' do
210210

211211
pod 'NSURL+IDN', '~> 0.4'
212212

213-
pod 'WPMediaPicker', '~> 1.8.3'
213+
pod 'WPMediaPicker', '~> 1.8.4-beta.1'
214214
# pod 'WPMediaPicker', :git => 'https://github.com/wordpress-mobile/MediaPicker-iOS.git', :tag => '1.7.0'
215215
## while PR is in review:
216216
# pod 'WPMediaPicker', :git => 'https://github.com/wordpress-mobile/MediaPicker-iOS.git', :branch => ''

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ PODS:
499499
- CocoaLumberjack (~> 3.4)
500500
- FormatterKit/TimeIntervalFormatter (~> 1.8)
501501
- WordPressUI (1.12.5)
502-
- WPMediaPicker (1.8.3)
502+
- WPMediaPicker (1.8.4-beta.1)
503503
- wpxmlrpc (0.9.0)
504504
- Yoga (1.14.0)
505505
- ZendeskCommonUISDK (6.1.2)
@@ -595,7 +595,7 @@ DEPENDENCIES:
595595
- WordPressMocks (~> 0.0.15)
596596
- WordPressShared (~> 1.17.1)
597597
- WordPressUI (~> 1.12.5)
598-
- WPMediaPicker (~> 1.8.3)
598+
- WPMediaPicker (~> 1.8.4-beta.1)
599599
- Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.75.0/third-party-podspecs/Yoga.podspec.json`)
600600
- ZendeskSupportSDK (= 5.3.0)
601601
- ZIPFoundation (~> 0.9.8)
@@ -857,7 +857,7 @@ SPEC CHECKSUMS:
857857
WordPressMocks: 6b52b0764d9939408151367dd9c6e8a910877f4d
858858
WordPressShared: 0c4bc5e25765732fcf5d07f28c81970ab28493fb
859859
WordPressUI: c5be816f6c7b3392224ac21de9e521e89fa108ac
860-
WPMediaPicker: 0f4f20c7f661b46d33283f1ac2adceb98718fffa
860+
WPMediaPicker: 547b19abb9361a0a70ac7df4399502b3d59f1f3b
861861
wpxmlrpc: bf55a43a7e710bd2a4fb8c02dfe83b1246f14f13
862862
Yoga: 2ca978c40e0fd6d7f54bcb1602bc0cbbc79454a7
863863
ZendeskCommonUISDK: 5f0a83f412e07ae23701f18c412fe783b3249ef5
@@ -869,6 +869,6 @@ SPEC CHECKSUMS:
869869
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
870870
ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37
871871

872-
PODFILE CHECKSUM: a9583cec2bc246d23cf0045230cd179dc03c5adb
872+
PODFILE CHECKSUM: f6bd23447af8d4f331d87b63590f4bf520730633
873873

874874
COCOAPODS: 1.11.2

RELEASE-NOTES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
19.9
22
-----
3-
[*] Site Settings: we fixed an issue that prevented the site title to be updated when it changed in Site Settings [#18543]
3+
* [*] Site Settings: we fixed an issue that prevented the site title to be updated when it changed in Site Settings [#18543]
4+
* [*] Media Picker: Fixed an issue where the empty state view was being displayed incorrectly. [#18471]
45

56
19.8
67
-----

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ final class BlogDashboardViewController: UIViewController {
164164
switch element {
165165
case .setupQuickStart, .removeQuickStart:
166166
self.loadCardsFromCache()
167-
case .stats:
167+
case .stats, .mediaScreen:
168168
if self.embeddedInScrollView {
169169
self.mySiteScrollView?.scrollToTop(animated: true)
170170
} else {

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Quick Actions/DashboardQuickActionsCardCell.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,23 @@ extension DashboardQuickActionsCardCell {
138138
let element = info[QuickStartTourGuide.notificationElementKey] as? QuickStartTourElement {
139139

140140
switch element {
141-
case .noSuchElement:
142-
self?.statsButton.shouldShowSpotlight = false
143141
case .stats:
144142
guard QuickStartTourGuide.shared.entryPointForCurrentTour == .blogDashboard else {
145143
return
146144
}
147145

148-
self?.statsButton.shouldShowSpotlight = true
149146
self?.autoScrollToStatsButton()
147+
case .mediaScreen:
148+
guard QuickStartTourGuide.shared.entryPointForCurrentTour == .blogDashboard else {
149+
return
150+
}
151+
152+
self?.autoScrollToMediaButton()
150153
default:
151154
break
152155
}
156+
self?.statsButton.shouldShowSpotlight = element == .stats
157+
self?.mediaButton.shouldShowSpotlight = element == .mediaScreen
153158
}
154159
}
155160
}
@@ -161,6 +166,10 @@ extension DashboardQuickActionsCardCell {
161166
private func autoScrollToStatsButton() {
162167
scrollView.scrollHorizontallyToView(statsButton, animated: true)
163168
}
169+
170+
private func autoScrollToMediaButton() {
171+
scrollView.scrollHorizontallyToView(mediaButton, animated: true)
172+
}
164173
}
165174

166175
extension DashboardQuickActionsCardCell {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension BlogDetailsViewController {
1515

1616
if let info = notification.userInfo?[QuickStartTourGuide.notificationElementKey] as? QuickStartTourElement {
1717
switch info {
18-
case .stats:
18+
case .stats, .mediaScreen:
1919
guard QuickStartTourGuide.shared.entryPointForCurrentTour == .blogDetails else {
2020
return
2121
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ typedef NS_ENUM(NSInteger, QuickStartTourElement) {
7373
QuickStartTourElementNotifications = 22,
7474
QuickStartTourElementSetupQuickStart = 23,
7575
QuickStartTourElementRemoveQuickStart = 24,
76+
QuickStartTourElementMediaScreen = 25,
77+
QuickStartTourElementMediaUpload = 26,
7678
};
7779

7880
typedef NS_ENUM(NSUInteger, BlogDetailsNavigationSource) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ - (BlogDetailsSection *)publishTypeSectionViewModel
900900
callback:^{
901901
[weakSelf showMediaLibraryFromSource:BlogDetailsNavigationSourceRow];
902902
}];
903+
mediaRow.quickStartIdentifier = QuickStartTourElementMediaScreen;
903904
[rows addObject:mediaRow];
904905

905906
BlogDetailsRow *pagesRow = [[BlogDetailsRow alloc] initWithTitle:NSLocalizedString(@"Pages", @"Noun. Title. Links to the blog's Pages screen.")
@@ -1437,7 +1438,7 @@ - (void)showMediaLibraryFromSource:(BlogDetailsNavigationSource)source
14371438
controller.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
14381439
[self showDetailViewController:controller sender:self];
14391440

1440-
[[QuickStartTourGuide shared] visited:QuickStartTourElementBlogDetailNavigation];
1441+
[[QuickStartTourGuide shared] visited:QuickStartTourElementMediaScreen];
14411442
}
14421443

14431444
- (void)showPeople

WordPress/Classes/ViewRelated/Blog/QuickStartTours.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,32 @@ struct QuickStartNotificationsTour: QuickStartTour {
371371
let accessibilityHintText = NSLocalizedString("Guides you through the process of checking your notifications.", comment: "This value is used to set the accessibility hint text for viewing the user's notifications.")
372372
}
373373

374+
struct QuickStartMediaUploadTour: QuickStartTour {
375+
let key = "quick-start-media-upload-tour"
376+
let analyticsKey = "media"
377+
let title = NSLocalizedString("Upload photos or videos", comment: "Title of a Quick Start Tour")
378+
let titleMarkedCompleted = NSLocalizedString("Completed: Upload photos or videos", comment: "The Quick Start Tour title after the user finished the step.")
379+
let description = NSLocalizedString("Bring media straight from your device or camera to your site.", comment: "Description of a Quick Start Tour")
380+
let icon = UIImage.gridicon(.addImage)
381+
let suggestionNoText = Strings.notNow
382+
let suggestionYesText = Strings.yesShowMe
383+
let possibleEntryPoints: Set<QuickStartTourEntryPoint> = [.blogDetails, .blogDashboard]
384+
385+
var waypoints: [WayPoint] = {
386+
let step1DescriptionBase = NSLocalizedString("Select %@ to see your current library.", comment: "A step in a guided tour for quick start. %@ will be the name of the item to select.")
387+
let step1DescriptionTarget = NSLocalizedString("Media", comment: "The menu item to select during a guided tour.")
388+
let step1: WayPoint = (element: .mediaScreen, description: step1DescriptionBase.highlighting(phrase: step1DescriptionTarget, icon: .gridicon(.image)))
389+
390+
let step2DescriptionBase = NSLocalizedString("Select %@to upload media. You can add it to your posts / pages from any device.", comment: "A step in a guided tour for quick start. %@ will be a plus icon.")
391+
let step2DescriptionTarget = ""
392+
let step2: WayPoint = (element: .mediaUpload, description: step2DescriptionBase.highlighting(phrase: step2DescriptionTarget, icon: .gridicon(.plus)))
393+
394+
return [step1, step2]
395+
}()
396+
397+
let accessibilityHintText = NSLocalizedString("Guides you through the process of uploading new media.", comment: "This value is used to set the accessibility hint text for viewing the user's notifications.")
398+
}
399+
374400
private extension String {
375401
func highlighting(phrase: String, icon: UIImage?) -> NSAttributedString {
376402
let normalParts = components(separatedBy: "%@")

WordPress/Classes/ViewRelated/Blog/QuickStartToursCollection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ struct QuickStartGetToKnowAppCollection: QuickStartToursCollection {
7777
QuickStartCheckStatsTour(),
7878
QuickStartNotificationsTour(),
7979
QuickStartViewTour(blog: blog),
80+
QuickStartMediaUploadTour(),
8081
QuickStartFollowTour()
8182
]
8283
}

0 commit comments

Comments
 (0)