Skip to content

Commit

Permalink
Develop to master v1.3 (#79)
Browse files Browse the repository at this point in the history
* bug fix (#57)

* Fix DisclosureGroup fields bug on SignUpView (#58)

* Hide no discussion while update (#59)

* Consolidating Databases and Refactoring Module Logic (#60)

This merge request aims to consolidate multiple databases into a single one for improved efficiency and maintainability in the OpenEdx project.
The changes involve creating a new class, DatabaseManager, which handles CoreData operations and moving CoreData logic from specific modules to this central manager.
Additionally, a new method, deleteAllFiles(), is added to the DownloadManager class for convenient file deletion upon user logout.

* Migrate all colors to Theme (#61)

* Added support for multiple color schemes to quickly switch between educational platforms. Updated variables throughout the project accordingly.

* Fix not updating completion error (#64)

completion doesn't update status when user has finished learning the contents of a unit

* Remove custom navigation controller (#63)

* Remove custom navigation controller
Change navigation controller from custom to system for feature changes and adding possibility to swipe gestures

* disable routing whenever handouts is empty (#66)

* Fix the isMobileData variable in the Connectivity module. (#67)

Add the possibility to play videos with sound in silent mode.

* encoded video dissmiss by device rotation (#68)

* fixed

* Separate AppStorage to protocol oriented architecture. (#69)

* Separate AppStorage to protocol oriented architecture.

* Added path field to the DownloadData model. (#70)

* Added path field to the DownloadData model.
All control over files was refactored using the new path field.

* Fix CourseContainerViewModelTests

* September bugfixes (#71)

* fix incorrect back button on the course screen

* Fix issue on Delete account view. The inactive button is clickable.

* change CourseDetailsEndpoint to CourseEndpoint
fix WebView bug with iframe
fix doubling courses on Dashboard after subscribe to a new course

* Create 0001-strategy-for-maintaining-OS-versions.rst (#72)

* Create 0001-strategy-for-maintaining-OS-versions.rst

* Update 0001-strategy-for-maintaining-OS-versions.rst

* Deprecate iOS 14 (#74)

* Deprecate iOS 14

Remove isIOS14 in ViewExtension

Change deployment target to iOS 15

Add a new RefreshableScrollView for better pull to refresh animation on any iOS
update loading logic in DiscoveryViewModel, ThreadViewModel, and PostsViewModel for a smooth refreshing

* Update refreshable ScrollView to native for iOS 16+ (#75)

* Update refreshable ScrollView to native for iOS 16+

* Codestyle improvements (#76)

* codestyle improvements

* remove unused code

* ios 17 bugfixes (#77)

* bugfixes

* Change license to Apache (#78)

---------

Co-authored-by: IvanStepanok <[email protected]>
  • Loading branch information
volodymyr-chekyrta and IvanStepanok authored Sep 22, 2023
1 parent 1d1fdec commit 83ee9bf
Show file tree
Hide file tree
Showing 143 changed files with 3,563 additions and 3,464 deletions.
32 changes: 16 additions & 16 deletions Authorization/Authorization.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -611,7 +611,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -694,7 +694,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -721,7 +721,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -739,7 +739,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -757,7 +757,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -775,7 +775,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -793,7 +793,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -811,7 +811,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -829,7 +829,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -918,7 +918,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1011,7 +1011,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1109,7 +1109,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1202,7 +1202,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1358,7 +1358,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1393,7 +1393,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct FieldsView: View {
type: .discovery,
fontSize: 90, screenWidth: proxy.size.width)
)
.id(UUID())
.padding(.horizontal, -6)

case .unknown:
Expand Down
33 changes: 18 additions & 15 deletions Authorization/Authorization/Presentation/Login/SignInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ public struct SignInView: View {
VStack(alignment: .leading) {
Text(AuthLocalization.SignIn.logInTitle)
.font(Theme.Fonts.displaySmall)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 4)
Text(AuthLocalization.SignIn.welcomeBack)
.font(Theme.Fonts.titleSmall)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 20)

Text(AuthLocalization.SignIn.email)
.font(Theme.Fonts.labelLarge)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
TextField(AuthLocalization.SignIn.email, text: $email)
.keyboardType(.emailAddress)
.textContentType(.emailAddress)
Expand All @@ -57,42 +57,42 @@ public struct SignInView: View {
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(CoreAssets.textInputBackground.swiftUIColor)
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(CoreAssets.textInputStroke.swiftUIColor)
.fill(Theme.Colors.textInputStroke)
)

Text(AuthLocalization.SignIn.password)
.font(Theme.Fonts.labelLarge)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.top, 18)
SecureField(AuthLocalization.SignIn.password, text: $password)
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(CoreAssets.textInputBackground.swiftUIColor)
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(CoreAssets.textInputStroke.swiftUIColor)
.fill(Theme.Colors.textInputStroke)
)

HStack {
Button(AuthLocalization.SignIn.registerBtn) {
viewModel.analytics.signUpClicked()
viewModel.trackSignUpClicked()
viewModel.router.showRegisterScreen()
}.foregroundColor(CoreAssets.accentColor.swiftUIColor)
}.foregroundColor(Theme.Colors.accentColor)

Spacer()

Button(AuthLocalization.SignIn.forgotPassBtn) {
viewModel.analytics.forgotPasswordClicked()
viewModel.trackForgotPasswordClicked()
viewModel.router.showForgotPasswordScreen()
}.foregroundColor(CoreAssets.accentColor.swiftUIColor)
}.foregroundColor(Theme.Colors.accentColor)
}
.padding(.top, 10)
if viewModel.isShowProgress {
Expand All @@ -113,7 +113,7 @@ public struct SignInView: View {
}
.padding(.horizontal, 24)
.padding(.top, 50)
}.roundedBackground(CoreAssets.background.swiftUIColor)
}.roundedBackground(Theme.Colors.background)
.scrollAvoidKeyboard(dismissKeyboardByTap: true)

}
Expand All @@ -122,7 +122,7 @@ public struct SignInView: View {
if viewModel.showAlert {
VStack {
Text(viewModel.alertMessage ?? "")
.shadowCardStyle(bgColor: CoreAssets.accentColor.swiftUIColor,
.shadowCardStyle(bgColor: Theme.Colors.accentColor,
textColor: .white)
.padding(.top, 80)
Spacer()
Expand All @@ -149,7 +149,10 @@ public struct SignInView: View {
}
}
}
.background(CoreAssets.background.swiftUIColor.ignoresSafeArea(.all))
.hideNavigationBar()
.navigationBarBackButtonHidden(true)
.navigationBarHidden(true)
.background(Theme.Colors.background.ignoresSafeArea(.all))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,24 @@ public class SignInViewModel: ObservableObject {
}
}

private let interactor: AuthInteractorProtocol
let router: AuthorizationRouter
let analytics: AuthorizationAnalytics

private let interactor: AuthInteractorProtocol
private let analytics: AuthorizationAnalytics
private let validator: Validator

public init(interactor: AuthInteractorProtocol,
router: AuthorizationRouter,
analytics: AuthorizationAnalytics,
validator: Validator) {
public init(
interactor: AuthInteractorProtocol,
router: AuthorizationRouter,
analytics: AuthorizationAnalytics,
validator: Validator
) {
self.interactor = interactor
self.router = router
self.analytics = analytics
self.validator = validator
}

@MainActor
func login(username: String, password: String) async {
guard validator.isValidEmail(username) else {
Expand Down Expand Up @@ -76,4 +79,12 @@ public class SignInViewModel: ObservableObject {
}
}
}

func trackSignUpClicked() {
analytics.signUpClicked()
}

func trackForgotPasswordClicked() {
analytics.forgotPasswordClicked()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SignUpView.swift
// Authorization
//
// Created by  Stepanok Ivan on 24.10.2022.
// Created by Stepanok Ivan on 24.10.2022.
//

import SwiftUI
Expand Down Expand Up @@ -43,12 +43,11 @@ public struct SignUpView: View {
CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template)
.backButtonStyle(color: .white)
})
.foregroundColor(CoreAssets.styledButtonText.swiftUIColor)
.foregroundColor(Theme.Colors.styledButtonText)

}.frame(minWidth: 0,
maxWidth: .infinity,
alignment: .topLeading)
.frameLimit()
}

GeometryReader { proxy in
Expand All @@ -58,11 +57,11 @@ public struct SignUpView: View {

Text(AuthLocalization.SignUp.title)
.font(Theme.Fonts.displaySmall)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 4)
Text(AuthLocalization.SignUp.subtitle)
.font(Theme.Fonts.titleSmall)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 20)

let requiredFields = viewModel.fields.filter {$0.field.required}
Expand All @@ -80,7 +79,7 @@ public struct SignUpView: View {
router: viewModel.router,
configuration: viewModel.config,
cssInjector: viewModel.cssInjector,
proxy: proxy)
proxy: proxy).padding(.horizontal, 1)
}, label: {
Text(disclosureGroupOpen
? AuthLocalization.SignUp.hideFields
Expand All @@ -96,9 +95,9 @@ public struct SignUpView: View {
} else {
StyledButton(AuthLocalization.SignUp.createAccountBtn) {
Task {
viewModel.analytics.createAccountClicked()
await viewModel.registerUser()
}
viewModel.trackCreateAccountClicked()
}
.padding(.top, 40)
.padding(.bottom, 80)
Expand All @@ -109,7 +108,7 @@ public struct SignUpView: View {
.padding(.horizontal, 24)
.padding(.top, 24)

}.roundedBackground(CoreAssets.background.swiftUIColor)
}.roundedBackground(Theme.Colors.background)
.onRightSwipeGesture {
viewModel.router.back()
}
Expand All @@ -136,7 +135,8 @@ public struct SignUpView: View {
}
}
}
.background(CoreAssets.background.swiftUIColor.ignoresSafeArea(.all))
.background(Theme.Colors.background.ignoresSafeArea(.all))
.hideNavigationBar()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class SignUpViewModel: ObservableObject {
@Published var fields: [FieldConfiguration] = []

let router: AuthorizationRouter
let analytics: AuthorizationAnalytics
let config: Config
let cssInjector: CSSInjector

private let interactor: AuthInteractorProtocol
private let analytics: AuthorizationAnalytics
private let validator: Validator

public init(
Expand Down Expand Up @@ -106,4 +106,8 @@ public class SignUpViewModel: ObservableObject {
}
}
}

func trackCreateAccountClicked() {
analytics.createAccountClicked()
}
}
Loading

0 comments on commit 83ee9bf

Please sign in to comment.