Skip to content

Commit

Permalink
Merge pull request #2382 from CruGlobal/develop
Browse files Browse the repository at this point in the history
Merge develop into master for new QA release
  • Loading branch information
levieggertcru authored Jan 6, 2025
2 parents bc6b38d + 4e0be1f commit 8414dbe
Show file tree
Hide file tree
Showing 25 changed files with 82 additions and 65 deletions.
28 changes: 14 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
base64
nkf
rexml
activesupport (7.2.2)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -25,7 +25,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1018.0)
aws-partitions (1.1027.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand All @@ -34,7 +34,7 @@ GEM
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.176.0)
aws-sdk-s3 (1.176.1)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -118,8 +118,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
Expand All @@ -128,7 +128,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.225.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -168,7 +168,7 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-onesky (0.2.1)
onesky-ruby
Expand Down Expand Up @@ -224,10 +224,10 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.9.0)
json (2.9.1)
jwt (2.9.3)
base64
logger (1.6.2)
logger (1.6.4)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
Expand Down Expand Up @@ -260,12 +260,12 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.3.9)
rouge (2.0.7)
rexml (3.4.0)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
securerandom (0.4.0)
securerandom (0.4.1)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand Down Expand Up @@ -301,8 +301,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

Expand Down
14 changes: 7 additions & 7 deletions godtools.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12167,7 +12167,7 @@
);
mainGroup = 4F5732801EA69CF00082035C;
packageReferences = (
45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-ios" */,
45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-spm" */,
45CF096E2784B910007F13D3 /* XCRemoteSwiftPackageReference "request-operation-ios" */,
D4997E0C28D4CED800205B4C /* XCRemoteSwiftPackageReference "youtube-ios-player-helper" */,
45E7D4C22977430A008C7503 /* XCRemoteSwiftPackageReference "ZipArchive" */,
Expand Down Expand Up @@ -15256,7 +15256,7 @@
repositoryURL = "https://github.com/realm/realm-swift.git";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 10.50.0;
minimumVersion = 20.0.0;
};
};
45CF096E2784B910007F13D3 /* XCRemoteSwiftPackageReference "request-operation-ios" */ = {
Expand Down Expand Up @@ -15291,12 +15291,12 @@
minimumVersion = 0.5.0;
};
};
45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-ios" */ = {
45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/airbnb/lottie-ios.git";
repositoryURL = "https://github.com/airbnb/lottie-spm.git";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 4.4.3;
minimumVersion = 4.5.0;
};
};
45E7D4C22977430A008C7503 /* XCRemoteSwiftPackageReference "ZipArchive" */ = {
Expand Down Expand Up @@ -15379,7 +15379,7 @@
};
45A416052A9943D50030E2C7 /* Lottie */ = {
isa = XCSwiftPackageProductDependency;
package = 45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-ios" */;
package = 45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-spm" */;
productName = Lottie;
};
45A416072A9943D50030E2C7 /* RequestOperation */ = {
Expand Down Expand Up @@ -15454,7 +15454,7 @@
};
45E39EDB27457E0C006A59E4 /* Lottie */ = {
isa = XCSwiftPackageProductDependency;
package = 45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-ios" */;
package = 45E39EDA27457E0C006A59E4 /* XCRemoteSwiftPackageReference "lottie-spm" */;
productName = Lottie;
};
45E7D4C32977430A008C7503 /* ZipArchive */ = {
Expand Down
18 changes: 9 additions & 9 deletions godtools.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "5e34efb51656fc5e129b4e86acd222181e73d4b2ba93068a2bb8a599a23dde13",
"originHash" : "46c3e5d6b619464f81f8c9a21f423fede21a2c1aee05c005c799696c1132e668",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand Down Expand Up @@ -164,12 +164,12 @@
}
},
{
"identity" : "lottie-ios",
"identity" : "lottie-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/airbnb/lottie-ios.git",
"location" : "https://github.com/airbnb/lottie-spm.git",
"state" : {
"revision" : "769b88d83a42ca8d5572b020c96f47e3690b3796",
"version" : "4.4.3"
"revision" : "b842598f1295f3ffa1475b1580672d1fe5b83580",
"version" : "4.5.0"
}
},
{
Expand Down Expand Up @@ -213,17 +213,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-core.git",
"state" : {
"revision" : "9cf7ef4ad8e2f4c7a519c9a395ca3d253bb87aa8",
"version" : "14.6.2"
"revision" : "f98720a07e6150c41c953e1937108225550ba155",
"version" : "20.0.0"
}
},
{
"identity" : "realm-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-swift.git",
"state" : {
"revision" : "6e0772315809ff0a11cd265126350039a6aac59d",
"version" : "10.50.1"
"revision" : "7ea8be1f74034bae860120d58d3491c4fcedff5b",
"version" : "20.0.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ struct ToolCardView: View {
private let navButtonWidth: CGFloat = 92
private let navButtonHeight: CGFloat = 30
private let navButtonSpacing: CGFloat = 8
private let navButtonTitleHorizontalPadding: CGFloat?
private let contentHorizontalInsets: CGFloat = 15
private let showsCategory: Bool
private let accessibility: AccessibilityStrings.Button?
Expand All @@ -31,7 +32,7 @@ struct ToolCardView: View {

@ObservedObject private var viewModel: ToolCardViewModel

init(viewModel: ToolCardViewModel, geometry: GeometryProxy, layout: ToolCardLayout, showsCategory: Bool, accessibility: AccessibilityStrings.Button?, favoriteTappedClosure: (() -> Void)?, toolDetailsTappedClosure: (() -> Void)?, openToolTappedClosure: (() -> Void)?, toolTappedClosure: (() -> Void)?) {
init(viewModel: ToolCardViewModel, geometry: GeometryProxy, layout: ToolCardLayout, showsCategory: Bool, navButtonTitleHorizontalPadding: CGFloat?, accessibility: AccessibilityStrings.Button?, favoriteTappedClosure: (() -> Void)?, toolDetailsTappedClosure: (() -> Void)?, openToolTappedClosure: (() -> Void)?, toolTappedClosure: (() -> Void)?) {

var navButtons: [ToolCardNavButtonType] = Array()

Expand All @@ -50,6 +51,7 @@ struct ToolCardView: View {
self.layout = layout
self.navButtons = navButtons
self.showsCategory = showsCategory
self.navButtonTitleHorizontalPadding = navButtonTitleHorizontalPadding
self.accessibility = accessibility
self.favoriteTappedClosure = favoriteTappedClosure
self.toolDetailsTappedClosure = toolDetailsTappedClosure
Expand Down Expand Up @@ -147,12 +149,12 @@ struct ToolCardView: View {
Spacer()
}

GTWhiteButton(title: viewModel.detailsButtonTitle, font: navButtonFont, width: navButtonWidth, height: navButtonHeight, accessibility: .toolDetails) {
GTWhiteButton(title: viewModel.detailsButtonTitle, font: navButtonFont, width: navButtonWidth, height: navButtonHeight, titleHorizontalPadding: navButtonTitleHorizontalPadding, accessibility: .toolDetails) {

toolDetailsTappedClosure?()
}

GTBlueButton(title: viewModel.openButtonTitle, font: navButtonFont, width: navButtonWidth, height: navButtonHeight, accessibility: .openTool) {
GTBlueButton(title: viewModel.openButtonTitle, font: navButtonFont, width: navButtonWidth, height: navButtonHeight, titleHorizontalPadding: navButtonTitleHorizontalPadding, accessibility: .openTool) {

openToolTappedClosure?()
}
Expand Down Expand Up @@ -224,6 +226,7 @@ struct ToolCardView_Previews: PreviewProvider {
geometry: geometry,
layout: .landscape,
showsCategory: true,
navButtonTitleHorizontalPadding: nil,
accessibility: nil,
favoriteTappedClosure: nil,
toolDetailsTappedClosure: nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct ToolSpotlightView: View {
geometry: geometry,
layout: .thumbnail,
showsCategory: false,
navButtonTitleHorizontalPadding: nil,
accessibility: .spotlightTool,
favoriteTappedClosure: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct ToolsView: View {
geometry: geometry,
layout: .landscape,
showsCategory: true,
navButtonTitleHorizontalPadding: nil,
accessibility: .tool,
favoriteTappedClosure: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct AllYourFavoriteToolsView: View {
geometry: geometry,
layout: .landscape,
showsCategory: true,
navButtonTitleHorizontalPadding: YourFavoriteToolsView.toolCardNavButtonTitleHorizontalPadding,
accessibility: .favoriteTool,
favoriteTappedClosure: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import SwiftUI

struct YourFavoriteToolsView: View {


static let toolCardNavButtonTitleHorizontalPadding: CGFloat = 5

private let geometry: GeometryProxy
private let contentHorizontalInsets: CGFloat
private let toolCardSpacing: CGFloat
Expand Down Expand Up @@ -47,6 +49,7 @@ struct YourFavoriteToolsView: View {
geometry: geometry,
layout: .thumbnail,
showsCategory: true,
navButtonTitleHorizontalPadding: Self.toolCardNavButtonTitleHorizontalPadding,
accessibility: .favoriteTool,
favoriteTappedClosure: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct ResumeLessonProgressModal: View {

private let buttonHeight: CGFloat = 48
private let modalInset: CGFloat = 28
private let buttonInset: CGFloat = 20
private let buttonInset: CGFloat = 40
private let buttonSpace: CGFloat = 12

@ObservedObject private var viewModel: ResumeLessonProgressModalViewModel
Expand All @@ -25,8 +25,8 @@ struct ResumeLessonProgressModal: View {
GeometryReader { geometry in
let totalSpaceAroundModal = modalInset * 2
let modalWidth = geometry.size.width - totalSpaceAroundModal
let totalSpaceAroundButtons = (buttonInset * 2) + buttonSpace
let buttonWidth = (modalWidth - totalSpaceAroundButtons) / 2
let totalSpaceAroundButtons = buttonInset * 2
let buttonWidth = (modalWidth - totalSpaceAroundButtons)

ZStack {
Color.clear
Expand All @@ -44,10 +44,10 @@ struct ResumeLessonProgressModal: View {
.font(FontLibrary.sfProTextRegular.font(size: 16))
.foregroundColor(ColorPalette.gtGrey.color)
.multilineTextAlignment(.center)
.padding(.horizontal, buttonInset + 20)
.padding(.horizontal, buttonInset)
.padding(.bottom, 35)

HStack(spacing: buttonSpace) {
VStack(spacing: buttonSpace) {
GTWhiteButton(title: viewModel.interfaceStringsDomainModel.startOverButtonText, fontSize: 15, width: buttonWidth, height: buttonHeight) {
viewModel.startOverButtonTapped()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ class MobileContentTabsViewModel: MobileContentViewModel {

super.init(baseModel: tabsModel, renderedPageContext: renderedPageContext, mobileContentAnalytics: mobileContentAnalytics)
}

var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
return UISemanticContentAttribute.from(languageDirection: LanguageDirectionDomainModel(languageModel: renderedPageContext.language))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class MobileContentTextView: MobileContentView, NibBased {
loadNib()
}

rootNibView?.semanticContentAttribute = viewModel.languageDirectionSemanticContentAttribute

setupBinding()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class MobileContentViewModel: NSObject {
return renderedPageContext.language.direction == .leftToRight ? .left : .right
}

var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
return UISemanticContentAttribute.from(languageDirection: LanguageDirectionDomainModel(languageModel: renderedPageContext.language))
}

func viewDidAppear(visibleAnalyticsEvents: [MobileContentRendererAnalyticsEvent]) {

for event in visibleAnalyticsEvents {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TractPageCallToActionViewModel: MobileContentViewModel {
super.init(baseModel: callToActionModel, renderedPageContext: renderedPageContext, mobileContentAnalytics: mobileContentAnalytics)
}

var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
override var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
return UISemanticContentAttribute.from(languageDirection: LanguageDirectionDomainModel(languageModel: renderedPageContext.primaryRendererLanguage))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ class TractPageCardViewModel: MobileContentViewModel {
return FontLibrary.systemUIFont(size: 18, weight: .regular)
}

var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
return UISemanticContentAttribute.from(languageDirection: LanguageDirectionDomainModel(languageModel: renderedPageContext.language))
}

func containsDismissListener(eventId: EventId) -> Bool {
return cardModel.dismissListeners.contains(eventId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class TractPageHeaderViewModel: MobileContentViewModel {
}
}

var languageDirectionSemanticContentAttribute: UISemanticContentAttribute {
return UISemanticContentAttribute.from(languageDirection: LanguageDirectionDomainModel(languageModel: renderedPageContext.language))
}

var backgroundColor: UIColor {
return headerModel.backgroundColor
}
Expand Down
4 changes: 4 additions & 0 deletions godtools/App/Share/Protocols/NibBased.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ extension NibBased where Self: UIView {

return rootNibView
}

var rootNibView: UIView? {
return subviews.first
}
}
Loading

0 comments on commit 8414dbe

Please sign in to comment.