-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
T374012 #5204
base: temp-accounts
Are you sure you want to change the base?
T374012 #5204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just a few things.
@@ -0,0 +1,15 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you aren't using these new icon assets anymore. Can you delete them?
|
||
private lazy var temporaryAccountNoticesButton: UIBarButtonItem = { | ||
let button = UIBarButtonItem(image: WMFIcon.temp, style: .plain, target: self, action: #selector(temporaryAccount(_ :))) | ||
button.accessibilityLabel = CommonStrings.editNotices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility label looks wrong here.
}() | ||
|
||
private lazy var ipAccountNoticesButton: UIBarButtonItem = { | ||
let button = UIBarButtonItem(image: WMFSFSymbolIcon.for(symbol: .temporaryAccountIcon), style: .plain, target: self, action: #selector(ipAccount(_ :))) | ||
button.accessibilityLabel = CommonStrings.editNotices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility label looks wrong here.
import WMFData | ||
import CocoaLumberjackSwift | ||
|
||
@objc(TempAccountSheetCoordinator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this @objc line and the NSObject superclass if you do not need to call this class from Objective-C.
return String.localizedStringWithFormat(format, tempUsername, openingBold, closingBold, openingLink, closingLink, lineBreaks, openingLinkLearnMore) | ||
} | ||
|
||
private func presentIPEditorSheet(_ presentEditorAction: @escaping () -> Void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this presentEditorAction
parameter is called, you can remove it.
return "https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Temporary_accounts?uselang=\(languageCodeSuffix)#Who_can_see_IP_address_data_associated_with_temporary_accounts?" | ||
} | ||
|
||
private func presentTempEditorSheet(_ presentEditorAction: @escaping () -> Void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this presentEditorAction
parameter is called, you can remove it.
}, | ||
guard let navigationController else { return } | ||
|
||
let tempAccountsCoordinator = TempAccountSheetCoordinator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that when logged into a permanent account, the "You are not logged in" modal still appears here. So I think you do still need the check for authStateIsPermanent
here before kicking off the coordinator:
if !authManager.authStateIsPermanent {
let tempAccountsCoordinator = TempAccountSheetCoordinator(
navigationController: navigationController,
theme: theme,
dataStore: dataStore,
didTapDone: { [weak self] in
self?.dismiss(animated: true)
presentEditorAction()
},
isTempAccount: authManager.authStateIsTemporary
)
tempAccountsCoordinator.start()
} else {
presentEditorAction()
}
Phabricator:
https://phabricator.wikimedia.org/T374012
Notes
Test Steps
Screenshots/Videos
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-19.at.16.08.26.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-19.at.15.59.21.mp4