Skip to content
Open
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
44 changes: 16 additions & 28 deletions Sources/ExyteChat/Views/ChatView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public struct ChatView<MessageContent: View, InputViewContent: View, MenuAction:
}

var mainView: some View {
VStack {
VStack(spacing: 0) {
if showNetworkConnectionProblem, !networkMonitor.isConnected {
waitingForNetwork
}
Expand Down Expand Up @@ -301,14 +301,20 @@ public struct ChatView<MessageContent: View, InputViewContent: View, MenuAction:
Button {
NotificationCenter.default.post(name: .onScrollToBottom, object: nil)
} label: {
theme.images.scrollToBottom
.frame(width: 40, height: 40)
.circleBackground(theme.colors.messageFriendBG)
Image("CaretDown")
.renderingMode(.template)
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.foregroundStyle(theme.colors.sendButtonBackground)
.shadow(color: .primary.opacity(0.1), radius: 2, y: 1)
.frame(width: 40, height: 40)
.background(
Circle()
.fill(.ultraThinMaterial)
)
}
.padding(.trailing, MessageView.horizontalScreenEdgePadding)
.padding(.bottom, 8)
.padding(.trailing, MessageView.horizontalScreenEdgePadding + 4)
.padding(.bottom, 62) // Moved down from 72px to 62px (10px adjustment)
}
}

Expand Down Expand Up @@ -388,27 +394,9 @@ public struct ChatView<MessageContent: View, InputViewContent: View, MenuAction:
}

var inputView: some View {
Group {
if let inputViewBuilder = inputViewBuilder {
inputViewBuilder($inputViewModel.text, inputViewModel.attachments, inputViewModel.state, .message, inputViewModel.inputViewAction()) {
globalFocusState.focus = nil
}
} else {
InputView(
viewModel: inputViewModel,
inputFieldId: viewModel.inputFieldId,
style: .message,
availableInputs: availableInputs,
messageStyler: messageStyler,
recorderSettings: recorderSettings,
localization: localization
)
}
}
.sizeGetter($inputViewSize)
.environmentObject(globalFocusState)
.onAppear(perform: inputViewModel.onStart)
.onDisappear(perform: inputViewModel.onStop)
// Replace default input view with transparent spacer for custom input
Color.clear
.frame(height: 1)
}

func messageMenu(_ row: MessageRow) -> some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct MessageMenu<MainButton: View, ActionEnum: MessageMenuAction>: View {

/// The max height for the menu
/// - Note: menus that exceed this value will be placed in a ScrollView
let maxMenuHeight: CGFloat = 200
let maxMenuHeight: CGFloat = 350

/// The vertical spacing between the main three components in out VStack (ReactionSelection, Message and Menu)
let verticalSpacing:CGFloat = 0
Expand Down Expand Up @@ -530,17 +530,18 @@ struct MessageMenu<MainButton: View, ActionEnum: MessageMenuAction>: View {
HStack(spacing: 0) {
ZStack {
theme.colors.messageFriendBG
.cornerRadius(12)
.cornerRadius(16) // Increased from 12 to 16
HStack {
Text(title)
.font(.custom("SFProRounded-Semibold", size: 15))
.kerning(0.375) // 2.5% of 15
.foregroundColor(theme.colors.menuText)
Spacer()
icon
.renderingMode(.template)
.foregroundStyle(theme.colors.menuText)
}
.font(getFont)
.padding(.vertical, 11)
.padding(.vertical, 13) // Increased from 11 to 13 (20% taller)
.padding(.horizontal, 12)
}
.frame(width: 208)
Expand Down
8 changes: 4 additions & 4 deletions Sources/ExyteChat/Views/MessageView/MessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,19 @@ struct MessageView: View {
}
timeView
}
.padding(.vertical, 8)
.padding(.vertical, 6)
case .vstack:
VStack(alignment: .trailing, spacing: 4) {
messageView
timeView
}
.padding(.vertical, 8)
.padding(.vertical, 6)
case .overlay:
messageView
.padding(.vertical, 8)
.padding(.vertical, 6)
.overlay(alignment: .bottomTrailing) {
timeView
.padding(.vertical, 8)
.padding(.vertical, 6)
}
}
}
Expand Down
Loading