Improve UI interactions (#390)

- Increase tap target size for back button in private message view
- Limit @mentions autocomplete to top 4 matches for better usability

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2025-08-02 11:48:19 +02:00
committed by GitHub
co-authored by jack
parent 327fca9cb1
commit 3ed37dfd0b
+3 -1
View File
@@ -393,7 +393,7 @@ struct ContentView: View {
// @mentions autocomplete // @mentions autocomplete
if viewModel.showAutocomplete && !viewModel.autocompleteSuggestions.isEmpty { if viewModel.showAutocomplete && !viewModel.autocompleteSuggestions.isEmpty {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
ForEach(viewModel.autocompleteSuggestions, id: \.self) { suggestion in ForEach(Array(viewModel.autocompleteSuggestions.prefix(4)), id: \.self) { suggestion in
Button(action: { Button(action: {
_ = viewModel.completeNickname(suggestion, in: &messageText) _ = viewModel.completeNickname(suggestion, in: &messageText)
}) { }) {
@@ -1049,6 +1049,8 @@ struct ContentView: View {
Image(systemName: "chevron.left") Image(systemName: "chevron.left")
.font(.system(size: 12)) .font(.system(size: 12))
.foregroundColor(textColor) .foregroundColor(textColor)
.frame(width: 44, height: 44, alignment: .leading)
.contentShape(Rectangle())
} }
.buttonStyle(.plain) .buttonStyle(.plain)
.accessibilityLabel("Back to main chat") .accessibilityLabel("Back to main chat")