Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
06f4e54
WIP
diegoreymendez Nov 24, 2020
fe1093d
Merges the latest from the feature branch.
diegoreymendez Nov 24, 2020
99b9cbe
rake lint:autocorrect
diegoreymendez Nov 24, 2020
71e519d
Fixes a build issue.
diegoreymendez Nov 24, 2020
5d8b9f3
Added provisioning profiles and code to show sites in the Home widget…
diegoreymendez Nov 24, 2020
f469151
Added several configuration schemes.
diegoreymendez Nov 24, 2020
c31e463
Set up Intents Signing
jkmassel Nov 25, 2020
1b524e6
Adding images to the site selection in the home widget.
diegoreymendez Nov 25, 2020
f2f6217
Removes some unnecessary comments.
diegoreymendez Nov 25, 2020
425c789
Adds some improvements.
diegoreymendez Nov 26, 2020
b02efc8
Some formatting cleanup.
diegoreymendez Nov 26, 2020
d855636
Shows the selected site in the widget.
diegoreymendez Nov 26, 2020
68ab868
rake lint:autocorrect
diegoreymendez Nov 26, 2020
829b282
Merges the latest from the feature branch.
diegoreymendez Nov 30, 2020
8819f6d
Fixes all current merge conflicts.
diegoreymendez Nov 30, 2020
898a4d5
Rolls back some unnecessary changes.
diegoreymendez Nov 30, 2020
285fdb3
Merges the latest from the feature branch.
diegoreymendez Nov 30, 2020
03bfa14
Rolls back the undesired changes to Info.plist.
diegoreymendez Nov 30, 2020
218448e
Removed some no-longer-necessary comments.
diegoreymendez Nov 30, 2020
91cf971
Updates a comment. Changed the name of a file that was unclear.
diegoreymendez Nov 30, 2020
3d80962
Removed the WordPressIntentsUI target, since it wasn't being used.
diegoreymendez Nov 30, 2020
aced350
Unshared several schemes that were shared for no-known reasons.
diegoreymendez Nov 30, 2020
42e6e37
Updates the fastlane FastFile to remove a target that doesn't exist a…
diegoreymendez Nov 30, 2020
b385948
Moves the default site logic to the intents extension.
diegoreymendez Nov 30, 2020
7c097e2
Handles the default site through the intents extension.
diegoreymendez Nov 30, 2020
20bdefe
Manually merges some changes to WordPressHomeWidgetToday that had bee…
diegoreymendez Dec 1, 2020
0ad58a9
Removes an unnecessary todo.
diegoreymendez Dec 1, 2020
4276aa7
Removed images from the widget site picker. Added domain as subtitle.
diegoreymendez Dec 1, 2020
8266991
Fixes the indentation of some lines of code.
diegoreymendez Dec 1, 2020
a5b2a22
Removes some commented out code.
diegoreymendez Dec 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,18 @@ target 'WordPressHomeWidgetToday' do
wordpress_ui
end

## Intents
## ============
##
target 'WordPressIntents' do
project 'WordPress/WordPress.xcodeproj'

shared_with_all_pods
shared_with_networking_pods

wordpress_ui
end

## Notification Content Extension
## ==============================
##
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: dcb2596ad05a63d662e8c7924357babbf327b421
ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0

PODFILE CHECKSUM: 03c491ba942789df594bf1665b620af42dff70f2
PODFILE CHECKSUM: 0539a820471fc9b86c986aafbd49928f8bca86a5

COCOAPODS: 1.9.3
3 changes: 2 additions & 1 deletion Scripts/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ALL_BUNDLE_IDENTIFIERS = [
"org.wordpress.WordPressNotificationServiceExtension",
"org.wordpress.WordPressNotificationContentExtension",
"org.wordpress.WordPressAllTimeWidget",
"org.wordpress.WordPressThisWeekWidget"
"org.wordpress.WordPressThisWeekWidget",
"org.wordpress.WordPressIntents",
]

# Use this instead of getting values from ENV directly
Expand Down
22 changes: 12 additions & 10 deletions WordPress/Classes/Stores/StatsInsightsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1013,11 +1013,12 @@ private extension InsightStoreState {
}
// refresh stats and update any blog info, if they had changed
homeWidgetTodayCache[siteID.intValue] = HomeWidgetTodayData(siteID: siteID.intValue,
siteName: blog.title ?? oldData.siteName,
url: blog.url ?? oldData.url,
timeZone: blogService.timeZone(for: blog),
date: Date(),
stats: stats)
siteName: blog.title ?? oldData.siteName,
iconURL: blog.icon ?? oldData.iconURL,
url: blog.url ?? oldData.url,
timeZone: blogService.timeZone(for: blog),
date: Date(),
stats: stats)

HomeWidgetTodayData.write(items: homeWidgetTodayCache)
WidgetCenter.shared.reloadTimelines(ofKind: WPHomeWidgetTodayKind)
Expand All @@ -1037,11 +1038,12 @@ private extension InsightStoreState {
let timeZone = blogService.timeZone(for: blog)

result[blogID.intValue] = HomeWidgetTodayData(siteID: blogID.intValue,
siteName: title,
url: url,
timeZone: timeZone,
date: Date(),
stats: TodayWidgetStats())
siteName: title,
iconURL: blog.icon,
url: url,
timeZone: timeZone,
date: Date(),
stats: TodayWidgetStats())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Utility/SFHFKeychainUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,4 @@ + (BOOL)deleteItemForUsername:(NSString *)username
}


@end
@end
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import CocoaLumberjack
import Foundation

/// This struct contains data for the Insights Today stats to be displayed in the corresponding widget.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Foundation

/// Cache manager that stores `HomeWidgetData` values in a plist file, contained in the specified security application group and with the specified file name.
/// The corresponding dictionary is always in the form `[Int: T]`, where the `Int` key is the SiteID, and the `T` value is any `HomeWidgetData` instance.
struct HomeWidgetCache<T: HomeWidgetData> {
Expand Down
385 changes: 378 additions & 7 deletions WordPress/WordPress.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>

@diegoreymendez diegoreymendez Nov 30, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Folks, I'm not sure if this scheme should be shared or not. IMHO there's no reason why schemes shouldn't be shared but if either of you knows better, can you let me know?

PS: Regardless of my doubt, I still haven't shared the others on purpose. Not sure what happened there!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure either, although it appears we don't currently share any schemes (although it's also not in our gitignore)... @jkmassel any ideas?

<Scheme
LastUpgradeVersion = "1220"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F1F163BD25658B4D003DC13B"
BuildableName = "WordPressIntents.appex"
BlueprintName = "WordPressIntents"
ReferencedContainer = "container:WordPress.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "WordPress.app"
BlueprintName = "WordPress"
ReferencedContainer = "container:WordPress.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "WordPress.app"
BlueprintName = "WordPress"
ReferencedContainer = "container:WordPress.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "WordPress.app"
BlueprintName = "WordPress"
ReferencedContainer = "container:WordPress.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ struct HomeWidgetTodayData: HomeWidgetData {

let siteID: Int
let siteName: String
let iconURL: String?
let url: String
let timeZone: TimeZone
let date: Date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class HomeWidgetTodayRemoteService {

let newWidgetData = HomeWidgetTodayData(siteID: widgetData.siteID,
siteName: widgetData.siteName,
iconURL: widgetData.iconURL,
url: widgetData.url,
timeZone: widgetData.timeZone,
date: Date(),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ extension TodayWidgetView {
static let visitorsTitle: LocalizedStringKey = "Visitors"
static let likesTitle: LocalizedStringKey = "Likes"
static let commentsTitle: LocalizedStringKey = "Comments"

}
}

struct TodayWidgetView_Previews: PreviewProvider {
// TODO - TODAYWIDGET: this has been added here for preview purposes only.
static let staticContent = HomeWidgetTodayData(siteID: 0,
siteName: "Places you should visit",
iconURL: nil,
url: "",
timeZone: TimeZone.current,
date: Date(),
Expand Down
Loading