Skip to content

Commit

Permalink
Merge branch 'trunk' into remove/leftover-internal-build-code
Browse files Browse the repository at this point in the history
  • Loading branch information
spencertransier authored Nov 20, 2024
2 parents 8287403 + ea3a267 commit 03350be
Show file tree
Hide file tree
Showing 99 changed files with 1,834 additions and 2,366 deletions.
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ GEM
ast (2.4.2)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1001.0)
aws-sdk-core (3.212.0)
aws-partitions (1.1009.0)
aws-sdk-core (3.213.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.95.0)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.170.0)
aws-sdk-s3 (1.172.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
benchmark (0.3.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
buildkit (1.6.1)
sawyer (>= 0.6)
Expand Down Expand Up @@ -210,7 +210,7 @@ GEM
fastlane-plugin-appcenter (2.1.2)
fastlane-plugin-sentry (1.25.1)
os (~> 1.1, >= 1.1.4)
fastlane-plugin-wpmreleasetoolkit (12.3.0)
fastlane-plugin-wpmreleasetoolkit (12.3.2)
activesupport (>= 6.1.7.1)
buildkit (~> 1.5)
chroma (= 0.2.0)
Expand Down Expand Up @@ -280,7 +280,7 @@ GEM
concurrent-ruby (~> 1.0)
java-properties (0.3.0)
jmespath (1.6.2)
json (2.8.1)
json (2.8.2)
jwt (2.9.3)
base64
kramdown (2.4.0)
Expand All @@ -291,7 +291,7 @@ GEM
logger (1.6.1)
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
mini_portile2 (2.8.8)
minitest (5.25.1)
molinillo (0.8.0)
multi_json (1.15.0)
Expand All @@ -309,7 +309,7 @@ GEM
sawyer (~> 0.9)
open4 (1.3.4)
options (2.3.2)
optparse (0.5.0)
optparse (0.6.0)
os (1.1.4)
parallel (1.26.3)
parser (3.3.6.0)
Expand Down Expand Up @@ -359,7 +359,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.3.1)
securerandom (0.3.2)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Foundation

public enum GravatarQEAvatarUpdateNotificationKeys: String {
case email
}

public extension NSNotification.Name {
/// Gravatar Quick Editor updated the avatar
static let GravatarQEAvatarUpdateNotification = NSNotification.Name(rawValue: "GravatarQEAvatarUpdateNotification")
}

extension Foundation.Notification {
public func userInfoHasEmail(_ email: String) -> Bool {
guard let userInfo = userInfo,
let notificationEmail = userInfo[GravatarQEAvatarUpdateNotificationKeys.email.rawValue] as? String else {
return false
}
return email == notificationEmail
}
}
9 changes: 0 additions & 9 deletions Modules/Sources/WordPressUI/Constants/UIKitConstants.swift

This file was deleted.

18 changes: 9 additions & 9 deletions Modules/Sources/WordPressUI/Extensions/UIView+Animations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ extension UIView {
/// Applies a fade in animation
///
public func fadeInAnimation(_ completion: ((Bool) -> Void)? = nil) {
alpha = UIKitConstants.alphaMid
alpha = 0.5

UIView.animate(withDuration: Animations.duration, animations: { [weak self] in
self?.alpha = UIKitConstants.alphaFull
self?.alpha = 1
}, completion: { success in
completion?(success)
})
Expand All @@ -83,11 +83,11 @@ extension UIView {
///
public func fadeInWithRotationAnimation(_ completion: ((Bool) -> Void)? = nil) {
transform = CGAffineTransform.makeRotation(-270, scale: 3)
alpha = UIKitConstants.alphaZero
alpha = 0

UIView.animate(withDuration: Animations.duration, animations: {
self.transform = CGAffineTransform.makeRotation(0, scale: 0.75)
self.alpha = UIKitConstants.alphaFull
self.alpha = 1
}, completion: { _ in
UIView.animate(withDuration: Animations.duration, animations: {
self.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
Expand All @@ -102,7 +102,7 @@ extension UIView {
public func fadeOutWithRotationAnimation(_ completion: ((Bool) -> Void)? = nil) {
UIView.animate(withDuration: Animations.duration, animations: {
self.transform = CGAffineTransform.makeRotation(120, scale: 3)
self.alpha = UIKitConstants.alphaZero
self.alpha = 0
}, completion: { success in
completion?(success)
})
Expand All @@ -113,7 +113,7 @@ extension UIView {
public func explodeAnimation(_ completion: ((Bool) -> Void)? = nil) {
UIView.animate(withDuration: Animations.duration, animations: {
self.transform = CGAffineTransform(scaleX: 3.0, y: 3.0)
self.alpha = UIKitConstants.alphaZero
self.alpha = 0
}, completion: { success in
completion?(success)
})
Expand All @@ -123,10 +123,10 @@ extension UIView {
///
public func implodeAnimation(_ completion: ((Bool) -> Void)? = nil) {
transform = CGAffineTransform(scaleX: 3.0, y: 3.0)
alpha = UIKitConstants.alphaZero
alpha = 0

UIView.animate(withDuration: Animations.duration, animations: {
self.alpha = UIKitConstants.alphaFull
self.alpha = 1
self.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
}, completion: { success in
completion?(success)
Expand All @@ -143,7 +143,7 @@ extension UIView {
}

self.isHidden = false
let alpha: CGFloat = isHidden ? UIKitConstants.alphaZero : UIKitConstants.alphaFull
let alpha: CGFloat = isHidden ? 0 : 1
UIView.animate(withDuration: Animations.duration, delay: 0, options: .transitionCrossDissolve, animations: {
self.alpha = alpha
}) { success in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open class FancyAlertPresentationController: UIPresentationController, UIViewCon
private let dimmingView: UIView = {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.backgroundColor = UIColor(white: 0.0, alpha: Constants.dimmingViewAlpha)
$0.alpha = UIKitConstants.alphaZero
$0.alpha = 0
return $0
}(UIView())

Expand All @@ -22,12 +22,12 @@ open class FancyAlertPresentationController: UIPresentationController, UIViewCon
containerView.pinSubviewToAllEdges(dimmingView)

guard let transitionCoordinator = presentingViewController.transitionCoordinator else {
dimmingView.alpha = UIKitConstants.alphaFull
dimmingView.alpha = 1
return
}

transitionCoordinator.animate(alongsideTransition: { _ in
self.dimmingView.alpha = UIKitConstants.alphaFull
self.dimmingView.alpha = 1
})
}

Expand All @@ -39,13 +39,13 @@ open class FancyAlertPresentationController: UIPresentationController, UIViewCon

override open func dismissalTransitionWillBegin() {
guard let coordinator = presentedViewController.transitionCoordinator else {
dimmingView.alpha = UIKitConstants.alphaZero
dimmingView.alpha = 0
return
}

coordinator.animate(alongsideTransition: {
_ in
self.dimmingView.alpha = UIKitConstants.alphaZero
self.dimmingView.alpha = 0
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ open class FancyAlertViewController: UIViewController {

@objc func fadeAllViews(visible: Bool, alongside animation: ((FancyAlertViewController) -> Void)? = nil, completion: ((Bool) -> Void)? = nil) {
UIView.animate(withDuration: Constants.fadeAnimationDuration, animations: {
self.alertView.contentViews.forEach { $0.alpha = (visible) ? UIKitConstants.alphaFull : UIKitConstants.alphaZero }
self.alertView.contentViews.forEach { $0.alpha = (visible) ? 1 : 0 }
animation?(self)
}, completion: completion)
}
Expand Down
64 changes: 0 additions & 64 deletions Modules/Sources/WordPressUI/Views/Users/UserProvider.swift

This file was deleted.

This file was deleted.

Loading

0 comments on commit 03350be

Please sign in to comment.