Skip to content

Latest commit

 

History

History
672 lines (434 loc) · 39.3 KB

CHANGELOG.md

File metadata and controls

672 lines (434 loc) · 39.3 KB

CHANGELOG

The changelog for MessageKit. Also see the releases on GitHub.


Changed

  • Breaking Change Updated codebase to Swift 4.2 #883 by @nathantannar4

  • Fixed the way that the Strings and UIImages are parsed in the InputTextView to prevent crashes in parseForComponents(). #791 by @nathantannar4

Added

  • Added support for detection and handling of NSLinks inside of messages. #815 by @jnic

  • Added customizable accessoryView, with a new MessagesDisplayDelegate function configureAccessoryView, and corresponding size & padding properties in MessageSizeCalculator. The accessoryView is aligned to the center of the messageContainerView. #710 by @hyouuu

  • Added a tap gesture recognition to the accessoryView which calls the MessageCellDelagate function didTapAccessoryView(in:). #834 by @nathantannar4

  • Added additionalBottomInset property that allows to adjust the bottom content inset automatically set on the messages collection view by the view controller. #787 by @andreyvit

Fixed

  • Breaking Change Fixed typo of scrollsToBottomOnKeybordBeginsEditing to scrollsToBottomOnKeyboardBeginsEditing. #856 by @p-petrenko

  • Fixed a bug that prevented MessageLabel from laying out properly when contained by superviews using autolayout. #889 by @marius-serban.

  • Fixed bottom content inset adjustment when using an undocked keyboard on iPad, or when edgesForExtendedLayout does not include .top, or when a parent container view controller adds extra views at the top of the screen. #787 by @andreyvit

  • Fixed the MessageData.emoji case to use 2x the messageLabelFont size by default. #795 by @Vortec4800.

Fixed

  • Fixed MessagesCollectionView to allow to use nibs with MessageReusableView. #832 by @maxxx777.

  • Fixed multiple crashes at views, when views are being called from another XIB. #905 by @talanov.

  • First major release.

Changed

  • Relaxed the settable requirement for the LocationItem and MediaItem protocols. #727 by @SD10.

Fixed

  • Fixed MessageContentCell's subviews frame when size equal to .zero. #716 by @zhongwuzw.

  • Fixed MessagesCollectionView's bottom inset when hardware keyboard is connected. Do not adjust MessagesCollection's inset when being popped. #707 by @zhongwuzw.

  • Fixed LabelAlignment initializer which has default internal access control. #705 by @zhongwuzw.

Added

  • Added convenience method to set properties for all MessageSizeCalculators. #697 by @zhongwuzw.

Added

  • Breaking Change Added new MessagesDataSource delegate methods, numberOfSections(in) and numberOfItems(inSection:in). #601 by @SD10, @zhongwuzw.

  • Breaking Change Added new protocol MediaItem as the associated value for the MessageData.video and MessageData.photo cases. #587 by @SD10.

  • Breaking Change Added new protocol LocationItem as the associated value for the MessageData.location case. #587 by @SD10.

  • Breaking Change Added new DetectorType called .transitInformation to message label. #520 by @nosarj.

  • Breaking Change Added .custom(Any?) case to MessageData. #498 by @SD10.

  • Breaking Change Added .messageLabelTop case to AvatarPosition.Vertical enum. #596 by @zhongwuzw

  • Added CellSizeCalculator protocol that is responsible for sizing and configuring attributes of a MessageCollectionViewCell. #579 by @SD10.

  • Added MessageSizeCalculator, MediaMessageSizeCalculator, TextMessageSizeCalculator, and LocationMessageSizeCalculator classes that are responsible for sizing the MessagesCollectionViewCell types provided by MessageKit. #579 by @SD10.

  • Added three new methods cellTopLabelHeight(for:at:in), messageTopLabelHeight(for:at:in), and messageBottomLabelHeight(for:at:in) to MessagesLayoutDelegate. #580 by @SD10.

  • Added new class InsetLabel. #580 by @SD10.

  • Added new method configureMediaMessageImageView(_:for:at:in) to configure the UIImageView of a MediaMessageCell asynchronously. #592 by @zhongwuzw, @SD10

  • Added new MessageContentCell class and MessageReusableView class. #596 by @SD10.

Changed

  • Breaking Change Renamed MessageData enum to MessageKind and changed MessageType's data property name to kind. #658 by @zhongwuzw.

  • Breaking Change Changed the messageFooterView(for:in) and messageHeaderView(for:in) methods of MessagesDisplayDelegate by removing the message parameter. #615 by @SD10.

  • Breaking Change Changed the footerViewSize(for:in) and headerViewSize(for:in) methods of MessagesLayoutDelegate by removing the MessageType and IndexPath parameters and replacing them with a new section: Int parameter. #615 by @SD10.

  • Breaking Change The reuse identifiers of all MessageReusableViews and MessageCollectionViewCells have been changed to match their class name exactly. #615 by @SD10.

  • Breaking Change MessageHeaderView and MessageFooterView now subclass MessageReusableView class. #596 by @SD10.

  • Breaking Change Renamed MessageCollectionViewCell to MessageContentCell. The MessageCollectionViewCell class is now a bare bones subclass. #596 by @SD10.

  • Breaking Change Changed LabelAlignment to be a struct with properties of textAlignment: NSTextAlignment and textInsets: UIEdgeInsets to position the text in the cellTopLabel and cellBottomLabel. #580 by @SD10.

  • Breaking Change The type of cellTopLabel and cellBottomLabel has been changed to InsetLabel. #580 by @SD10.

  • Breaking Change Renamed cellTopLabel to messageTopLabel and renamed cellBottomLabel to messageBottomLabel. #659 by @SD10.

  • Breaking Change Renamed the didTapTopLabel and didTapBottomLabel methods of MessageCellDelegate to didTapMessageTopLabel and didTapMessageBottomLabel. #659 by @SD10.

  • Breaking Change Renamed cellBottomLabelAttributedText method of MessagesDataSource to messageBottomLabelAttributedText. #659 by @zhongwuzw.

  • The MessageData.emoji case no longer uses a default font of 2x the messageLabelFont size. You must now set this font explicitly through the emojiMessageSizeCalculator on MessagesCollectionViewFlowLayout. #530 by @SD10.

  • Changed the contentMode of the UIImageView for MediaMessageCell to be .scaleAspectFill. #587 by @SD10.

  • The result of the MessagesDisplayDelegate method textColor(for message:...) no longer applies to .attributedText case of MessageData. #625 by @cwalo.

  • Removed the explicit height constraint from the separatorLine in MessageInputBar. #667 by @zhongwuzw

Removed

  • Breaking Change Removed NSLayoutConstraintSet by changing access control from public to internal. #607 by @zhongwuzw.

  • Breaking Change Removed the showsDateHeaderAfterTimeInterval property of MessagesCollectionView. #615 by @SD10.

  • Breaking Change Removed the reuseIdentifer method from MessageCollectionViewCell, TextMessageCell, LocationMessageCell, MediaMessageCell, and MessageContentCell. #615 by @SD10.

  • Breaking Change Removed the CollectionViewReusable protocol. #615 by @SD10.

  • Breaking Change Removed MessageHeaderView and MessageFooterView in favor of MessageReusableView. #615 by @SD10.

  • Breaking Change Removed numberOfMessages(in) method of MessagesDataSource, instead please use numberOfSections(in) and numberOfItems(inSection:in). #601 by @SD10, @zhongwuzw.

  • Breaking Change Removed the messageLabelFont property from MessagesCollectionViewFlowLayout. You can now set this property through textMessageSizeCalculator property. #579 by @SD10.

  • Breaking Change Removed MessageDateHeaderView class in favor of using cellTopLabel. #659 by @zhongwuzw.

Fixed

Fixed

Fixed

  • Fixed bubbleTailOutline invalidation of message bubble. #633 by @zhongwuzw.

  • Fixed boundingRect(with:options:attributes:context) wrong size calculation when use some font, e.g. custom font. #645 by @zhongwuzw.

Fixed

  • Fixed font invalidation of attributedString in MessageLabel. #623 by @zhongwuzw.

Added

  • Added shouldManageSendButtonEnabledState to MessageInputBar to disable automatically managing MessageInputBar.sendButton's isEnabled state when text changes. (Default value is true). #530 by @clayellis.

Fixed

  • Fixed wrong separated components in messageInputBar. #577 by @zhongwuzw.

Fixed

  • Optimize collectionView scroll behavior when abruptly stops scrolling. #470 by @zhongwuzw.

  • Fixed messageInputBar sendButton not disabled in some situations. #475 by @zhongwuzw.

  • Fixed message bubble tail orientation invalidation in iOS9. #469 by @zhongwuzw.

Fixed

  • Fixed message rendering when MessagesViewController sliding back. #454 by @zhongwuzw.

  • Fixed iPhoneX MessageInputBar transparent bottom area when keyboardDismissMode is interactive. #425 by @zhongwuzw.

  • Fixed wrong contentInset calculation when navigationBar is hidden #444 by @zhongwuzw.

Added

  • Added configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) method in MessagesDisplayDelegate protocol to configure avatarView. #416 by @zhongwuzw.

  • Added copy support for image, text, and emoji messages. #418 by @zhongwuzw.

  • Added UIImage paste support to the InputTextView. Images can easily be accessed using the InputTextView.images property. See the example project for an updated use case.
    #423 by @nathantannar4.

Removed

  • Breaking Change Removed avatar(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) method of MessagesDataSource, use configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) instead. #416 by @zhongwuzw.

Changed

  • Breaking Change Moved the handleTapGesture(_ gesture: UIGestureRecognizer) method from MessagesCollectionViewCell to MessagesCollectionView. #417 by @zhongwuzw.

  • Breaking Change Changed AvatarView from type UIView to type UIImageView. #417 by @zhongwuzw.

Fixed

  • Fixed LocationMessageCell reuse bug, to avoid inconsistency when get capture image asynchronously. #428 by @zhongwuzw.

  • Fixed MessageLabel detector attributes not being applied due to early exit. #429 by @antoinelamy.

Added

  • Added reloadDataAndKeepOffset() method to MessagesCollectionView to maintain the current position when reloading data. #284 by @azurechen.

  • Added maintainPositionOnKeyboardFrameChanged: Bool property to maintain the current position of the MessagesCollectionView when the height of the MessageInputBar changes. #340 by @KEN-chan.

  • Added detectorAttributes(for:and:at:) method to MessagesDisplayDelegate allowing DetectorType attributes to be set outside of the cell. #397 by @SD10.

Fixed

  • Fixed indexPathForLastItem bug when numberOfSections equal to 1. #395 by @zhongwuzw.

  • Fixed scrollToBottom(animated:) not work in some situations. #395 by @zhongwuzw.

  • Fixed .attributedText(NSAttributedString) messages that were not using the textColor from the MessagesDisplayDelegate method. #414 by @SD10.

  • Fixed a bug where new messages using .attributedText(NSAttributedString) have the incorrect font. #412 by @SD10.

Changed

  • Breaking Change The MessageLabel properties addressAttributes, dateAttributes, phoneNumberAttributes, and urlAttributes are now read only. Please use setAttributes(_:detector:) to set these properties. #397 by @SD10.

  • Breaking Change Removed the generic constraint <ContentView: UIView> from MessageCollectionViewCell. #391 by @SD10.

  • Breaking Change The contentView property has been renamed to imageView for LocationMessageCell and MediaMessageCell and messageLabel for TextMessageCell. #391 by @SD10.

  • Breaking Change Changed the name of MessageInputBar's property maxHeight to maxTextViewHeight as the property is the max height the InputTextView can have, not the MessageInputBar itself. #380 by @nathantannar4.

  • Breaking Change Adds a new view contentView of type UIView to the MessageInputBar to hold the main subviews of the MessageInputBar. Reduces complexity of constraints for easier testing/debugging. #384 by @nathantannar4.

Removed

  • Breaking Change Removed scrollsToBottomOnFirstLayout flag of MessagesViewController. #395 by @zhongwuzw.

Added

  • Breaking Change Added a top InputStackView to MessageInputBar. This adds the addition of the .top case to InputStackView.Position. #320 by @nathantannar4.

  • Breaking Change Added AvatarPosition and avatarPosition(for:at:in) to configure an AvatarView's vertical and horizontal position in a MessageCollectionViewCell. #322 by @SD10.

  • Added shouldCacheLayoutAttributes(for:MessageType)-> Bool method to MessagesLayoutDelegate to manage whether a MessageType's layout information is cached or not. #364 by @SD10.

Changed

  • Breaking Change The cellTopLabel and cellBottomLabel properties of MessageCollectionViewCell are no longer typed as MessageLabel and are now regular UILabels. #355 by @SD10.

  • All DetectorTypes for MessageLabel are disabled by default. #356 by @SD10.

Fixed

  • Breaking Change Fixed all instances of misspelled inital property. Avatar.inital has changed to Avatar.initial and the initializer has changed from public init(image: UIImage? = nil, initals: String = "?") to public init(image: UIImage? = nil, initials: String = "?"). #298 by @sidmclaughlin.

  • Fixed MessageInputBar's translucent functionality. #348 by @zhongwuzw.

  • Fixes infinite loop when dismissing keyboard on iPhone X. #350 by @nathantannar4.

  • Fixed incorrect sizing of cellTopLabel and cellBottomLabel. #371 by @SD10.

Removed

  • Breaking Change Removed AvatarAlignment and avatarAlignment(for:at:in) delegate method in favor of new AvatarPosition representing both vertical and horizontal alignments. #322 by @SD10.

  • Breaking Change Removed the avatarAlwaysLeading and avatarAlwaysTrailing properties of `MessagesCollectionViewFlow$ #322 by @SD10.

  • Breaking Change Removed LocationMessageDisplayDelegate & TextMessageDisplayDelegate and moved their methods into the MessagesDisplayDelegate protocol. Removed LocationMessageLayoutDelegate & MediaMessageLayoutDelegate and moved their methods into the MessagesLayoutDelegate protocol. #363 by @SD10.

Fixed

  • Fixed contentInset.top adjustment of the MessagesCollectionView on iOS versions less than 11 where it was found that messages appeared under the navigation var #334 by @nathantannar4.

  • Fixed cellbottomLabel origin X for the .messageLeading alignment and origin Y so that the cellBottomLabel is always under the MessageContainerView. #326 by @SD10.

  • Fixed pixelation of AvatarView's placeholder text initials. #343 by @johnnyoin.

  • Fixed MessageLabel address detection handler. #341 by @zhongwuzw

  • Fixed crash for escaping block in InputBarItem’s setSize(newValue:animated) method. #342 by @zhongwuzw.

Fixed

  • Fixed a bug that caused a race condition to be met when invalidating the intrinsicContentSize of the MessageInputBar which froze the app during a "Select" or "Select All" long press #313 by @zhongwuzw.

  • Fixed a bug that the placeholderLabel subview of InputTextView leads to ambiguous content size because of uncorrect Auto Layout. #310 by @zhongwuzw.

  • Fixed a bug that the leftStackViewrightStackView subview of MessageInputBar leads to ambiguous Auto Layout issue because of typo. #311 by @zhongwuzw.

Changed

  • Changed InputStackView default alignment from .fill to .bottom. #311 by @zhongwuzw.

Added

  • Added removedCachedAttributes(for:MessageType), removeAllCachedAttributes(), and attributesCacheMaxSize to MessagesCollectionViewFlowLayout to manage the caching of layout information for messages. #263 by @SD10.

  • Created SeparatorLine and InputStackView as their own subclass of UIView and UIStackView respectively. This just improves reusability. #273 by @nathantannar4.

Changed

  • Breaking Change The properties leftStackView, rightStackView and bottomStackView in MessageInputBar are now of type InputStackView. The property separatorLine is also now of type SeparatorLine in MessageInputBar. #273 by @nathantannar4.

  • Layout information is now being cached by MessagesCollectionViewFlowLayout for each MessageType using the messageId property. (This means if your layout is dynamic over the IndexPath you need to handle cache invalidation). #263 by @SD10.

  • Layout anchors for the MessagesCollectionView and MessageInputBar now include the safeAreaLayoutGuide to fix layout issues on iPhone X #280 by @nathantannar4.

Fixed

  • Fixed a bug that prevented the textAllignment property of InputTextView's placeholderLabel from having noticable differences when changed to .center or .right. #262 by @nathantannar4.

  • Initial contentInset.bottom reference changed from messageInputBar to inputAccessoryView to allow custom inputAccessoryView's that don't break the initial layout. #267 by @nathantannar4.

  • Changes the MessageInputBar bottom UIStackView's bottomAnchor to layoutMarginsGuide.bottomAnchor to fix issues on the iPhone X. #266 by @nathantannar4.

  • Initial contentInset.bottom reference changed from messageInputBar to inputAccessoryView to allow custom inpinputAccessoryView's that don't break the initial layout #267 by @nathantannar4.

Removed

  • Breaking Change Removed additionalTopContentInset property of MessagesViewController because this is no longer necessary when extendedLayoutIncludesOpaqueBars is true. #250 by @SD10.

Added

  • Breaking Change .custom((MessageContainerView)->Void) case to MessageStyle enum. #163 by @SD10.

  • Breaking Change UIEdgeInsets associated value to all LabelAlignment enum cases. #166 by @SD10.

  • Breaking Change .emoji(String) case to MessageData enum. #222 by @SirArkimdes.

  • Breaking Change TextMessageDisplayDelegate to handle enabledDetecors(for:at:in) and moves textColor(for:at:in) to this namespace. #230 by @SD10

  • LocationMessageDisplayDelegate to customize a location messages appearance and add a MKAnnotationView to location message snapshots. #150 by @etoledom.

  • messageLabelInsets(for:indexPath:messagesCollectionView method to MessagesLayoutDelegate. #162 by @SD10.

  • animationBlockForLocation(message:indexPath:messagesCollectionView) method to LocationMessageDisplayDelegate to customize the display animation of the location message's map. #210 by @etoledom.

  • scrollsToBottomOnFirstLayout property to automatically scroll to the bottom of MessagesCollectionView on first load. #213 by @FraDeliro.

  • scrollsToBottomOnKeyboardDidBeginEditing property to automatically scroll to the bottom of MessagesCollectionView when the keyboard begins editing. #217 by @SD10.

  • additionalTopContentInset property to MessagesColectionViewController to allow users to account for extra subviews. #218 by @SD10.

  • messagePadding(for:at:in) method to MessagesLayoutDelegate to dynamically set padding around MessageContainerView. #208 by @SD10.

Fixed

  • MessageInputBar now correctly sizes itself when breaking its max height or pasting in large amounts of text #173 by @nathantannar4.

  • MessageInputBar faced a rendering issue on subsequent presentations of a MessageViewController. This was originally patched by adding a copy to the view during viewDidAppear(animated:) however that led to other issues #116. A correct patch has now been applied. #178 by @nathantannar4.

  • Incorrect sizing of MessagesCollectionViews content inset by setting extendedLayoutIncludesOpaqueBars to true by default. #204 by @SD10.

  • scrollIndicatorInsets to match the insets of the MessagesCollectionView. #174 by @etoledom.

  • MediaMessageCell had an offset PlayButtonView that was being constrained to the cell and not the message container. #239 by @SirArkimedes.

Changed

  • Breaking Change snapshotOptionsForLocation method is now part of LocationMessageDisplayDelegate. #150 by @etoledom.

  • Breaking Change setMapSnapshotImage now includes an annotationView: MKAnnotationView? argument. #150 by @etoledom.

  • Breaking Change messageLabelInsets has been made into a method on MessagesLayoutDelegate. #162 by @SD10.

  • Breaking Change messageLabelInsets now defaults to a left inset of 18 for incoming messages and a right inset of 18 for outgoing messages. #162 by @SD10.

  • Breaking Change InputTextView's UITextViewDelegate is now set to self #173 by @nathantannar4.

  • Breaking Change MessagesDisplayDelegate messageHeaderView(for:at:in) and messageFooterView(for:at:in) to return non-optionals. #229 by @SD10.

  • Breaking Change MessagesCollectionView dequeueMessageHeaderView(withIdentifier:for:) & dequeueMessageFooterView(widthIdentifier:for:) have been renamed to dequeueReusableHeaderView(CollectionViewReusable.Type,for:) & dequeueReusableFooterView(CollectionViewReusable.Type,for:). #229 by @SD10.

  • configure method of all MessageCollectionViewCell types to be marked as open. #200 by @SD10.

  • MessageHeaderView, MessageFooterView, and MessageDateHeaderView initializers to be public. #175 by @cwalo.

  • UICollectionViewDataSource and UICollectionViewDelegate methods of MessagesViewController to be open. #177 by @cwalo.

Removed

  • Breaking Change cellTopLabelInsets and cellBottomLabelInsets from MessagesCollectionViewFlowLayout. #166 by @SD10.

  • Breaking Change messageToViewEdgePadding on MessagesCollectionViewFlowLayout in favor of messagePadding(for:at:in). #208 by @SD10.

Added

  • Support for Swift 4

Added

  • Support for Swift 3.2 and Xcode 9

This release closes the 0.8 milestone.

Added

  • Breaking Change MessageData now supports .photo(UIImage), .location(CLLocation), .video(file: URL, thumbnail: UIImage) cases.
  • Breaking Change MessageCollectionViewCell is now generic over its ContentView constrained to UIView.
  • Breaking Change TextMessageCell subclass of MessageCollectionViewCell to support text messages.
  • MediaMessageCell subclass of MessageCollectionViewCell to support photo/video messages.
  • LocationMessageCell subclass of MessageCollectionViewCell to support location messages.
  • Adds LocationMessageLayoutDelegate for sizing of location messages.
  • Adds MediaMessageLayoutDelegate for sizing of media messages.
  • AvatarView now supports fontMinimumScaleFactor, placeholderFontColor, and placeholderFont properties

Changed

  • Keyboard handling no longer adjusts the top & bottom insets for MessagesCollectionView.
  • MessageStyles are now applied as a mask on the MessageContainerView

Deprecated

  • MessageCollectionViewCell's messageLabel has been renamed to messageContentView
  • AvatarView's setBackground(color: UIColor) method has been deprecated in favor of backgroundColor
  • AvatarView's getImage() method has been deprecated in favor of a new image property.

Fixed

  • Fixes extra height on text messages due to font specified in MessagesCollectionViewFlowLayout not being applied.
  • AvatarView's placeholder image is no longer constrained to a size of 30 x 30.
  • AvatarView's placeholder text can now auto-adjust based on available width.
  • Fixes invalid image path for Carthage resources.
  • Fixes missing asset bundle resources for Carthage installation.
  • Fixes missing asset bundle resources in framework.

This release closes the 0.7 milestone

This release closes the 0.6 milestone.

This release closes the 0.5 milestone.

This release closes the 0.4 milestone.

This release closes the 0.3 milestone.

This release closes the 0.2 milestone.

This release closes the 0.1 milestone.

Initial release. 🎉