Skip to content

feat(signUp) add sign up using link - #31

Open
d0qew wants to merge 10 commits into
friendly-social:mainfrom
d0qew:feature/add-sign-up-using-link
Open

feat(signUp) add sign up using link#31
d0qew wants to merge 10 commits into
friendly-social:mainfrom
d0qew:feature/add-sign-up-using-link

Conversation

@d0qew

@d0qew d0qew commented Jun 30, 2026

Copy link
Copy Markdown

issue

Additionally

I made a few small improvements as part of this PR:

  • Moved the Localizable.xcstrings string catalog into the Resources directory, as it is a resource.
  • Removed unused localizations from the string catalog.
  • Fixed the layout of the ScanView on iPad. Previously, the view was displayed in the sidebar and stretched across the full width of the screen.

Attachments

phone
Light Dark
Light Dark
pad
Light Dark
Simulator Screenshot - iPad Pro 13-inch (M5) - 2026-06-30 at 21 13 55 Simulator Screenshot - iPad Pro 13-inch (M5) - 2026-06-30 at 21 13 59

@d0qew

d0qew commented Jun 30, 2026

Copy link
Copy Markdown
Author

fyi @alex-npmn @ckost9n

For some reason, I can't assign reviewers to this PR, so I'll just ping you here 🙂 I'd really appreciate your feedback whenever you get a chance. ty

set: { if !$0 { viewModel.alert = nil } },
),
actions: {
Button("scan_enter_error_alert_button_okay", role: .cancel) {

@alex-npmn alex-npmn Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use button init with LocalizedStringResource

}
},
message: {
Text(viewModel.alert?.message ?? String(localized: "error_base_message"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe its better to set error message in view model, avoiding nil coalescing here and show Text only if error message is not nil

Comment on lines +83 to +86
Image(systemName: "qrcode.viewfinder")
.font(.system(size: 56))
.padding(.bottom, 8)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract it as private property inside view and use here, there is an example in last merged pr

Comment on lines +87 to +90
Text("scan_enter_info_title")
.font(.title3)
.multilineTextAlignment(.center)
.padding(.horizontal, 16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment on lines +93 to +97
Text("scan_enter_info_subtitle")
.font(.subheadline)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 16)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment on lines +101 to +114
HStack {
Image(systemName: "link")
.foregroundStyle(.secondary)

TextField("invite_link", text: $viewModel.inviteLinkText)
.focused($isLinkTextFieldFocused)
.font(.body)
.frame(maxWidth: .infinity)
.keyboardType(.URL)
.autocorrectionDisabled()
.autocapitalization(.none)
.onSubmit { viewModel.handleEnteredInviteLinkText() }
.overlay(alignment: .trailing) {
if viewModel.inviteLinkText.isEmpty {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

.padding(.trailing, 8)
}
}
.onTapGesture { isLinkTextFieldFocused = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look strange

Comment on lines +131 to +141
Button {
viewModel.openScanner()
} label: {
Text("scan_enter_open_scanner")
.font(.headline)
.frame(maxWidth: .infinity)
.padding()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.glassProminent)
.padding(.horizontal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to private property

matching: .images,
photoLibrary: .shared()
) {
Text("scan_enter_open_photo_scanner")

@alex-npmn alex-npmn Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use LocalizedStringResource init

Comment on lines +169 to +170
title: String(localized: "scan_enter_error_alert_title_default"),
message: String(localized: "scan_enter_photo_invalid_image"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LocalizedStringResource

Comment on lines +19 to +20
let title: String
let message: String?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let title: String
let message: String?
let title: LocalizedStringResource
let message: LocalizedStringResource?

@d0qew
d0qew requested a review from alex-npmn June 30, 2026 20:28
),
actions: {
Button(
LocalizedStringResource("scan_enter_error_alert_button_okay"),

@alex-npmn alex-npmn Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has built in codegen for LocalizedStringResource,

so your code should look like this

      Button(.scanEnterErrorAlertButtonOkay, role: .cancel) {
        viewModel.resetState()
      }

here and at all the rest of branch, please check it, at least just run claude code to fix it

@alex-npmn alex-npmn Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for texts and the most amount of swiftUI views, they have LocalizedStringResource init

@d0qew
d0qew requested a review from alex-npmn July 2, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants