Skip to content
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

Merge and 18.9.0.1 and 18.9.0.2 into develop #17695

Merged
merged 22 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b389011
Skip configuring cell when the app is backgrounded
dvdchr Dec 16, 2021
8b63f89
Refresh follow button after post is fetched
dvdchr Dec 16, 2021
146ce55
Merge pull request #17679 from wordpress-mobile/fix/missing-follow-bu…
dvdchr Dec 17, 2021
11c86b7
Merge pull request #17678 from wordpress-mobile/fix/comment-thread-re…
dvdchr Dec 17, 2021
40f6676
Remove call to extract-framework-translation while work on L10n tooli…
AliSoftware Dec 17, 2021
60fa845
Track comment editor opened.
ScoutHarris Dec 17, 2021
f446576
Merge pull request #17685 from wordpress-mobile/fix/edit_comment_trac…
ScoutHarris Dec 17, 2021
791c7be
Update translations
jkmassel Dec 17, 2021
8b6e1ac
Update metadata translations
jkmassel Dec 17, 2021
781efdd
Update Jetpack metadata translations
jkmassel Dec 17, 2021
61689e5
Bump version number
jkmassel Dec 17, 2021
ef12076
[Tooling] Disable widgets script on L10n download (#17682)
mokagio Dec 20, 2021
61b9cc3
Add: SIWA entitlements
leandroalonso Dec 13, 2021
87bfc21
Add: SIWA button for Jetpack
leandroalonso Dec 13, 2021
27b046f
Add: presentSignupEpilogue to authentication handler
leandroalonso Dec 14, 2021
62df99d
Add: check if the authentication handler is present and call presentS…
leandroalonso Dec 14, 2021
0be5ec0
refactor: display the no Jetpack screen using the windowManager
leandroalonso Dec 14, 2021
c4f010e
Add Sign-In With Apple to Jetpack (#17693)
mokagio Dec 21, 2021
1b1d012
Update `Pluginfile` to use a fix release-toolkit version
mokagio Dec 21, 2021
1b25b47
Update translations
mokagio Dec 21, 2021
efe1069
Bump version number
mokagio Dec 21, 2021
9842bcf
Merge `develop` into `merge/18.9.0.2-into-develop`
mokagio Dec 21, 2021
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
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.9.1)
git (1.10.0)
rchardet (~> 1.8)
google-apis-androidpublisher_v3 (0.14.0)
google-apis-core (>= 0.4, < 2.a)
Expand Down Expand Up @@ -347,4 +347,4 @@ DEPENDENCIES
xcpretty-travis-formatter

BUNDLED WITH
2.2.31
2.2.32
4 changes: 0 additions & 4 deletions Scripts/update-translations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,3 @@
# Clean up after ourselves
FileUtils.rm_f backup_destination
end

extract_framework_translations_script_path = File.join(script_root, 'extract-framework-translations.swift')

system extract_framework_translations_script_path if strings_filter.empty?
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ protocol AuthenticationHandler {

func presentLoginEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, windowManager: WindowManager, onDismiss: @escaping () -> Void) -> Bool

func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?)

// WPAuthenticator style overrides
var statusBarStyle: UIStatusBarStyle { get }
var prologueViewController: UIViewController? { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ private extension CommentDetailViewController {
self?.updateComment()
})

CommentAnalytics.trackCommentEditorOpened(comment: comment)
let navigationControllerToPresent = UINavigationController(rootViewController: editCommentTableViewController)
navigationControllerToPresent.modalPresentationStyle = .fullScreen
present(navigationControllerToPresent, animated: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extension WordPressAuthenticationManager {
private func authenticatorConfiguation() -> WordPressAuthenticatorConfiguration {
// SIWA can not be enabled for internal builds
// Ref https://github.com/wordpress-mobile/WordPress-iOS/pull/12332#issuecomment-521994963
let enableSignInWithApple = AppConfiguration.allowSignUp && !(BuildConfiguration.current ~= [.a8cBranchTest, .a8cPrereleaseTesting])
let enableSignInWithApple = !(BuildConfiguration.current ~= [.a8cBranchTest, .a8cPrereleaseTesting])

return WordPressAuthenticatorConfiguration(wpcomClientId: ApiCredentials.client,
wpcomSecret: ApiCredentials.secret,
Expand Down Expand Up @@ -387,6 +387,11 @@ extension WordPressAuthenticationManager: WordPressAuthenticatorDelegate {
/// Presents the Signup Epilogue, in the specified NavigationController.
///
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) {
if let authenticationHandler = authenticationHandler {
authenticationHandler.presentSignupEpilogue(in: navigationController, for: credentials, service: service)
return
}

let storyboard = UIStoryboard(name: "SignupEpilogue", bundle: .main)
guard let epilogueViewController = storyboard.instantiateInitialViewController() as? SignupEpilogueViewController else {
fatalError()
Expand Down
29 changes: 16 additions & 13 deletions WordPress/Classes/ViewRelated/Reader/ReaderCommentsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ - (BOOL)shouldDisplaySuggestionsTableView

- (void)refreshAndSync
{
[self refreshFollowButton];
[self refreshPostHeaderView];
[self refreshSubscriptionStatusIfNeeded];
[self refreshReplyTextView];
Expand Down Expand Up @@ -1245,6 +1246,20 @@ - (NSFetchRequest *)fetchRequest

- (void)configureCell:(UITableViewCell *)aCell atIndexPath:(NSIndexPath *)indexPath
{
// When backgrounding, the app takes a snapshot, which triggers a layout pass,
// which refreshes the cells, and for some reason triggers an assertion failure
// in NSMutableAttributedString(data:,options:,documentAttributes:) when
// the NSDocumentTypeDocumentAttribute option is NSHTMLTextDocumentType.
// *** Assertion failure in void _prepareForCAFlush(UIApplication *__strong)(),
// /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UIApplication.m:2377
// *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
// reason: 'unexpected start state'
// This seems like a framework bug, so to avoid it skip configuring cells
// while the app is backgrounded.
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
return;
}

Comment *comment = [self.tableViewHandler.resultsController objectAtIndexPath:indexPath];

if ([self newCommentThreadEnabled]) {
Expand Down Expand Up @@ -1306,19 +1321,7 @@ - (void)configureCell:(UITableViewCell *)aCell atIndexPath:(NSIndexPath *)indexP
};
}

// When backgrounding, the app takes a snapshot, which triggers a layout pass,
// which refreshes the cells, and for some reason triggers an assertion failure
// in NSMutableAttributedString(data:,options:,documentAttributes:) when
// the NSDocumentTypeDocumentAttribute option is NSHTMLTextDocumentType.
// *** Assertion failure in void _prepareForCAFlush(UIApplication *__strong)(),
// /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UIApplication.m:2377
// *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
// reason: 'unexpected start state'
// This seems like a framework bug, so to avoid it skip configuring cells
// while the app is backgrounded.
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
return;
}


NSAttributedString *attrStr = [self cacheContentForComment:comment];
[cell configureCellWithComment:comment attributedString:attrStr];
Expand Down
12 changes: 12 additions & 0 deletions WordPress/Jetpack/Classes/JetpackAuthenticationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ struct JetpackAuthenticationManager: AuthenticationHandler {
return true
}

// If the user signs up using the Jetpack app (through SIWA, for example)
// We show right away the screen explaining that they do not have Jetpack sites
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) {
let windowManager = WordPressAppDelegate.shared?.windowManager

windowManager?.dismissFullscreenSignIn()

let viewModel = JetpackNoSitesErrorViewModel()
let controller = errorViewController(with: viewModel)
windowManager?.show(controller, completion: nil)
}

// MARK: - Private: Helpers
private func isValidJetpack(for site: WordPressComSiteInfo) -> Bool {
return site.hasJetpack &&
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Jetpack/JetpackDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:wordpress.com</string>
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Jetpack/JetpackRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:wordpress.com</string>
Expand Down
Loading