-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Not working in slack #12
Comments
I believe I could make it work by setting the "AXManualAccessibility" attribute for electron apps, but I am not sure if |
One idea is to start with is making that type of option configurable on a per-app basis, similar to how you've got a blocklist, you could expand to a config file that lets you override certain things. That way you could do this to work-around issues, and it's easy enough to turn back off. |
Maybe we can make a list for which apps work well with svim which are not. |
So I have looked at Slack and I can get it to actually expose some accessibility information at all via: open -a "/Applications/Slack.app" --args --force-renderer-accessibility but it does not properly report the caret position anyways. It is always 0, regardless of the text content. I could do some janky guess work in those cases, as I can set the text, but without proper cursor synchronization this |
Perhaps we could file an issue within the Electron repo and see if there's any way to fix this there, or if every app on Electron needs to do work to be fixed. If nothing else, they may have suggestions. |
In https://github.com/dbalatero/VimMode.spoon I am able to read cursor info from Slack, I just can't set cursor position. The trick is to set the https://github.com/dbalatero/VimMode.spoon/blob/master/lib/utils/ax.lua#L37-L41 |
Electron apps are tricky because even though the Electron framework itself "supports" AX (with the |
btw if i remember well it looks like Slack can't get/set caret position but it can. the issue is that it mixes caret position with line number. so if you write stuff like set caret at position 3 and select 5 characters, what it does is setting your caret at line 3 and juggle with the rest of your data. in my experience, once past the fact that the Electron framework can bring apps everywhere, the rest of the layers are too freestyle to be supported properly. |
I can't understand Apple in this regard... All of the apps in the mac app store adhere to very strict guidelines A major app not being accessible is like an office building with no ramp or elevator... just horrible and arrogant. I will not do anything to explicitly support non-accessible apps, all be it to make regular people recognize the |
well, i call Electron apps "Electron shit apps" and "big fat liar apps" all over kindaVim docs and app 😂️ what saddens me is that yeah 1) native apps handle Accessibility because Apple does a lot of good work in this area and it's pretty shit to go around that 2) Electron is for improving the life of developers, not users. using only the knowledge you know, not adapted, to build subpar shits. it's like going to a new country and only speaking your language rather than learning the local one. that's utterly lazy, shitty and arrogant. bad UI. bad UX. but that's the trend. and the market speaks. more users, more market share. more money made 🤷♂️️ personally i like to build useful, simple, apps with great UX. it has to help a user, saving time, friction, or making them smile. native and clean. i don't care much about the rest (but that may explain why i only have 5 paying customers 😂️). |
I absolutely feel this. What's so odd is that plenty of native Mac apps seem to implement all the APIs just fine. When I filed an issue with Electron to fully implement all the accessibility APIs, they shot it down on grounds that it would get all the apps banned from the App Store–which, if they were dealing with tons of end user bug reports, I can understand why that might be their policy. It just makes no sense that the App Store would slap down Electron apps for using "private APIs" when the intent of those same APIs is to provide an accessible experience. I don't think anyone would disagree that that is a good software goal.
That's honestly pretty painful to hear.
I tried to implement different levels of support on my library (reproducing simple Vim motions for apps that don't support accessibility, and doing fancier stuff for better native apps), and I feel like I ended up creating a split, confusing experience that I'm not really that happy with. Honestly if the accessibility API hadn't gotten in the way, I would have poured hundreds of extra hours of enthusiasm into creating the best Vim-everywhere user experience I possibly could, but as a result I feel really stalled out on the project. I wish we could somehow move the mountain that is Apple + Electron and try to get better support baked in here. While it's tempting to throw up my hands and say "screw all the Electron apps," there are so many in the wild that it makes it pretty disappointing. |
I experimented a bit with a deeper system integration and was able to circumvent the accessibility limitations by gaining direct text access via the systems text input server, but stumbled over some other obstacles with the new approach. It is definitely possible to get this tool working in any text field, regardless of accessibility integration, but I will have to fiddle with it some more. |
@FelixKratz Wow can you share more about where I can read about this text input server? |
Also can you share the obstacles you've encountered? I might be able to help. |
WOW. that would be an amazing feat. |
I will share a bit about my idea and why I believe it should be possible: Now for my proof of concept: Getting access to those privileges can be achieved in numerous ways and the simplest is The second approach that would be even more powerful would include disabling system integrity protection and loading |
The Input Method Kit sounds very promising! I always wanted a stable API to work with, because then one could actually boot a headless neovim in RPC mode and proxy text/cursor back and forth, and inherit all the already implemented Vim motions for free.
For me, I would never be able to run this at work due to our IT security controls, and probably many users might be in the same boat here as well (or uncomfortable with disabling SIP for personal reasons). It's certainly worth an exploration to see what is possible, though! |
smart. very nice.
yeah that one for me is/was out of question. disabling SIP would be a no no, both as a user and the dev. |
So today I started to use Mailspring, an Electron app, and I wanted svim to work in this app. So I decided to set the kAXManualAccessibility flag for apps if svim is compiled with '-DMANUAL_AX'. |
I just use Slack in a web browser and works as expected 😄 |
Slack doesn't seem to be working with SketchyVim. Perhaps it's related to it being an Electron app?
The text was updated successfully, but these errors were encountered: