Skip to content

Commit

Permalink
Merge pull request #2224 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 Jul 25, 2024
2 parents cb7e05b + ee7e77e commit 29bd213
Show file tree
Hide file tree
Showing 235 changed files with 4,976 additions and 1,813 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/download_onesky_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

jobs:
build:
download_and_commit_onesky_translations:
runs-on: macos-14
env:
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run Tests

on:
push:
branches: [ develop, master, feature/*, releases/* ]
branches: [ develop, master ]
pull_request:
branches: [ develop, master, feature/*, releases/* ]

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Distribute To Testflight

on:
push:
branches: [ master, releases/* ]
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -14,7 +14,6 @@ concurrency:
jobs:
distribute_to_testflight:
runs-on: macos-14
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
steps:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.956.0)
aws-sdk-core (3.201.1)
aws-partitions (1.957.0)
aws-sdk-core (3.201.2)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand Down
348 changes: 344 additions & 4 deletions godtools.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions godtools.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "ea584b1bef2b49fac80bdd94fb9aac7b6ff751c9759d8b8ed77b399b7efa4bcf",
"originHash" : "01118c20edbf992410dbd18dc8543d268a2c5d52f8d92674de8f87566072017c",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand All @@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "c218c2054299b15ae577e818bbba16084d3eabe6",
"version" : "10.18.2"
"revision" : "3b62f154d00019ae29a71e9738800bb6f18b236d",
"version" : "10.19.2"
}
},
{
Expand All @@ -33,8 +33,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/AppsFlyerSDK/AppsFlyerFramework-Strict",
"state" : {
"revision" : "beffb10e977bcf5881c282351772868f43d1fe1a",
"version" : "6.14.3"
"revision" : "622bb3a6d31f88e128ee2816c11f490d072473a7",
"version" : "6.14.5"
}
},
{
Expand Down Expand Up @@ -114,8 +114,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "26c898aed8bed13b8a63057ee26500abbbcb8d55",
"version" : "7.13.1"
"revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6",
"version" : "7.13.3"
}
},
{
Expand All @@ -132,8 +132,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193",
"version" : "3.4.1"
"revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
"version" : "3.5.0"
}
},
{
Expand All @@ -159,8 +159,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
"version" : "1.22.5"
}
},
{
Expand All @@ -186,8 +186,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
Expand Down Expand Up @@ -231,8 +231,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-swift.git",
"state" : {
"revision" : "2000569f03948c281afc83c36c710ab15e5dd33c",
"version" : "10.50.0"
"revision" : "6e0772315809ff0a11cd265126350039a6aac59d",
"version" : "10.50.1"
}
},
{
Expand Down Expand Up @@ -267,8 +267,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "f25867a208f459d3c5a06935dceb9083b11cd539",
"version" : "1.22.0"
"revision" : "d57a5aecf24a25b32ec4a74be2f5d0a995a47c4b",
"version" : "1.27.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ class AppDataLayerDependencies {

func getTranslatedToolCategory() -> GetTranslatedToolCategory {
return GetTranslatedToolCategory(
languagesRepository: getLanguagesRepository(),
localizationServices: getLocalizationServices(),
resourcesRepository: getResourcesRepository()
)
Expand Down
2 changes: 2 additions & 0 deletions godtools/App/DependencyContainer/AppDiContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class AppDiContainer {
let globalActivityDiContainer = GlobalActivityDiContainer(coreDataLayer: dataLayer)
let learnToShareToolDiContainer = LearnToShareToolDiContainer(coreDataLayer: dataLayer)
let lessonEvaluationDiContainer = LessonEvaluationFeatureDiContainer(coreDataLayer: dataLayer)
let lessonFilterDiContainer = LessonFilterDiContainer(coreDataLayer: dataLayer)
let lessonsDiContainer = LessonsFeatureDiContainer(coreDataLayer: dataLayer)
let onboardingDiContainer = OnboardingDiContainer(coreDataLayer: dataLayer)
let shareablesDiContainer: ShareablesDiContainer = ShareablesDiContainer(coreDataLayer: dataLayer)
Expand All @@ -58,6 +59,7 @@ class AppDiContainer {
globalActivity: globalActivityDiContainer,
learnToShareTool: learnToShareToolDiContainer,
lessonEvaluation: lessonEvaluationDiContainer,
lessonFilter: lessonFilterDiContainer,
lessons: lessonsDiContainer,
onboarding: onboardingDiContainer,
shareables: shareablesDiContainer,
Expand Down
4 changes: 3 additions & 1 deletion godtools/App/DependencyContainer/AppFeatureDiContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AppFeatureDiContainer {
let globalActivity: GlobalActivityDiContainer
let learnToShareTool: LearnToShareToolDiContainer
let lessonEvaluation: LessonEvaluationFeatureDiContainer
let lessonFilter: LessonFilterDiContainer
let lessons: LessonsFeatureDiContainer
let onboarding: OnboardingDiContainer
let shareables: ShareablesDiContainer
Expand All @@ -31,7 +32,7 @@ class AppFeatureDiContainer {
let toolShortcutLinks: ToolShortcutLinksDiContainer
let tutorial: TutorialFeatureDiContainer

init(account: AccountDiContainer, appLanguage: AppLanguageFeatureDiContainer, dashboard: DashboardDiContainer, downloadToolProgress: DownloadToolProgressFeatureDiContainer, favorites: FavoritesDiContainer, featuredLessons: FeaturedLessonsDiContainer, globalActivity: GlobalActivityDiContainer, learnToShareTool: LearnToShareToolDiContainer, lessonEvaluation: LessonEvaluationFeatureDiContainer, lessons: LessonsFeatureDiContainer, onboarding: OnboardingDiContainer, shareables: ShareablesDiContainer, shareGodTools: ShareGodToolsDiContainer, spotlightTools: SpotlightToolsDiContainer, toolDetails: ToolDetailsFeatureDiContainer, toolScreenShare: ToolScreenShareFeatureDiContainer, toolSettings: ToolSettingsDiContainer, toolsFilter: ToolsFilterFeatureDiContainer, toolShortcutLinks: ToolShortcutLinksDiContainer, tutorial: TutorialFeatureDiContainer) {
init(account: AccountDiContainer, appLanguage: AppLanguageFeatureDiContainer, dashboard: DashboardDiContainer, downloadToolProgress: DownloadToolProgressFeatureDiContainer, favorites: FavoritesDiContainer, featuredLessons: FeaturedLessonsDiContainer, globalActivity: GlobalActivityDiContainer, learnToShareTool: LearnToShareToolDiContainer, lessonEvaluation: LessonEvaluationFeatureDiContainer, lessonFilter: LessonFilterDiContainer, lessons: LessonsFeatureDiContainer, onboarding: OnboardingDiContainer, shareables: ShareablesDiContainer, shareGodTools: ShareGodToolsDiContainer, spotlightTools: SpotlightToolsDiContainer, toolDetails: ToolDetailsFeatureDiContainer, toolScreenShare: ToolScreenShareFeatureDiContainer, toolSettings: ToolSettingsDiContainer, toolsFilter: ToolsFilterFeatureDiContainer, toolShortcutLinks: ToolShortcutLinksDiContainer, tutorial: TutorialFeatureDiContainer) {

self.account = account
self.appLanguage = appLanguage
Expand All @@ -42,6 +43,7 @@ class AppFeatureDiContainer {
self.globalActivity = globalActivity
self.learnToShareTool = learnToShareTool
self.lessonEvaluation = lessonEvaluation
self.lessonFilter = lessonFilter
self.lessons = lessons
self.onboarding = onboarding
self.shareables = shareables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@ import SwiftUI
struct SocialSignInView: View {

private let backgroundColor: Color
private let screenAccessibility: AccessibilityStrings.Screen

@ObservedObject private var viewModel: SocialSignInViewModel

init(viewModel: SocialSignInViewModel, backgroundColor: Color) {
init(viewModel: SocialSignInViewModel, backgroundColor: Color, screenAccessibility: AccessibilityStrings.Screen) {

self.viewModel = viewModel
self.backgroundColor = backgroundColor
self.screenAccessibility = screenAccessibility
}

var body: some View {

GeometryReader { geometry in

AccessibilityScreenElementView(screenAccessibility: screenAccessibility)

ZStack(alignment: .top) {
backgroundColor
.ignoresSafeArea()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class DashboardPresentationLayerDependencies {
return LessonsViewModel(
flowDelegate: unwrappedFlowDelegate,
resourcesRepository: appDiContainer.dataLayer.getResourcesRepository(),
getCurrentAppLanguageUseCase: appDiContainer.feature.appLanguage.domainLayer.getCurrentAppLanguageUseCase(),
getCurrentAppLanguageUseCase: appDiContainer.feature.appLanguage.domainLayer.getCurrentAppLanguageUseCase(),
getUserLessonFiltersUseCase: appDiContainer.feature.lessonFilter.domainLayer.getUserLessonFiltersUseCase(),
viewLessonsUseCase: appDiContainer.feature.lessons.domainLayer.getViewLessonsUseCase(),
trackScreenViewAnalyticsUseCase: appDiContainer.domainLayer.getTrackScreenViewAnalyticsUseCase(),
trackActionAnalyticsUseCase: appDiContainer.domainLayer.getTrackActionAnalyticsUseCase(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ struct DashboardTabBarView: View {

DashboardTabBarItemView(
viewModel: viewModel.getTabBarItemViewModel(tabIndex: index),
currentTab: $viewModel.currentTab
currentTab: $viewModel.currentTab,
buttonAccessibility: getTabBarItemButtonAccessibility(tabIndex: index)
)
.frame(maxWidth: .infinity)
}
Expand All @@ -40,7 +41,8 @@ struct DashboardTabBarView: View {

DashboardTabBarItemView(
viewModel: viewModel.getTabBarItemViewModel(tabIndex: index),
currentTab: $viewModel.currentTab
currentTab: $viewModel.currentTab,
buttonAccessibility: getTabBarItemButtonAccessibility(tabIndex: index)
)
.frame(maxWidth: .infinity)
}
Expand All @@ -57,6 +59,21 @@ struct DashboardTabBarView: View {
)
.environment(\.layoutDirection, .leftToRight)
}

private func getTabBarItemButtonAccessibility(tabIndex: Int) -> AccessibilityStrings.Button {

switch viewModel.tabs[tabIndex] {

case .lessons:
return .dashboardTabLessons

case .favorites:
return .dashboardTabFavorites

case .tools:
return .dashboardTabTools
}
}
}

struct DashboardTabBarView_Previews: PreviewProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ struct DashboardTabBarItemView: View {

private let unSelectedColor = Color(red: 170 / 255, green: 170 / 255, blue: 170 / 255)
private let selectedColor = ColorPalette.gtBlue.color
private let buttonAccessibility: AccessibilityStrings.Button

private var viewModel: DashboardTabBarItemViewModel

@Binding private var currentTab: Int

init(viewModel: DashboardTabBarItemViewModel, currentTab: Binding<Int>) {
init(viewModel: DashboardTabBarItemViewModel, currentTab: Binding<Int>, buttonAccessibility: AccessibilityStrings.Button) {

self.viewModel = viewModel
self._currentTab = currentTab
self.buttonAccessibility = buttonAccessibility
}

private var isSelected: Bool {
Expand All @@ -41,6 +43,8 @@ struct DashboardTabBarItemView: View {
.foregroundColor(isSelected ? selectedColor : unSelectedColor)
}
}
.accessibility(addTraits: .isButton)
.accessibilityIdentifier(buttonAccessibility.id)
.onTapGesture {
currentTab = viewModel.tabIndex
}
Expand All @@ -55,7 +59,8 @@ struct DashboardTabBarItemView_Preview: PreviewProvider {

DashboardTabBarItemView(
viewModel: DashboardTabBarItemViewModel(tabIndex: 0, title: "Lessons", imageName: ""),
currentTab: $currentTab
currentTab: $currentTab,
buttonAccessibility: .dashboardTabLessons
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ class ToolViewModel: MobileContentPagesViewModel {
.persistUserToolSettingsPublisher(
with: renderer.value.resource.id,
primaryLanguageId: languages.primaryLanguageId,
parallelLanguageId: languages.parallelLanguageId,
selectedLanguageId: languages.selectedLanguageId
parallelLanguageId: languages.parallelLanguageId
)
}
.switchToLatest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import SwiftUI

struct ToolCardFavoritedButton: View {

private let accessibility: AccessibilityStrings.Button = .toggleToolFavorite

let isFavorited: Bool
let tappedClosure: (() -> Void)?

Expand All @@ -28,6 +30,7 @@ struct ToolCardFavoritedButton: View {
.clipped()
}
.frame(width: 44, height: 44)
.accessibilityIdentifier(accessibility.id)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ struct ToolCardView: View {
private let navButtonSpacing: CGFloat = 8
private let contentHorizontalInsets: CGFloat = 15
private let showsCategory: Bool
private let accessibility: AccessibilityStrings.Button?
private let favoriteTappedClosure: (() -> Void)?
private let toolDetailsTappedClosure: (() -> Void)?
private let openToolTappedClosure: (() -> Void)?
private let toolTappedClosure: (() -> Void)?

@ObservedObject private var viewModel: ToolCardViewModel

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

var navButtons: [ToolCardNavButtonType] = Array()

Expand All @@ -49,6 +50,7 @@ struct ToolCardView: View {
self.layout = layout
self.navButtons = navButtons
self.showsCategory = showsCategory
self.accessibility = accessibility
self.favoriteTappedClosure = favoriteTappedClosure
self.toolDetailsTappedClosure = toolDetailsTappedClosure
self.openToolTappedClosure = openToolTappedClosure
Expand Down Expand Up @@ -85,6 +87,10 @@ struct ToolCardView: View {

ZStack(alignment: .topLeading) {

if let accessibilityIdentifier = accessibility?.id {
AccessibilityTapAreaView(accessibilityIdentifier: accessibilityIdentifier)
}

backgroundColor

VStack(alignment: .leading, spacing: 0) {
Expand Down Expand Up @@ -141,12 +147,12 @@ struct ToolCardView: View {
Spacer()
}

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

toolDetailsTappedClosure?()
}

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

openToolTappedClosure?()
}
Expand Down Expand Up @@ -218,6 +224,7 @@ struct ToolCardView_Previews: PreviewProvider {
geometry: geometry,
layout: .landscape,
showsCategory: true,
accessibility: nil,
favoriteTappedClosure: nil,
toolDetailsTappedClosure: nil,
openToolTappedClosure: 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,
accessibility: .spotlightTool,
favoriteTappedClosure: {

viewModel.spotlightToolFavoriteTapped(spotlightTool: spotlightTool)
Expand Down
Loading

0 comments on commit 29bd213

Please sign in to comment.