Skip to content

Commit

Permalink
feat: Problem with course menu position on iPad and in Landscape mode…
Browse files Browse the repository at this point in the history
… on iPhone (#292)

* fix: iPad register and login buttons

* fix: IPad sign up view

* fix: iPad Course outline view

* feat: added IPAD_STRETCH config parameter

* fix: size bug on small device

* fix: iPad stretch for content types

* fix: player on iPad and small devices

* fix: stretch for search bar on discussions page

* fix: discussion search bar stretch

* fix: bug of player on small devices

* fix: removed stretching for sign up/sign in views

* feat: removed feature flag

* feat: added readable content size

* fix: added readable content size to startup screen

* fix: sign in, sign up, reset password readable paddings

* fix: scroll bar position for edit profile view

* fix: social buttons

* feat: added readability and accessibility injections

* fix: resize of content and added readability for content types

* fix: readability width calculation

* feat: added Discussons paddings

* feat: added iPad paddings for Dates tab

* feat: added injection to html webview

* feat: added readable for profile

* feat: added padding for tab menu

* feat: added paddings to dashboard view

* fix: merge conflict

* feat: moved filter buttons

* feat: added paddings to Delete Account View

* feat: added paddings for native discovery view

* feat: added padding for CourseVerticalsView

* feat: added paddings for responses view

* feat: added paddings to UserProfileView

* fix: do not block scroll from side for UserProfileView

* chore: review's changes

* chore: merge conflicts

* chore: merge conflict

* chore: warning

* fix: merge conflicts

* chore: merge conflict

* chore: removed extra horizontal padding

* chore: refactor

* chore: label alignment

* chore: merge conflicts

* chore: status bar fix

* chore: merge conflict
  • Loading branch information
forgotvas authored Mar 21, 2024
1 parent 75bba40 commit 2de1bc5
Show file tree
Hide file tree
Showing 47 changed files with 2,620 additions and 2,247 deletions.
205 changes: 104 additions & 101 deletions Authorization/Authorization/Presentation/Login/SignInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,117 +56,120 @@ public struct SignInView: View {
.padding(.bottom, isHorizontal ? 10 : 40)
.accessibilityIdentifier("logo_image")

ScrollView {
VStack {
VStack(alignment: .leading) {
Text(AuthLocalization.SignIn.logInTitle)
.font(Theme.Fonts.displaySmall)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 4)
.accessibilityIdentifier("signin_text")
Text(AuthLocalization.SignIn.welcomeBack)
.font(Theme.Fonts.titleSmall)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 20)
.accessibilityIdentifier("welcome_back_text")

Text(AuthLocalization.SignIn.emailOrUsername)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.accessibilityIdentifier("username_text")
TextField(AuthLocalization.SignIn.emailOrUsername, text: $email)
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.textPrimary)
.keyboardType(.emailAddress)
.textContentType(.emailAddress)
.autocapitalization(.none)
.autocorrectionDisabled()
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
)
.accessibilityIdentifier("username_textfield")

Text(AuthLocalization.SignIn.password)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.top, 18)
.accessibilityIdentifier("password_text")
SecureField(AuthLocalization.SignIn.password, text: $password)
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
)
.accessibilityIdentifier("password_textfield")
HStack {
if !viewModel.config.features.startupScreenEnabled {
Button(CoreLocalization.SignIn.registerBtn) {
viewModel.router.showRegisterScreen(sourceScreen: viewModel.sourceScreen)
GeometryReader { proxy in
ScrollView {
VStack {
VStack(alignment: .leading) {
Text(AuthLocalization.SignIn.logInTitle)
.font(Theme.Fonts.displaySmall)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 4)
.accessibilityIdentifier("signin_text")
Text(AuthLocalization.SignIn.welcomeBack)
.font(Theme.Fonts.titleSmall)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.bottom, 20)
.accessibilityIdentifier("welcome_back_text")

Text(AuthLocalization.SignIn.emailOrUsername)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.accessibilityIdentifier("username_text")
TextField(AuthLocalization.SignIn.emailOrUsername, text: $email)
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.textPrimary)
.keyboardType(.emailAddress)
.textContentType(.emailAddress)
.autocapitalization(.none)
.autocorrectionDisabled()
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
)
.accessibilityIdentifier("username_textfield")

Text(AuthLocalization.SignIn.password)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.top, 18)
.accessibilityIdentifier("password_text")
SecureField(AuthLocalization.SignIn.password, text: $password)
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.textPrimary)
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
)
.accessibilityIdentifier("password_textfield")
HStack {
if !viewModel.config.features.startupScreenEnabled {
Button(CoreLocalization.SignIn.registerBtn) {
viewModel.router.showRegisterScreen(sourceScreen: viewModel.sourceScreen)
}
.foregroundColor(Theme.Colors.accentColor)
.accessibilityIdentifier("register_button")

Spacer()
}
.foregroundColor(Theme.Colors.accentColor)
.accessibilityIdentifier("register_button")

Spacer()
Button(AuthLocalization.SignIn.forgotPassBtn) {
viewModel.trackForgotPasswordClicked()
viewModel.router.showForgotPasswordScreen()
}
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.accentXColor)
.padding(.top, 0)
.accessibilityIdentifier("forgot_password_button")
}

Button(AuthLocalization.SignIn.forgotPassBtn) {
viewModel.trackForgotPasswordClicked()
viewModel.router.showForgotPasswordScreen()

if viewModel.isShowProgress {
HStack(alignment: .center) {
ProgressBar(size: 40, lineWidth: 8)
.padding(20)
.accessibilityIdentifier("progressbar")
}.frame(maxWidth: .infinity)
} else {
StyledButton(CoreLocalization.SignIn.logInBtn) {
Task {
await viewModel.login(username: email, password: password)
}
}
.frame(maxWidth: .infinity)
.padding(.top, 40)
.accessibilityIdentifier("signin_button")
}
.font(Theme.Fonts.bodyLarge)
.foregroundColor(Theme.Colors.accentXColor)
.padding(.top, 0)
.accessibilityIdentifier("forgot_password_button")
}

if viewModel.isShowProgress {
HStack(alignment: .center) {
ProgressBar(size: 40, lineWidth: 8)
.padding(20)
.accessibilityIdentifier("progressbar")
}.frame(maxWidth: .infinity)
} else {
StyledButton(CoreLocalization.SignIn.logInBtn) {
Task {
await viewModel.login(username: email, password: password)
if viewModel.socialAuthEnabled {
SocialAuthView(
viewModel: .init(
config: viewModel.config
) { result in
Task { await viewModel.login(with: result) }
}
}
.frame(maxWidth: .infinity)
.padding(.top, 40)
.accessibilityIdentifier("signin_button")
)
}
agreements
Spacer()
}
if viewModel.socialAuthEnabled {
SocialAuthView(
viewModel: .init(
config: viewModel.config
) { result in
Task { await viewModel.login(with: result) }
}
)
}
agreements
Spacer()
.padding(.horizontal, 24)
.padding(.top, 50)
.frameLimit(width: proxy.size.width)
}
.padding(.horizontal, 24)
.padding(.top, 50)
}.roundedBackground(Theme.Colors.loginBackground)
.roundedBackground(Theme.Colors.loginBackground)
.scrollAvoidKeyboard(dismissKeyboardByTap: true)

}
}

// MARK: - Alert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public struct SignUpView: View {
}
.padding(.horizontal, 24)
.padding(.top, 24)

.frameLimit(width: proxy.size.width)
}
.roundedBackground(Theme.Colors.background)
.onRightSwipeGesture {
Expand Down
Loading

0 comments on commit 2de1bc5

Please sign in to comment.