Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"localizable" : true
},
"symbols" : [
{
"filename" : "square.and.arrow.top.right.svg",
"idiom" : "universal",
"language-direction" : "left-to-right"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "عرض الملف الشخصي ←";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "عرض الملف الشخصي";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "اسمك";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Profil anzeigen →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Profil anzeigen";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Dein Name";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "View profile →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "View profile";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Your Name";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Ver perfil →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Ver perfil";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Tu nombre";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Afficher le profil →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Afficher le profil";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Votre Nom";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/he.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "להצגת הפרופיל ←";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "להצגת הפרופיל";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "השם שלך";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Lihat profil →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Lihat profil";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Nama Anda";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Visualizza profilo →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Visualizza profilo";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Il tuo nome";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "プロフィールを表示→";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "プロフィールを表示";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "あなたの名前";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "프로필 보기 →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "프로필 보기";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "이름";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Profiel bekijken →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Profiel bekijken";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Je naam";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Visualizar perfil →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Visualizar perfil";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Seu nome";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Просмотреть профиль →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Просмотреть профиль";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Ваше имя";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Visa profil →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Visa profil";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "Ditt namn";

Expand Down
3 changes: 3 additions & 0 deletions Sources/GravatarUI/Resources/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "Profili görüntüle →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "Profili görüntüle";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "İsminiz";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "查看个人资料 →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "查看个人资料";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "您的姓名";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
/* Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view */
"AvatarPickerProfile.Button.ViewProfile.title" = "檢視個人檔案 →";

/* Title of a button that will take you to your Gravatar profile */
"Profile.Button.ViewProfile.title" = "檢視個人檔案";

/* Placeholder text for the name field */
"AvatarPickerProfile.Name.placeholder" = "你的姓名";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ struct AvatarPickerProfileView<AccessoryView>: View where AccessoryView: View {
if let details = model.profileDetails {
secondaryText(text: details)
}
Button(Localized.viewProfileButtonTitle) {
Button {
viewProfileAction?()
} label: {
HStack(spacing: .DS.Padding.half) {
Text(Localized.viewProfileButtonTitle)
Image("square.and.arrow.top.right", bundle: .module)
}
}
.font(.footnote)
.foregroundColor(Color(UIColor.label))
Expand Down Expand Up @@ -155,9 +160,9 @@ private enum Constants {

private enum Localized {
static let viewProfileButtonTitle = SDKLocalizedString(
"AvatarPickerProfile.Button.ViewProfile.title",
value: "View profile",
comment: "Title of a button that will take you to your Gravatar profile, with an arrow indicating that this action will cause you to leave this view"
"Profile.Button.ViewProfile.title",
value: "View profile",
comment: "Title of a button that will take you to your Gravatar profile"
)
static let namePlaceholder = SDKLocalizedString(
"AvatarPickerProfile.Name.placeholder",
Expand Down
14 changes: 11 additions & 3 deletions Sources/GravatarUI/SwiftUI/ProfileEditor/QuickEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct QuickEditor<ImageEditor: ImageEditorView>: View {
@Environment(\.oauthSession) private var oauthSession
@Environment(\.colorScheme) var colorScheme: ColorScheme
@Environment(\.verticalSizeClass) var vertcalSizeClass
@Environment(\.dynamicTypeSize) var dynamicTypeSize

@AppStorage("QuickEditor.startOAuthOnAppear") private var startOAuthOnAppear: Bool = false
@State private var fetchedToken: String?
Expand Down Expand Up @@ -230,15 +231,22 @@ struct QuickEditor<ImageEditor: ImageEditorView>: View {
let screenHeight = UIScreen.main.bounds.height
let iPhoneSE3rdGenScreenHeight: CGFloat = 667

return (vertcalSizeClass == .compact || screenHeight <= iPhoneSE3rdGenScreenHeight) && model.isKeyboardPresented
return model.isKeyboardPresented && (
vertcalSizeClass == .compact ||
screenHeight <= iPhoneSE3rdGenScreenHeight ||
dynamicTypeSize >= .accessibility3
)
}

@ViewBuilder
func profileCardHeaderView() -> some View {
if !shouldHideProfileCardHeader {
EmailText(email: model.email)
.accumulateIntrinsicHeight()
if fetchedToken != nil {
EmailText(email: model.email)
.accumulateIntrinsicHeight()
}
profileView()
.dynamicTypeSize(...DynamicTypeSize.xxxLarge)
.accumulateIntrinsicHeight()
} else {
EmptyView()
Expand Down
6 changes: 1 addition & 5 deletions Sources/GravatarUI/SwiftUI/QEDetent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ enum QEDetent {
case .avatarPicker:
.init([.height(intrinsicHeight)])
case .aboutEditor:
if intrinsicHeight >= QEModalPresentationConstants.bottomSheetEstimatedHeight {
.init([.height(QEModalPresentationConstants.bottomSheetEstimatedHeight), .large])
} else {
.init([.height(intrinsicHeight)])
}
.init([.height(intrinsicHeight)])
}
}
case .vertical(let presentationStyle):
Expand Down
2 changes: 1 addition & 1 deletion Tests/GravatarUITests/AboutEditorViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ struct AboutEditorViewTests {
await testModel.fetchProfile()
}
// Awaits for the previous task to start executing, and the view to start loading.
try await Task.sleep(nanoseconds: 10)
try await Task.sleep(nanoseconds: 20)
assertSnapshots(
of: view,
as: [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.