-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MessageKit v1 Vision #2
Comments
Regarding "Input Bar w/ Send & Attachment Buttons", I'm wondering if we should implement the "attachment" functionality into this lib (assuming it would open the gallery for the user to select a photo/multiple photos). What if we didn't go with this assumption and let the developers implement it themselves? Maybe they don't want to have a button for attachments, but rather some other functionality (lets say to record a small voice chat message). Instead what we could do, is provide an easy way for devs to add their own custom buttons and their own custom code when the user taps on it. I'm just thinking about making MK as flexible and customisable as possible, without "hardcoding" too many things (like opening the photo gallery and dealing with the implementation, that should be up to the devs to handle it themselves imo). MK should just focus on the core UI for the actual Messages ViewController. Another thing I could think of is making the "Input Bar" changeable. We can provide a default implementation with a basic input bar and send button, but devs can easily "plug in" their own custom implementation of it (using protocols). They might want to have fancier animations (expand and shrink the input textfield based on whether or not it is focused etc). I don't know, it's open for discussion. Maybe I'm just over-complicating things here. :) I would definitely be for writing tests from the very beginning. 👍 I would also like to avoid the Massive View Controller approach that JSQMessagesViewController took and break things down into smaller, maintainable classes. @jessesquires I remember reading a few times that you wanted to update the architecture of JSQMVC eventually but never got around to it. Did you ever start with that? I guess what I'm asking is did you ever start thinking about how you'd break the huge VC down into smaller pieces? If so, it would be great if you could share your thoughts about it. :) |
@jyounus We have to start with something small and then add features from there. Just like Rome, JSQMVC wasn't built in one day 😂
Two more things:
|
|
@ay5000 Thanks for bringing up the issue of treating cells as sections instead of items. These are just the things I'm looking for. I'm not familiar with message clustering but it's something we can look at. I'm really interested in AsyncDisplayKit but I think this would have to be an opt in feature. The goal is to limit dependencies and keep the barrier to entry low. |
Do we want to force bubbles or should we allow for SlackTextViewController like cells? |
Major things to address from JSQMVC (some of these are noted above, but I'll reiterate):
Hope this helps! 😊 If anything is unclear, let me know! |
just discovered this, which might be of interest: https://github.com/darrarski/Messages-iOS |
@jessesquires This is some priceless advice 👏 👍 I'm good on every point but just a bit lost on having the 2 dataSource and 2 delegate protocols. I'm also not familiar with IGListKit... yet 😅 @efremidze I don't want to force anything. We can default to bubbles for nostalgic reasons, but the user should be able to override as much as possible. |
@SD10 so you would have: var messagesDataSource: MessagesDataSource
var messagesDelegate: MessagesDelegate
var dataSource: UICollectionViewDataSource
var delegate: UICollectionViewDelegate i.e., keep them all separate. Which reminds me, I'd strongly recommend using |
Guys this is awesome! I actually made my own MessagesKit Project but I think you have a good thing going here and would love to be apart of it. I have spent the last 2 years working with Often times this is the first framework that people will use to get into development on
I would also purpose that we make it easy for people who would like to contribute to do so. Some guidelines and code standards would be nice to get in place now before too many things get started. I would go so far as to suggest that
becomes
because that is the bare minimum needed to do chat. |
@jessesquires Sorry, I guess I was more concerned about the two sets of protocols and their relationships. It looks like we would default to calling public protocol MessagesDataSource {
func messageForItem(at indexPath: IndexPath, in collectionView: UICollectionView) -> MessageType
}
extension MessagesViewController: UICollectionViewDataSource {
collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let messageType = messagesViewControllerDataSource.messageForItem(at: indexPath, in: collectionView)
// configure and return MessagesCell based on message type
}
} The only question that ever really stuck out to me is why you made the design choice to have a |
@MacMeDan Welcome, we would love to have you! I completely agree with you on ease of use. JSQMVC was the 2nd third party library I ever used 😃. Starter tasks, task outlines, code standards. These are all important to me as well. I think shipping a basic v1 will set some standards and make it easier for others to contribute. It's easier to build features than the foundation. I definitely agree with your vision of dropping the attachment button for v1. It should be a barebones core of the project. As for making sure no one gets overloaded, this is open source, and while sometimes it may feel like a job for a maintainer -- ultimately the goal is to have fun. If anyone ever feels like too much is being asked of them, just say something 😃 |
This was to follow the principle of "sensible defaults, but customization hooks". If you never wanted to customize cells (beyond bubble color), you never had to touch that -- just return your models. 😄 |
What about the idea of populating the conversation tableview from the top? I imagine a pagination from bottom to top, but the problem with dynamic cells is to maintain the offset to the cell showed when the pagination starts. |
@jessesquires I am glad you like my work https://github.com/darrarski/Messages-iOS I created this project because I wanted a simple implementation of messages UI without reusing There are more things that need to be handled for a fully working MessageKit library. If you need my help, I will be happy to work on MessagesKit with you in my spare time. edit: |
Just a couple high level suggestions:
|
Hey, @SD10 what about a Slack channel for the MessageKit community? |
About slack channel see #6 |
I feel like the scope for v1, included in the first post in this thread is pretty great. It has all the basic functionalities needed to get the project running, and other stuff can be easily build off that. For the level of customization for the first version, I can think of colors, paddings, margins, corner radius, and borders of message bubbles, and conversation background. |
Edit: Unfortunately due to the decisions to drop Objective-C compatibility, I can't justify my (or my company's) time contributing to this project. Wishing good luck to all involved. |
@mszaro I'm sorry but I don't think Obj-C friendly APIs will be a core goal of this project. For those who need an Obj-C messaging library, JSQMessagesViewController will still be great for a long time to come. The goal is to write this project with an idiomatic Swift API. That being said, this is a community and I'm open to discussion. It's just low priority for me right now. |
Just to carryover my comments from #1 into this issue so it is properly accounted for here since not everyone reads every comment on issues. I am in complete agreement with @SD10 about making this 100% focused on Swift and not Objective-C. Every discussion on these issues is about JSQ. Sure, that is a prime inspirational basis for this project, but does that mean we let the muse dictate the future instead of the artists? We need to ask ourselves: what would a luddite do? Then go with the opposite. |
Just a few more things to go for
|
@SD10 you don't have to manage input bar's layout manually. You can add it to view controller as a input accessory view. It will stick to the keyboard as in stock Messages app. You can check my example implementation. |
@darrarski interesting 👍 but you don't seem to have the input bar pinned to the bottom of the |
@SD10 that's correct. I didn't added it as a subview to view controller's view. If you use it as a input accessory view, it will appear just like in Messages app. I think this is the best way to achieve correct behavior of the input field. |
@darrarski wow I'm behind the times 😅 thanks for the tip! |
Thank you everyone for your suggestions ❤️ |
Fix can’t detect messageLabel gesture in template cell
I'll put together a Vision.md but for now here are some basic thoughts for v1.
Basic Features
Other thoughts
Feel free to discuss any thoughts on:
Please use bullet points to make things easier to digest
The text was updated successfully, but these errors were encountered: