Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Added a dataSource method to insert custom menu items #1563

Closed
wants to merge 1 commit into from

Conversation

eliburke
Copy link
Collaborator

@eliburke eliburke commented May 1, 2016

For issue #1321

jsq_didReceiveMenuWillShowNotification restores previous value afterwards
@codecov-io
Copy link

codecov-io commented May 1, 2016

Current coverage is 64.79%

Merging #1563 into develop will decrease coverage by 1.72%

  1. 2 files (not in diff) in ...Controller/Factories were deleted. more
  2. 2 files (not in diff) in ...ssagesViewController were deleted. more
  3. 12 files (not in diff) in ...ViewController/Views were modified. more
    • Partials -5
    • Hits -67
  4. 7 files (not in diff) in ...ViewController/Model were modified. more
    • Partials -4
    • Hits -61
  5. 5 files (not in diff) in ...iewController/Layout were modified. more
    • Partials -15
    • Hits -31
  6. 3 files (not in diff) in ...Controller/Factories were modified. more
    • Partials -2
    • Hits -16
  7. 4 files (not in diff) in ...ontroller/Categories were modified. more
    • Hits -8
  8. 1 files (not in diff) in ...ssagesViewController were modified. more
    • Partials -2
    • Hits -6
  9. File ...agesViewController.m was modified. more
    • Partials -7
    • Hits -38
@@            develop      #1563   diff @@
==========================================
  Files            62         59     -3   
  Lines          2264       2170    -94   
  Methods         634          0   -634   
  Messages          0          0          
  Branches        136          0   -136   
==========================================
- Hits           1506       1406   -100   
- Misses          758        764     +6   
  Partials          0          0          

Powered by Codecov. Last updated by e0016e4...eeee168

@jessesquires jessesquires added this to the 8.0.0 milestone May 2, 2016
jessesquires added a commit that referenced this pull request May 23, 2016
- fix menu actions, close #1321
- make notification methods public
- partially apply changes from PR #1563
@jessesquires
Copy link
Owner

hey @eliburke — i decided to merge #1281 and then pushed 8c29756 — this seems like a decent middle ground for 7.x.

i definitely want to include your changes here for 8.0 — although, I'd really like to redesign the menu controller stuff completely. it's all sort of "hacked on top" right now. it would be good to contain all this logic in a separate class and have a separate MenuItemDelegate/DataSource (instead of piggy-backing on the messagesDataSource).

Thoughts?

@eliburke
Copy link
Collaborator Author

eliburke commented May 23, 2016

@jessesquires Better half a loaf ... 😆

The #1281 update to JSQMessagesComposerTextView:canPerformAction: appears to have fixed the problem I had with pasting images (for the image attachment PR).

If you have a couple minutes to jot down any thoughts about how you'd like to have the MenuItem delegate/data source class work in 8.0 I can get started trying to put something together.

Here are some questions off the top of my head:

  • Is this new class only for collection view cells? Cell menus need the most customization, but maybe someone has a need for additional menu items on the ComposerTextView, and both involve UIMenuController and juggling selectors...
  • Should maybe expose selectedIndexPathForMenu
  • Media messages should not be blacklisted in shouldShowMenuForItemAtIndexPath
  • should the cell menu be restored automatically? the willShow / willHide methodology in fix custom action show in JSQMessagesComposerTextView #1281 requires developers to add and remove custom menus themselves
  • I think it would be good to have fine-grained control over whether JSQMessageData items can be copy / pasted.

I can think of a few ways to do this:

  1. adding BOOL copyable; and -(void) copy: to the JSQMessageData protocol, maybe with another BOOL in the MenuItem delegate for mediaItemsCopyable.
  2. use something like the existing registerMenuAction design with a registerMenuCopy: and 'registerMenuPaste:` (each would take a class, and the copy and paste logic would live within the collection)
  3. beef up registerMenuAction to take additional parameters to indicate media and &etc

pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this pull request Apr 16, 2017
…iewController

* 'master' of https://github.com/jessesquires/JSQMessagesViewController: (86 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this pull request Apr 16, 2017
…nch3

* origin/master: (66 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
@jessesquires
Copy link
Owner

Hello everyone!

I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:

http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊

Thanks for understanding,
— jsq

@jessesquires jessesquires deleted the perCellMenu branch February 7, 2018 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants