Skip to content

Commit 8cedc50

Browse files
authored
Merge branch 'trunk' into feature/17629-enable_moderation_menu
2 parents ab414a2 + 37a715b commit 8cedc50

13 files changed

Lines changed: 321 additions & 134 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_jetpack_for_app_store
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_app_center skip_confirm:true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_app_store_connect skip_confirm:true create_gh_release:true

.buildkite/release-builds.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This pipeline is meant to be run via the Buildkite API, and is only used for release builds
2+
3+
# Nodes with values to reuse in the pipeline.
4+
common_params:
5+
# Common plugin settings to use with the `plugins` key.
6+
- &common_plugins
7+
- automattic/bash-cache#v1.5.0
8+
- automattic/git-s3-cache#v1.1.0:
9+
bucket: "a8c-repo-mirrors"
10+
repo: "wordpress-mobile/wordpress-ios/"
11+
# Common environment values to use with the `env` key.
12+
- &common_env
13+
IMAGE_ID: xcode-13
14+
15+
steps:
16+
17+
- label: "🛠 WordPress Release Build (App Store Connect)"
18+
command: ".buildkite/commands/release-build-wordpress.sh"
19+
env: *common_env
20+
plugins: *common_plugins
21+
notify:
22+
- slack: "#build-and-ship"
23+
24+
- label: "🛠 WordPress Release Build (App Center)"
25+
command: ".buildkite/commands/release-build-wordpress-internal.sh"
26+
env: *common_env
27+
plugins: *common_plugins
28+
notify:
29+
- slack: "#build-and-ship"
30+
31+
- label: "🛠 Jetpack Release Build (App Store Connect)"
32+
command: ".buildkite/commands/release-build-jetpack.sh"
33+
env: *common_env
34+
plugins: *common_plugins
35+
notify:
36+
- slack: "#build-and-ship"

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ abstract_target 'Apps' do
169169
## Gutenberg (React Native)
170170
## =====================
171171
##
172-
gutenberg :tag => 'v1.71.0-alpha2'
172+
gutenberg :tag => 'v1.71.0'
173173

174174
## Third party libraries
175175
## =====================

Podfile.lock

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

RELEASE-NOTES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
-----
33
* [*] Site creation: Fixed bug where sites created within the app were not given the correct time zone, leading to post scheduling issues. [#17821]
44
* [*] Block editor: Replacing the media for an image set as featured prompts to update the featured image [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3930]
5+
* [***] Block editor: Font size and line-height support for text-based blocks used in block-based themes [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4519]
56
* [**] Some of the screens of the app has a new, fresh and more modern visual, including the initial one: My Site. [#17812]
67
* [**] Notifications: added a button to mark all notifications in the selected filter as read. [#17840]
78
* [**] People: you can now manage Email Followers on the People section! [#17854]
89
* [*] Stats: fix navigation between Stats tab. [#17856]
910
* [*] Quick Start: Fixed a bug where a user logging in via a self-hosted site not connected to Jetpack would see Quick Start when selecting "No thanks" on the Quick Start prompt. [#17855]
1011
* [**] Threaded comments: comments can now be moderated via a drop-down menu on each comment. [#17888]
12+
* [*] Stats: Users can now add a new Insights card from the navigation bar. [#17867]
1113

1214
19.1
1315
-----

WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ class SiteStatsInsightsTableViewController: UITableViewController, StoryboardLoa
8383
viewModel?.refreshInsights()
8484
}
8585

86+
func showAddInsightView(source: String = "table_row") {
87+
WPAnalytics.track(.statsItemTappedInsightsAddStat, withProperties: ["source": source])
88+
89+
if displayingEmptyView {
90+
hideNoResults()
91+
addViewModelListeners()
92+
refreshInsights()
93+
}
94+
95+
if insightsToShow.contains(.customize) {
96+
// The view needs to be updated to remove the Customize card.
97+
// However, if it's done here, there is a weird animation before AddInsight is presented.
98+
// Instead, set 'viewNeedsUpdating' so the view is updated when 'addInsightDismissed' is called.
99+
viewNeedsUpdating = true
100+
dismissCustomizeCard()
101+
}
102+
103+
let controller = AddInsightTableViewController(insightsDelegate: self,
104+
insightsShown: insightsToShow.compactMap { $0.statSection })
105+
let navigationController = UINavigationController(rootViewController: controller)
106+
present(navigationController, animated: true, completion: nil)
107+
}
108+
86109
}
87110

88111
// MARK: - Private Extension
@@ -281,22 +304,6 @@ private extension SiteStatsInsightsTableViewController {
281304

282305
// MARK: - Insights Management
283306

284-
func showAddInsightView() {
285-
286-
if insightsToShow.contains(.customize) {
287-
// The view needs to be updated to remove the Customize card.
288-
// However, if it's done here, there is a weird animation before AddInsight is presented.
289-
// Instead, set 'viewNeedsUpdating' so the view is updated when 'addInsightDismissed' is called.
290-
viewNeedsUpdating = true
291-
dismissCustomizeCard()
292-
}
293-
294-
let controller = AddInsightTableViewController(insightsDelegate: self,
295-
insightsShown: insightsToShow.compactMap { $0.statSection })
296-
let navigationController = UINavigationController(rootViewController: controller)
297-
present(navigationController, animated: true, completion: nil)
298-
}
299-
300307
func moveInsightUp(_ insight: InsightType) {
301308
guard canMoveInsightUp(insight) else {
302309
return
@@ -633,15 +640,7 @@ extension SiteStatsInsightsTableViewController: ReaderDiscoverFlowDelegate {
633640

634641
extension SiteStatsInsightsTableViewController: NoResultsViewControllerDelegate {
635642
func actionButtonPressed() {
636-
guard !displayingEmptyView else {
637-
WPAnalytics.track(.statsItemTappedInsightsAddStat)
638-
showAddInsightView()
639-
return
640-
}
641-
642-
hideNoResults()
643-
addViewModelListeners()
644-
refreshInsights()
643+
showAddInsightView()
645644
}
646645
}
647646

WordPress/Classes/ViewRelated/Stats/Shared Views/StatsTotalRow.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ private extension StatsTotalRow {
376376
}
377377

378378
@IBAction func didTapDisclosureButton(_ sender: UIButton) {
379-
if let statSection = rowData?.statSection {
379+
if let statSection = rowData?.statSection,
380+
statSection != .insightsAddInsight {
380381
captureAnalyticsEventsFor(statSection)
381382
}
382383

WordPress/Classes/ViewRelated/Stats/SiteStatsDashboardViewController.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,36 @@ class SiteStatsDashboardViewController: UIViewController {
6969
private var periodTableViewController = SiteStatsPeriodTableViewController.loadFromStoryboard()
7070
private var pageViewController: UIPageViewController?
7171

72+
@objc lazy var manageInsightsButton: UIBarButtonItem = {
73+
let button = UIBarButtonItem(
74+
image: .gridicon(.cog),
75+
style: .plain,
76+
target: self,
77+
action: #selector(manageInsightsButtonTapped))
78+
button.accessibilityHint = NSLocalizedString("Tap to customize insights", comment: "Accessibility hint to customize insights")
79+
return button
80+
}()
81+
7282
// MARK: - View
7383

7484
override func viewDidLoad() {
7585
super.viewDidLoad()
86+
configureNavBar()
7687
setupFilterBar()
7788
restoreSelectedDateFromUserDefaults()
7889
restoreSelectedPeriodFromUserDefaults()
7990
addWillEnterForegroundObserver()
8091
view.accessibilityIdentifier = "stats-dashboard"
8192
}
8293

94+
func configureNavBar() {
95+
parent?.navigationItem.rightBarButtonItem = currentSelectedPeriod == .insights ? manageInsightsButton : nil
96+
}
97+
98+
@objc func manageInsightsButtonTapped() {
99+
insightsTableViewController.showAddInsightView(source: "nav_bar")
100+
}
101+
83102
override func viewWillDisappear(_ animated: Bool) {
84103
super.viewWillDisappear(animated)
85104
removeWillEnterForegroundObserver()
@@ -145,6 +164,8 @@ private extension SiteStatsDashboardViewController {
145164

146165
@objc func selectedFilterDidChange(_ filterBar: FilterTabBar) {
147166
currentSelectedPeriod = StatsPeriodType(rawValue: filterBar.selectedIndex) ?? StatsPeriodType.insights
167+
168+
configureNavBar()
148169
}
149170

150171
}

0 commit comments

Comments
 (0)