Skip to content
Draft
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
2 changes: 1 addition & 1 deletion Flinky.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/getsentry/sentry-cocoa";
requirement = {
branch = main;
branch = "philprime/feedback-show-form-button";
kind = branch;
};
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Targets/App/Sources/Generated/L10n.swift
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ internal enum L10n {
internal static let label = L10n.tr("shared.button.edit.accessibility.label", fallback: "Edit")
}
}
internal enum Feedback {
/// Send Feedback
internal static let label = L10n.tr("shared.button.feedback.label", fallback: "Send Feedback")
internal enum Accessibility {
/// Send feedback to help improve the app
internal static let hint = L10n.tr("shared.button.feedback.accessibility.hint", fallback: "Send feedback to help improve the app")
/// Send Feedback
internal static let label = L10n.tr("shared.button.feedback.accessibility.label", fallback: "Send Feedback")
}
}
internal enum NewLink {
internal enum Accessibility {
/// Create a new link in this list
Expand Down
36 changes: 36 additions & 0 deletions Targets/App/Sources/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,42 @@
}
}
},
"shared.button.feedback.accessibility.hint": {
"comment": "Feedback button accessibility hint",
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Send feedback to help improve the app"
}
}
}
},
"shared.button.feedback.accessibility.label": {
"comment": "Feedback button accessibility label",
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Send Feedback"
}
}
}
},
"shared.button.feedback.label": {
"comment": "Feedback button text",
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Send Feedback"
}
}
}
},
"shared.color-picker.accessibility.label": {
"comment": "Color picker accessibility label",
"extractionState": "manual",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import SwiftUI
import SFSafeSymbols
import Sentry

struct CreateLinkEditorRenderView: View {
private enum CreateField {
Expand Down Expand Up @@ -55,6 +57,16 @@
.accessibilityHint(L10n.Shared.Button.Cancel.Accessibility.hint)
.accessibilityIdentifier("create-link.cancel.button")
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
SentrySDK.feedback.showForm()

Check failure on line 62 in Targets/App/Sources/UI/CreateLinkEditor/CreateLinkEditorRenderView.swift

View workflow job for this annotation

GitHub Actions / Test

value of type 'SentryFeedbackAPI' has no member 'showForm'

Check failure on line 62 in Targets/App/Sources/UI/CreateLinkEditor/CreateLinkEditorRenderView.swift

View workflow job for this annotation

GitHub Actions / Test UI

value of type 'SentryFeedbackAPI' has no member 'showForm'
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("create-link.feedback.button")
}
ToolbarItem(placement: .confirmationAction) {
if #available(iOS 26, *) {
Button(role: .confirm) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import SFSafeSymbols
import Sentry
import SwiftUI

struct CreateLinkListEditorRenderView: View {
Expand Down Expand Up @@ -27,6 +29,16 @@
.navigationTitle(L10n.CreateList.title)
.accessibilityIdentifier("create-link-list.container")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
SentrySDK.feedback.showForm()

Check failure on line 34 in Targets/App/Sources/UI/CreateListEditor/CreateLinkListEditorRenderView.swift

View workflow job for this annotation

GitHub Actions / Test

value of type 'SentryFeedbackAPI' has no member 'showForm'

Check failure on line 34 in Targets/App/Sources/UI/CreateListEditor/CreateLinkListEditorRenderView.swift

View workflow job for this annotation

GitHub Actions / Test UI

value of type 'SentryFeedbackAPI' has no member 'showForm'
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("create-link-list.feedback.button")
}
ToolbarItem(placement: .cancellationAction) {
Button(role: .cancel) {
dismiss()
Expand Down
10 changes: 10 additions & 0 deletions Targets/App/Sources/UI/LinkDetail/LinkDetailRenderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
}
.background(Color(UIColor.systemGroupedBackground))
.toolbar {
ToolbarItemGroup(placement: .topBarLeading) {
Button(action: {
SentrySDK.feedback.showForm()

Check failure on line 37 in Targets/App/Sources/UI/LinkDetail/LinkDetailRenderView.swift

View workflow job for this annotation

GitHub Actions / Test

value of type 'SentryFeedbackAPI' has no member 'showForm'

Check failure on line 37 in Targets/App/Sources/UI/LinkDetail/LinkDetailRenderView.swift

View workflow job for this annotation

GitHub Actions / Test UI

value of type 'SentryFeedbackAPI' has no member 'showForm'
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("link-detail.feedback.button")
}
ToolbarItemGroup(placement: .topBarLeading) {
Menu {
Button {
Expand Down
17 changes: 14 additions & 3 deletions Targets/App/Sources/UI/LinkInfo/LinkInfoRenderView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FlinkyCore
import SFSafeSymbols
import Sentry
import SwiftUI

struct LinkInfoRenderView: View {
Expand Down Expand Up @@ -34,6 +35,16 @@ struct LinkInfoRenderView: View {
.accessibilityHint(L10n.Shared.Button.Cancel.Accessibility.hint)
.accessibilityIdentifier("link-info.cancel.button")
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
SentrySDK.feedback.showForm()
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("link-info.feedback.button")
}
if #available(iOS 26, *) {
ToolbarItem(placement: .confirmationAction) {
Button(role: .confirm) {
Expand Down Expand Up @@ -171,16 +182,16 @@ extension LinkInfoRenderView {
.font(.system(size: 22, weight: .medium))
.foregroundStyle(
symbol.isEmoji
? Color.blue
: (colorScheme == .light ? Color.gray.mix(with: Color.black, by: 0.3) : Color.gray)
? Color.blue
: (colorScheme == .light ? Color.gray.mix(with: Color.black, by: 0.3) : Color.gray)
)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding(6)
.aspectRatio(1, contentMode: .fill)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(
symbol.isEmoji
? Color.blue.opacity(0.15) : Color.gray.opacity(colorScheme == .light ? 0.1 : 0.2)
? Color.blue.opacity(0.15) : Color.gray.opacity(colorScheme == .light ? 0.1 : 0.2)
)
.clipShape(Circle())
.contentShape(Circle())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import SFSafeSymbols
import Sentry
import SwiftUI

struct LinkListDetailRenderView: View {
Expand Down Expand Up @@ -29,6 +30,16 @@ struct LinkListDetailRenderView: View {
ToolbarItem(placement: .navigationBarTrailing) {
moreMenu
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
SentrySDK.feedback.presentUI()
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("link-list-detail.feedback.button")
}
if #available(iOS 26, *) {
ToolbarItem(placement: .bottomBar) {
Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ struct LinkListsContainerView: View {
}
}
.sentryTrace("LINK_LISTS_VIEW")
.onAppear {
// Auto-injecting Sentry feedback widget is currently not supported in SwiftUI.
// Therefore we manually trigger it when the view appears.
SentrySDK.feedback.showWidget()
}
}

var pinnedListDisplayItems: [LinkListsDisplayItem] {
Expand Down
11 changes: 11 additions & 0 deletions Targets/App/Sources/UI/LinkLists/LinkListsRenderView.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import SFSafeSymbols
import Sentry
import SwiftUI

struct LinkListsRenderView<Destination: View>: View {
Expand Down Expand Up @@ -95,6 +96,16 @@ struct LinkListsRenderView<Destination: View>: View {
.accessibilityIdentifier("link-lists.create-link.button")
}
}
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
SentrySDK.feedback.presentUI()
}, label: {
Label(L10n.Shared.Button.Feedback.label, systemSymbol: .megaphone)
})
.accessibilityLabel(L10n.Shared.Button.Feedback.Accessibility.label)
.accessibilityHint(L10n.Shared.Button.Feedback.Accessibility.hint)
.accessibilityIdentifier("link-lists.feedback.button")
}
ToolbarItem(placement: .topBarTrailing) {
Button(
action: {
Expand Down
Loading