Skip to content
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

OS X client doesn't integrate with native system text services #463

Closed
3 tasks done
ostrain opened this issue Mar 9, 2017 · 9 comments
Closed
3 tasks done

OS X client doesn't integrate with native system text services #463

ostrain opened this issue Mar 9, 2017 · 9 comments

Comments

@ostrain
Copy link

ostrain commented Mar 9, 2017

I confirm (by marking "x" in the [ ] below):


Summary
OS X client doesn't integrate with native system text services.

Steps to reproduce

  • Operating System: Mac OS X 10.11.6
  • Mattermost Desktop App version: 3.6.0
  • Mattermost Server version: Not sure, but this is purely a client issue

Steps to reproduce

Select some text either in the chat history or in the chat input box and right click.

Expected behavior

In all other OS X apps, including Chrome, a variety of standard system services will be available to use with the selected text. For example, looking up the selected word in the dictionary or searching for it on the web. Users can also install custom text services systemwide.

Observed behavior

Instead of these standard options being available, only cut/copy/paste operations appear in the context menu.

Notes

The missing functionality goes beyond the context menu -- these standard operations can also be triggered via keyboard shortcuts or multitouch gestures in some cases.

This seems related to #225

@jasonblais
Copy link
Contributor

jasonblais commented Mar 9, 2017

Thanks @ostrain - we currently use an electron-context-library to display the context menu.

Apart from having a spellchecker (which will be added with #225, hopefully soon) and Google search, are there additional options you're missing?

PS: @yuya-oc @jnugh I'm not sure if there are alternate libraries available we could explore?

@yuya-oc
Copy link
Contributor

yuya-oc commented Mar 11, 2017

I feel there are no alternatives. UI is not consist from native code (at least in our side), so basically os-level integration is not easy. We need a help of electron or native modules.

Search:
I'm not sure how I can use it in Objective-C, but we can use a hard-coded query, https://google.com#q=<TEXT> as a workaround.

Dictionary:
Probably we can use Electron's webview.showDefinitionForSelection(). But it doesn't work for me (electron/electron#8905). On the other hand, I could use three-finger tap to show this on the latest build.

Custom services:
I'm not sure what services can be installed on Mac. @ostrain would you provide an example?

@yuya-oc
Copy link
Contributor

yuya-oc commented Apr 7, 2017

There is an implementation, services role of MenuItem. But it's not correctly working with webview.

https://electron.atom.io/docs/api/menu-item/#new-menuitemoptions
electron/electron#7260

@jasonblais jasonblais added this to the Unscheduled milestone Apr 8, 2017
@ostrain
Copy link
Author

ostrain commented May 15, 2017

@ jasonblais - Sorry for the long delay in replying. I use several custom text services that I've defined myself (for example, I use one that lets me select some text that contains one or more JIRA bug IDs, press a keyboard shortcut I've defined, and open those bugs in my browser -- it's a small python script that I wrote). It works in essentially every other app on my Mac including other webview-based apps like Slack and HipChat, so it would be great to have it working in Mattermost too.

@jasonblais
Copy link
Contributor

Thanks for the feedback! We actually heard about a similar use case with Jira tickets.

I think the services role that Yuya linked above for menu items would work here, but we'll need to have it fixed upstream by Electron first: electron/electron#7260

@sanfords
Copy link

I just upgraded to 3.7.0 of the Mac desktop app. Spell check and command-shift-d-hover work now. I don't see any text services, but it could be me.

@ostrain
Copy link
Author

ostrain commented Jul 18, 2017

Just for reference, here's the actual service I was talking about: https://github.com/ostrain/the-talon

@yuya-oc
Copy link
Contributor

yuya-oc commented Aug 29, 2018

After quick investigation, it seems that electron v3 or v4 will solve this issue (tested on the current master branch: electron/electron@ccd63b5).

@amyblais
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants