🚀 1.0.0-beta #3
Replies: 11 comments 1 reply
-
NOTICEPlease let me know your issues freely! |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.1 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.0...1.0.0-beta.1 |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.2 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.1...1.0.0-beta.2 How to show message menu on long press gestureYou can add message menus to display when a
MessageList(messages) { message in
// row content
MessageRow(message: message)
.padding(.top, 12)
} menuContent: { highlightMessage in
// menu content
MessageMenu {
Button("Copy", action: copy)
.buttonStyle(MessageMenuButtonStyle(symbol: "doc.on.doc"))
Divider()
Button("Reply", action: reply)
.buttonStyle(MessageMenuButtonStyle(symbol: "arrowshape.turn.up.right"))
Divider()
Button("Delete", action: delete)
.buttonStyle(MessageMenuButtonStyle(symbol: "trash"))
}
.padding(.top, 12)
} |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.3 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.2...1.0.0-beta.3 |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.4 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.3...1.0.0-beta.4 |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.5 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.4...1.0.0-beta.5 Implementation GuideMessageList(message)
.onReceive(highlightMessagePublisher) { highlightMessage in
withAnimation {
self.highlightMessage = highlightMessage as? Message
}
}
if highlightMessage == nil {
MessageField { messageStyle in
print(messageStyle)
}
} |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.6 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.5...1.0.0-beta.6 Supports line limit in Here is an example usage: MessageList(messages) { message
// rowContent
MessageRow(message: message, lineLimit: 10) // 🌟 set `lineLimit`. The default is `nil` which means unlimited
.padding(.top, 12)
}
MessageField(characterLimit: 300) { messageStyle in // 🌟 set `characterLimit`. The default is `nil` which means unlimited
// send message...
} Additional Information💡 It is not necessary to use
MessageList(messages) { message in
HStack(alignment: .top, spacing: 8) {
AsyncImage(url: message.sender.imageURL) { image in
image
.resizable()
.messageStyle(.senderProfile)
} placeholder: {
Image(systemName: "person.crop.circle.fill")
.resizable()
.messageStyle(.senderProfile)
.foregroundColor(appearance.secondary)
}
VStack(alignment: .leading, spacing: 8) {
switch style {
case .text(let text):
let markdown = LocalizedStringKey(text)
Text(markdown)
.fixedSize(horizontal: false, vertical: true) // or use `.lineLimit(nil`
.tint(isMyMessage ? appearance.prominentLink : appearance.link)
.messageStyle(isMyMessage ? .localBody({LINE.LIMIT}) : .remoteBody({LINE.LIMIT}))
default:
Text("Not supported format")
}
Text(Date(timeIntervalSince1970: message.sentAt), formatter: formatter)
.messageStyle(.date)
}
}
} |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.7 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.6...1.0.0-beta.7 |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.8 has been releasedWhat's Changed
Full Changelog: 1.0.0-beta.7...1.0.0-beta.8 |
Beta Was this translation helpful? Give feedback.
-
🚀 1.0.0-beta.9 has been releasedWhat's Changed
New Contributors
Full Changelog: 1.0.0-beta.8...1.0.0-beta.9 Example Usage - NextMessageField @State private var text: String = ""
NextMessageField(text) { messageStyle in
guard !text.isEmpty else { return }
viewModel.sendMessage($0)
text = ""
} leftLabel: {
HStack {
Button(aciton: showCamera) {
Image.camera.medium
}
.frame(width: 36, height: 36)
Button(action: showLibrary) {
Image.photoLibrary.medium
}
.frame(width: 36, height: 36)
} rightLabel: {
Button {
// send message by using `sendMessagePublisher`. This will invoke `onSend` handler.
sendMessagePublisher.send(.text(text))
} label: {
// send button icon
Image.send.medium
}
.frame(width: 36, height: 36)
} Example Usage - GiphyConfigurationlet giphyConfig = GiphyConfiguration(
dimBackground: true,
presentationDetents = 0.7
)
let chatConfig = ChatConfiguration(
userID: "{USER.ID}",
giphyKey: "{YOUR.GIPHY.KEY}",
giphyConfig: giphyConfig
)
// ...
ChatView()
.environmentObject(chatConfig) Notice
|
Beta Was this translation helpful? Give feedback.
-
Cheers for your work on this, it's a great framework, thanks for getting the release out :) |
Beta Was this translation helpful? Give feedback.
-
What's New
Essentials
/Sources/Previews
/Documentation
New Contributors
Full Changelog: https://github.com/jaesung-0o0/ChatUI/commits/1.0.0-beta.0
This discussion was created from the release 1.0.0-beta.0.
Beta Was this translation helpful? Give feedback.
All reactions